diff --git a/404.html b/404.html index 1633b48e6..09547d76d 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ - Mycodo
\ No newline at end of file + Mycodo
\ No newline at end of file diff --git a/API/index.html b/API/index.html index 0b9cec663..c6c997983 100644 --- a/API/index.html +++ b/API/index.html @@ -1,4 +1,4 @@ - API - Mycodo
Skip to content

API

REST API~

As of version 8, Mycodo has a REST API (See API Endpoint Documentation).

An API is an application programming interface - in short, it’s a set of rules that lets programs talk to each other, exposing data and functionality across the internet in a consistent format.

REST stands for Representational State Transfer. This is an architectural pattern that describes how distributed systems can expose a consistent interface. When people use the term ‘REST API,’ they are generally referring to an API accessed via HTTP protocol at a predefined set of URLs. These URLs represent various resources - any information or content accessed at that location, which can be returned as JSON, HTML, audio files, or images. Often, resources have one or more methods that can be performed on them over HTTP, like GET, POST, PUT and DELETE.

Authentication~

An API Key can be generated from the User Settings page ([Gear Icon] -> Configure -> Users). This is stored as a 128-bit bytes object in the database, but will be presented to the user as a base64-encoded string. This can be used to access HTTPS endpoints.

Mycodo supports several authentication methods. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will fail.

Bash Examples~

curl can be used, but you must either use -k to allow the use of an unsigned SSL certificate, or use your own certificate and domain.

curl -k -v -X GET "https://127.0.0.1/api/settings/users" -H "authorization: Basic 0scjVcxRGi0XczregANBRXG3VMMro+oolPYdauadLblaNThd79bzFPITJjYneU1yK/Ikc9ahHXmll9JiKZO9+hogKoIp2Q8a2cMFBGevgJSd5jYVYz5D83dFE5+OBvvKKaN1U5TvPOXXcj3lkjvPzgxOnEF0CZUsKfU3MA3cFEs=" -H "accept: application/vnd.mycodo.v1+json"
+ API - Mycodo      

API

REST API~

As of version 8, Mycodo has a REST API (See API Endpoint Documentation).

An API is an application programming interface - in short, it’s a set of rules that lets programs talk to each other, exposing data and functionality across the internet in a consistent format.

REST stands for Representational State Transfer. This is an architectural pattern that describes how distributed systems can expose a consistent interface. When people use the term ‘REST API,’ they are generally referring to an API accessed via HTTP protocol at a predefined set of URLs. These URLs represent various resources - any information or content accessed at that location, which can be returned as JSON, HTML, audio files, or images. Often, resources have one or more methods that can be performed on them over HTTP, like GET, POST, PUT and DELETE.

Authentication~

An API Key can be generated from the User Settings page ([Gear Icon] -> Configure -> Users). This is stored as a 128-bit bytes object in the database, but will be presented to the user as a base64-encoded string. This can be used to access HTTPS endpoints.

Mycodo supports several authentication methods. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will fail.

Bash Examples~

curl can be used, but you must either use -k to allow the use of an unsigned SSL certificate, or use your own certificate and domain.

curl -k -v -X GET "https://127.0.0.1/api/settings/users" -H "authorization: Basic 0scjVcxRGi0XczregANBRXG3VMMro+oolPYdauadLblaNThd79bzFPITJjYneU1yK/Ikc9ahHXmll9JiKZO9+hogKoIp2Q8a2cMFBGevgJSd5jYVYz5D83dFE5+OBvvKKaN1U5TvPOXXcj3lkjvPzgxOnEF0CZUsKfU3MA3cFEs=" -H "accept: application/vnd.mycodo.v1+json"
 
curl -k -v -X GET "https://127.0.0.1/api/settings/users" -H "X-API-KEY: 0scjVcxRGi0XczregANBRXG3VMMro+oolPYdauadLblaNThd79bzFPITJjYneU1yK/Ikc9ahHXmll9JiKZO9+hogKoIp2Q8a2cMFBGevgJSd5jYVYz5D83dFE5+OBvvKKaN1U5TvPOXXcj3lkjvPzgxOnEF0CZUsKfU3MA3cFEs=" -H "accept: application/vnd.mycodo.v1+json"
 
curl -k -v -X GET "https://127.0.0.1/api/settings/users?api_key=0scjVcxRGi0XczregANBRXG3VMMro+oolPYdauadLblaNThd79bzFPITJjYneU1yK/Ikc9ahHXmll9JiKZO9+hogKoIp2Q8a2cMFBGevgJSd5jYVYz5D83dFE5+OBvvKKaN1U5TvPOXXcj3lkjvPzgxOnEF0CZUsKfU3MA3cFEs=" -H "accept: application/vnd.mycodo.v1+json"
 

Python Example (GET)~

import json
@@ -40,4 +40,4 @@
 

Errors~

Mycodo uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Mycodo's servers (these are rare).

Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.

Endpoints~

A vendor-specific content type header must be included to determine which API version to use. For version 1, this is "application/vnd.mycodo.v1+json", as can be seen in the examples, above.

Visit https://{RASPBERRY_PI_IP_ADDRESS}/api for documentation of the current API endpoints of your Mycodo install.

Documentation for the latest API version is also available in HTML format: Mycodo API Docs <https://kizniche.github.io/Mycodo/mycodo-api.html>__

Daemon Control Object~

DaemonControl()~

class mycodo_client.DaemonControl (pyro_uri='PYRO:mycodo.pyro_server@127.0.0.1:9080', pyro_timeout=None)

The mycodo client object implements a way to communicate with a mycodo daemon and query information from the influxdb database.

Example usage:

from mycodo.mycodo_client import DaemonControl
 control = DaemonControl()
 control.terminate_daemon()
-

Parameters:

  • pyro_uri - the Pyro5 uri to use to connect to the daemon.
  • pyro_timeout - the Pyro5 timeout period.

controller_activate()~

controller_activate (controller_id)

Activates a controller.

Parameters:

  • controller_type - the type of controller being activated. Options are: "Function", "Input", "Output", "PID", "Trigger", or "Function".
  • controller_id - the unique ID of the controller to activate.

controller_deactivate()~

controller_deactivate (controller_id)

Deactivates a controller.

Parameters:

  • controller_type - the type of controller being deactivated. Options are: "Conditional", "Input", "Output", "PID", "Trigger", or "Function".
  • controller_id - the unique ID of the controller to deactivate.

get_condition_measurement()~

get_condition_measurement (condition_id)

Gets the measurement from a Condition of a Conditional Function.

Parameters:

  • condition_id - The unique ID of the controller.

get_condition_measurement_dict()~

get_condition_measurement_dict (condition_id)

Gets the measurement dictionary from a Condition of a Conditional Function.

Parameters:

  • condition_id - The unique ID of the controller.

input_force_measurements()~

input_force_measurements (input_id)

Induce an Input to conduct a measurement.

Parameters:

  • input_id - The unique ID of the controller.

lcd_backlight()~

lcd_backlight (lcd_id, state)

Turn the backlight of an LCD on or off, if the LCD supports that functionality.

Parameters:

  • lcd_id - The unique ID of the controller.
  • state - The state of the LCD backlight. Options are: False for off, True for on.

lcd_flash()~

lcd_flash (lcd_id, state)

Cause the LCD backlight to start or stop flashing, if the LCD supports that functionality.

Parameters:

  • lcd_id - The unique ID of the controller.
  • state - The state of the LCD flashing. Options are: False for off, True for on.

lcd_reset()~

lcd_reset (lcd_id)

Reset an LCD to its default startup state. This can be used to clear the screen, fix display issues, or turn off flashing.

Parameters:

  • lcd_id - The unique ID of the controller.

output_off()~

output_off (output_id, trigger_conditionals=True)

Turn an Output off.

Parameters:

  • output_id - The unique ID of the Output.
  • trigger_conditionals - Whether to trigger controllers that may be monitoring Outputs for state changes.

output_on()~

output_on (output_id, output_type='sec', amount=0.0, min_off=0.0, trigger_conditionals=True)

Turn an Output on.

Parameters:

  • output_id - The unique ID of the Output.
  • output_type - The type of output to send to the output module (e.g. "sec", "pwm", "vol").
  • amount - The amount to send to the output module.
  • min_off - How long to keep the Output off after turning on, if on for a duration.
  • trigger_conditionals - Whether to trigger controllers that may be monitoring Outputs for state changes.

output_on_off()~

output_on_off (output_id, state, output_type='sec', amount=0.0,)

Turn an Output on or off.

Parameters:

  • output_id - The unique ID of the Output.
  • state - The state to turn the Output. Options are: "on", "off"
  • output_type - The type of output to send to the output module (e.g. "sec", "pwm", "vol").
  • amount - The amount to send to the output module.

output_sec_currently_on()~

output_sec_currently_on (output_id)

Get how many seconds an Output has been on.

Parameters:

  • output_id - The unique ID of the Output.

output_setup()~

output_setup (action, output_id)

Set up an Output (i.e. load/reload settings from database, initialize any pins/classes, etc.).

Parameters:

  • action - What action to instruct for the Output. Options are: "Add", "Delete", or "Modify".
  • output_id - The unique ID of the Output.

output_state()~

output_state (output_id)

Gets the state of an Output. Returns "on" or "off" or duty cycle value.

Parameters:

  • output_id - The unique ID of the Output.

pid_get()~

pid_get (pid_id, setting)

Get a parameter of a PID controller.

Parameters:

  • pid_id - The unique ID of the controller.
  • setting - Which option to get. Options are: "setpoint", "error", "integrator", "derivator", "kp", "ki", or "kd".

pid_hold()~

pid_hold (pid_id)

Set a PID Controller to Hold.

Parameters:

  • pid_id - The unique ID of the controller.

pid_mod()~

pid_mod (pid_id)

Refresh/Initialize the variables of a running PID controller.

Parameters:

  • pid_id - The unique ID of the controller.

pid_pause()~

pid_pause (pid_id)

Set a PID Controller to Pause.

Parameters:

  • pid_id - The unique ID of the controller.

pid_resume()~

pid_resume (pid_id)

Set a PID Controller to Resume.

Parameters:

  • pid_id - The unique ID of the controller.

pid_set()~

pid_set (pid_id, setting, value)

Set a parameter of a running PID controller.

Parameters:

  • pid_id - The unique ID of the controller.
  • setting - Which option to set. Options are: "setpoint", "method", "integrator", "derivator", "kp", "ki", or "kd".
  • value - The value to set.

refresh_daemon_conditional_settings()~

refresh_daemon_conditional_settings (unique_id)

Refresh the settings of a running Conditional Function.

Parameters:

  • unique_id - The unique ID of the controller.

refresh_daemon_misc_settings()~

refresh_daemon_misc_settings ()

Refresh the miscellaneous settings stored in the running daemon from the database values.

refresh_daemon_trigger_settings()~

refresh_daemon_trigger_settings (unique_id)

Refresh the Trigger Controller settings of a running Trigger Controller.

Parameters:

  • unique_id - The unique ID of the controller.

send_email()~

send_email (recipients, message, subject)

Send an email with the credentials configured for alert notifications.

Parameters:

  • recipients - The email address (string) or addresses (list of strings) to send the email.
  • message - The body of the email.
  • subject - The subject of the email.

terminate_daemon()~

terminate_daemon ()

Instruct the daemon to shut down.

trigger_action()~

trigger_action (action_id, value={}, debug=False)

Instruct a Function Action to be executed.

Parameters:

  • action_id - The unique ID of the Function Action.
  • value - A dict with at a minimum 'message' key to have messages appended in the action. This dict should be returned by the action.
  • debug - Whether to show debug logging messages.

trigger_all_actions()~

trigger_all_actions (function_id, message='', debug=False)

Instruct all Function Actions of a Function Controller to be executed sequentially.

Parameters:

  • function_id - The unique ID of the controller.
  • message - A message to send with the action that may be used by the action.
  • debug - Whether to show debug logging messages.
\ No newline at end of file +

Parameters:

  • pyro_uri - the Pyro5 uri to use to connect to the daemon.
  • pyro_timeout - the Pyro5 timeout period.

controller_activate()~

controller_activate (controller_id)

Activates a controller.

Parameters:

  • controller_type - the type of controller being activated. Options are: "Function", "Input", "Output", "PID", "Trigger", or "Function".
  • controller_id - the unique ID of the controller to activate.

controller_deactivate()~

controller_deactivate (controller_id)

Deactivates a controller.

Parameters:

  • controller_type - the type of controller being deactivated. Options are: "Conditional", "Input", "Output", "PID", "Trigger", or "Function".
  • controller_id - the unique ID of the controller to deactivate.

get_condition_measurement()~

get_condition_measurement (condition_id)

Gets the measurement from a Condition of a Conditional Function.

Parameters:

  • condition_id - The unique ID of the controller.

get_condition_measurement_dict()~

get_condition_measurement_dict (condition_id)

Gets the measurement dictionary from a Condition of a Conditional Function.

Parameters:

  • condition_id - The unique ID of the controller.

input_force_measurements()~

input_force_measurements (input_id)

Induce an Input to conduct a measurement.

Parameters:

  • input_id - The unique ID of the controller.

lcd_backlight()~

lcd_backlight (lcd_id, state)

Turn the backlight of an LCD on or off, if the LCD supports that functionality.

Parameters:

  • lcd_id - The unique ID of the controller.
  • state - The state of the LCD backlight. Options are: False for off, True for on.

lcd_flash()~

lcd_flash (lcd_id, state)

Cause the LCD backlight to start or stop flashing, if the LCD supports that functionality.

Parameters:

  • lcd_id - The unique ID of the controller.
  • state - The state of the LCD flashing. Options are: False for off, True for on.

lcd_reset()~

lcd_reset (lcd_id)

Reset an LCD to its default startup state. This can be used to clear the screen, fix display issues, or turn off flashing.

Parameters:

  • lcd_id - The unique ID of the controller.

output_off()~

output_off (output_id, trigger_conditionals=True)

Turn an Output off.

Parameters:

  • output_id - The unique ID of the Output.
  • trigger_conditionals - Whether to trigger controllers that may be monitoring Outputs for state changes.

output_on()~

output_on (output_id, output_type='sec', amount=0.0, min_off=0.0, trigger_conditionals=True)

Turn an Output on.

Parameters:

  • output_id - The unique ID of the Output.
  • output_type - The type of output to send to the output module (e.g. "sec", "pwm", "vol").
  • amount - The amount to send to the output module.
  • min_off - How long to keep the Output off after turning on, if on for a duration.
  • trigger_conditionals - Whether to trigger controllers that may be monitoring Outputs for state changes.

output_on_off()~

output_on_off (output_id, state, output_type='sec', amount=0.0,)

Turn an Output on or off.

Parameters:

  • output_id - The unique ID of the Output.
  • state - The state to turn the Output. Options are: "on", "off"
  • output_type - The type of output to send to the output module (e.g. "sec", "pwm", "vol").
  • amount - The amount to send to the output module.

output_sec_currently_on()~

output_sec_currently_on (output_id)

Get how many seconds an Output has been on.

Parameters:

  • output_id - The unique ID of the Output.

output_setup()~

output_setup (action, output_id)

Set up an Output (i.e. load/reload settings from database, initialize any pins/classes, etc.).

Parameters:

  • action - What action to instruct for the Output. Options are: "Add", "Delete", or "Modify".
  • output_id - The unique ID of the Output.

output_state()~

output_state (output_id)

Gets the state of an Output. Returns "on" or "off" or duty cycle value.

Parameters:

  • output_id - The unique ID of the Output.

pid_get()~

pid_get (pid_id, setting)

Get a parameter of a PID controller.

Parameters:

  • pid_id - The unique ID of the controller.
  • setting - Which option to get. Options are: "setpoint", "error", "integrator", "derivator", "kp", "ki", or "kd".

pid_hold()~

pid_hold (pid_id)

Set a PID Controller to Hold.

Parameters:

  • pid_id - The unique ID of the controller.

pid_mod()~

pid_mod (pid_id)

Refresh/Initialize the variables of a running PID controller.

Parameters:

  • pid_id - The unique ID of the controller.

pid_pause()~

pid_pause (pid_id)

Set a PID Controller to Pause.

Parameters:

  • pid_id - The unique ID of the controller.

pid_resume()~

pid_resume (pid_id)

Set a PID Controller to Resume.

Parameters:

  • pid_id - The unique ID of the controller.

pid_set()~

pid_set (pid_id, setting, value)

Set a parameter of a running PID controller.

Parameters:

  • pid_id - The unique ID of the controller.
  • setting - Which option to set. Options are: "setpoint", "method", "integrator", "derivator", "kp", "ki", or "kd".
  • value - The value to set.

refresh_daemon_conditional_settings()~

refresh_daemon_conditional_settings (unique_id)

Refresh the settings of a running Conditional Function.

Parameters:

  • unique_id - The unique ID of the controller.

refresh_daemon_misc_settings()~

refresh_daemon_misc_settings ()

Refresh the miscellaneous settings stored in the running daemon from the database values.

refresh_daemon_trigger_settings()~

refresh_daemon_trigger_settings (unique_id)

Refresh the Trigger Controller settings of a running Trigger Controller.

Parameters:

  • unique_id - The unique ID of the controller.

send_email()~

send_email (recipients, message, subject)

Send an email with the credentials configured for alert notifications.

Parameters:

  • recipients - The email address (string) or addresses (list of strings) to send the email.
  • message - The body of the email.
  • subject - The subject of the email.

terminate_daemon()~

terminate_daemon ()

Instruct the daemon to shut down.

trigger_action()~

trigger_action (action_id, value={}, debug=False)

Instruct a Function Action to be executed.

Parameters:

  • action_id - The unique ID of the Function Action.
  • value - A dict with at a minimum 'message' key to have messages appended in the action. This dict should be returned by the action.
  • debug - Whether to show debug logging messages.

trigger_all_actions()~

trigger_all_actions (function_id, message='', debug=False)

Instruct all Function Actions of a Function Controller to be executed sequentially.

Parameters:

  • function_id - The unique ID of the controller.
  • message - A message to send with the action that may be used by the action.
  • debug - Whether to show debug logging messages.
\ No newline at end of file diff --git a/About.de/index.html b/About.de/index.html index 30f472fb0..6c0f316fc 100644 --- a/About.de/index.html +++ b/About.de/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo ist ein quelloffenes Umweltüberwachungs- und -regulierungssystem, das für den Betrieb auf Einplatinencomputern, insbesondere dem Raspberry Pi, entwickelt wurde.

Ursprünglich für die Zucht von Speisepilzen entwickelt, kann Mycodo inzwischen viel mehr. Das System besteht aus zwei Teilen, einem Backend (Daemon) und einem Frontend (Webserver). Das Backend übernimmt Aufgaben wie die Erfassung von Messwerten von Sensoren und Geräten und koordiniert eine Reihe von Reaktionen auf diese Messwerte, einschließlich der Fähigkeit, Ausgänge zu modulieren (Relais schalten, PWM-Signale erzeugen, Pumpen betreiben, drahtlose Ausgänge schalten, MQTT veröffentlichen/abonnieren usw.), Umgebungsbedingungen mit PID-Steuerung zu regulieren, Zeitpläne zu erstellen, Fotos aufzunehmen und Videos zu streamen, Aktionen auszulösen, wenn Messwerte bestimmte Bedingungen erfüllen, und vieles mehr. Das Frontend beherbergt eine Weboberfläche, die Anzeige und Konfiguration von jedem Browser-fähigen Gerät aus ermöglicht.

Für Mycodo gibt es eine Reihe von unterschiedlichen Verwendungszwecken. Einige Nutzer speichern einfach Sensormessungen, um die Bedingungen aus der Ferne zu überwachen, andere regulieren die Umgebungsbedingungen eines physischen Raums, während andere unter anderem bewegungsaktivierte oder Zeitrafferaufnahmen machen.

Input-Controller erfassen Messwerte und speichern sie in der InfluxDB-Zeitreihendatenbank. Die Messungen stammen in der Regel von Sensoren, können aber auch so konfiguriert werden, dass sie den Rückgabewert von Linux-Bash- oder Python-Befehlen oder mathematische Gleichungen verwenden, was dieses System zu einem sehr dynamischen System für die Erfassung und Erzeugung von Daten macht.

Ausgangssteuerungen erzeugen Änderungen an den GPIO-Pins (GPIO = General Input/Output) oder können so konfiguriert werden, dass sie Linux-Bash- oder Python-Befehle ausführen, was eine Vielzahl von Verwendungsmöglichkeiten bietet. Es gibt einige verschiedene Arten von Ausgängen: einfaches Schalten von GPIO-Pins (HIGH/LOW), Erzeugen von pulsweitenmodulierten (PWM) Signalen, Steuern von Schlauchpumpen, MQTT-Veröffentlichung und mehr.

Wenn Eingänge und Ausgänge kombiniert werden, können Funktionsregler verwendet werden, um Rückkopplungsschleifen zu erstellen, die das Ausgangsgerät verwenden, um einen Umgebungszustand zu modulieren, den der Eingang misst. Bestimmte Eingänge können mit bestimmten Ausgängen gekoppelt werden, um eine Vielzahl verschiedener Steuerungs- und Regelungsanwendungen zu schaffen. Über die einfache Regelung hinaus können Methoden verwendet werden, um einen sich im Laufe der Zeit ändernden Sollwert zu erzeugen, was z. B. Thermocycler, Reflow-Öfen, Umweltsimulationen für Terrarien, Fermentierung oder Reifung von Lebensmitteln und Getränken sowie das Garen von Lebensmitteln (Sous-vide) ermöglicht, um nur einige Beispiele zu nennen.

Auslöser können so eingestellt werden, dass sie Ereignisse auf der Grundlage bestimmter Daten und Uhrzeiten, Zeitspannen oder des Sonnenaufgangs/Sonnenuntergangs an einem bestimmten Breiten- und Längengrad aktivieren.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo ist ein quelloffenes Umweltüberwachungs- und -regulierungssystem, das für den Betrieb auf Einplatinencomputern, insbesondere dem Raspberry Pi, entwickelt wurde.

Ursprünglich für die Zucht von Speisepilzen entwickelt, kann Mycodo inzwischen viel mehr. Das System besteht aus zwei Teilen, einem Backend (Daemon) und einem Frontend (Webserver). Das Backend übernimmt Aufgaben wie die Erfassung von Messwerten von Sensoren und Geräten und koordiniert eine Reihe von Reaktionen auf diese Messwerte, einschließlich der Fähigkeit, Ausgänge zu modulieren (Relais schalten, PWM-Signale erzeugen, Pumpen betreiben, drahtlose Ausgänge schalten, MQTT veröffentlichen/abonnieren usw.), Umgebungsbedingungen mit PID-Steuerung zu regulieren, Zeitpläne zu erstellen, Fotos aufzunehmen und Videos zu streamen, Aktionen auszulösen, wenn Messwerte bestimmte Bedingungen erfüllen, und vieles mehr. Das Frontend beherbergt eine Weboberfläche, die Anzeige und Konfiguration von jedem Browser-fähigen Gerät aus ermöglicht.

Für Mycodo gibt es eine Reihe von unterschiedlichen Verwendungszwecken. Einige Nutzer speichern einfach Sensormessungen, um die Bedingungen aus der Ferne zu überwachen, andere regulieren die Umgebungsbedingungen eines physischen Raums, während andere unter anderem bewegungsaktivierte oder Zeitrafferaufnahmen machen.

Input-Controller erfassen Messwerte und speichern sie in der InfluxDB-Zeitreihendatenbank. Die Messungen stammen in der Regel von Sensoren, können aber auch so konfiguriert werden, dass sie den Rückgabewert von Linux-Bash- oder Python-Befehlen oder mathematische Gleichungen verwenden, was dieses System zu einem sehr dynamischen System für die Erfassung und Erzeugung von Daten macht.

Ausgangssteuerungen erzeugen Änderungen an den GPIO-Pins (GPIO = General Input/Output) oder können so konfiguriert werden, dass sie Linux-Bash- oder Python-Befehle ausführen, was eine Vielzahl von Verwendungsmöglichkeiten bietet. Es gibt einige verschiedene Arten von Ausgängen: einfaches Schalten von GPIO-Pins (HIGH/LOW), Erzeugen von pulsweitenmodulierten (PWM) Signalen, Steuern von Schlauchpumpen, MQTT-Veröffentlichung und mehr.

Wenn Eingänge und Ausgänge kombiniert werden, können Funktionsregler verwendet werden, um Rückkopplungsschleifen zu erstellen, die das Ausgangsgerät verwenden, um einen Umgebungszustand zu modulieren, den der Eingang misst. Bestimmte Eingänge können mit bestimmten Ausgängen gekoppelt werden, um eine Vielzahl verschiedener Steuerungs- und Regelungsanwendungen zu schaffen. Über die einfache Regelung hinaus können Methoden verwendet werden, um einen sich im Laufe der Zeit ändernden Sollwert zu erzeugen, was z. B. Thermocycler, Reflow-Öfen, Umweltsimulationen für Terrarien, Fermentierung oder Reifung von Lebensmitteln und Getränken sowie das Garen von Lebensmitteln (Sous-vide) ermöglicht, um nur einige Beispiele zu nennen.

Auslöser können so eingestellt werden, dass sie Ereignisse auf der Grundlage bestimmter Daten und Uhrzeiten, Zeitspannen oder des Sonnenaufgangs/Sonnenuntergangs an einem bestimmten Breiten- und Längengrad aktivieren.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.es/index.html b/About.es/index.html index 9ae5b6884..837a32a7f 100644 --- a/About.es/index.html +++ b/About.es/index.html @@ -1 +1 @@ - Sobre - Mycodo

Sobre

Mycodo es un sistema de supervisión y regulación medioambiental de código abierto que se ha creado para funcionar en ordenadores de placa única, concretamente en la Raspberry Pi.

Desarrollado originalmente para el cultivo de setas comestibles, Mycodo ha crecido para hacer mucho más. El sistema consta de dos partes, un backend (demonio) y un frontend (servidor web). El backend realiza tareas como la adquisición de mediciones de sensores y dispositivos y la coordinación de un conjunto diverso de respuestas a esas mediciones, incluida la capacidad de modular las salidas (conmutar relés, generar señales PWM, operar bombas, conmutar salidas inalámbricas, publicar/suscribirse a MQTT, entre otras), regular las condiciones ambientales con control PID, programar temporizadores, capturar fotos y transmitir vídeo, desencadenar acciones cuando las mediciones cumplen ciertas condiciones, y más. El frontend alberga una interfaz web que permite la visualización y configuración desde cualquier dispositivo con navegador.

Los usos de Mycodo son muy variados. Algunos usuarios simplemente almacenan las mediciones de los sensores para supervisar las condiciones a distancia, otros regulan las condiciones ambientales de un espacio físico, mientras que otros capturan fotografías activadas por el movimiento o por el tiempo, entre otros usos.

Los controladores de entrada adquieren mediciones y las almacenan en la base de datos de series temporales InfluxDB. Las mediciones suelen proceder de los sensores, pero también pueden configurarse para utilizar el valor de retorno de los comandos de Linux Bash o Python, o las ecuaciones matemáticas, lo que hace que sea un sistema muy dinámico para adquirir y generar datos.

Los controladores de salida producen cambios en los pines generales de entrada/salida (GPIO) o pueden ser configurados para ejecutar comandos de Linux Bash o Python, permitiendo una variedad de usos potenciales. Existen varios tipos de salidas: la simple conmutación de los pines GPIO (HIGH/LOW), la generación de señales de ancho de pulso modulado (PWM), el control de bombas peristálticas, la publicación de MQTT, etc.

Cuando se combinan las Entradas y las Salidas, los controladores de funciones pueden utilizarse para crear bucles de retroalimentación que utilizan el dispositivo de Salida para modular una condición ambiental que la Entrada mide. Ciertas Entradas pueden ser acopladas con ciertas Salidas para crear una variedad de diferentes aplicaciones de control y regulación. Más allá de la simple regulación, los Métodos pueden ser utilizados para crear un punto de ajuste cambiante en el tiempo, permitiendo cosas como cicladores térmicos, hornos de reflujo, simulación ambiental para terrarios, fermentación o curado de alimentos y bebidas, y cocción de alimentos (sous-vide), por nombrar algunos.

Los disparadores se pueden configurar para activar eventos basados en fechas y horas específicas, según duraciones de tiempo, o la salida/puesta del sol en una latitud y longitud específicas.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + Sobre - Mycodo

Sobre

Mycodo es un sistema de supervisión y regulación medioambiental de código abierto que se ha creado para funcionar en ordenadores de placa única, concretamente en la Raspberry Pi.

Desarrollado originalmente para el cultivo de setas comestibles, Mycodo ha crecido para hacer mucho más. El sistema consta de dos partes, un backend (demonio) y un frontend (servidor web). El backend realiza tareas como la adquisición de mediciones de sensores y dispositivos y la coordinación de un conjunto diverso de respuestas a esas mediciones, incluida la capacidad de modular las salidas (conmutar relés, generar señales PWM, operar bombas, conmutar salidas inalámbricas, publicar/suscribirse a MQTT, entre otras), regular las condiciones ambientales con control PID, programar temporizadores, capturar fotos y transmitir vídeo, desencadenar acciones cuando las mediciones cumplen ciertas condiciones, y más. El frontend alberga una interfaz web que permite la visualización y configuración desde cualquier dispositivo con navegador.

Los usos de Mycodo son muy variados. Algunos usuarios simplemente almacenan las mediciones de los sensores para supervisar las condiciones a distancia, otros regulan las condiciones ambientales de un espacio físico, mientras que otros capturan fotografías activadas por el movimiento o por el tiempo, entre otros usos.

Los controladores de entrada adquieren mediciones y las almacenan en la base de datos de series temporales InfluxDB. Las mediciones suelen proceder de los sensores, pero también pueden configurarse para utilizar el valor de retorno de los comandos de Linux Bash o Python, o las ecuaciones matemáticas, lo que hace que sea un sistema muy dinámico para adquirir y generar datos.

Los controladores de salida producen cambios en los pines generales de entrada/salida (GPIO) o pueden ser configurados para ejecutar comandos de Linux Bash o Python, permitiendo una variedad de usos potenciales. Existen varios tipos de salidas: la simple conmutación de los pines GPIO (HIGH/LOW), la generación de señales de ancho de pulso modulado (PWM), el control de bombas peristálticas, la publicación de MQTT, etc.

Cuando se combinan las Entradas y las Salidas, los controladores de funciones pueden utilizarse para crear bucles de retroalimentación que utilizan el dispositivo de Salida para modular una condición ambiental que la Entrada mide. Ciertas Entradas pueden ser acopladas con ciertas Salidas para crear una variedad de diferentes aplicaciones de control y regulación. Más allá de la simple regulación, los Métodos pueden ser utilizados para crear un punto de ajuste cambiante en el tiempo, permitiendo cosas como cicladores térmicos, hornos de reflujo, simulación ambiental para terrarios, fermentación o curado de alimentos y bebidas, y cocción de alimentos (sous-vide), por nombrar algunos.

Los disparadores se pueden configurar para activar eventos basados en fechas y horas específicas, según duraciones de tiempo, o la salida/puesta del sol en una latitud y longitud específicas.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.fr/index.html b/About.fr/index.html index 680fceef9..fa33cd41b 100644 --- a/About.fr/index.html +++ b/About.fr/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo est un système open-source de surveillance et de régulation de l'environnement conçu pour fonctionner sur des ordinateurs monocartes, notamment le Raspberry Pi.

Développé à l'origine pour la culture de champignons comestibles, Mycodo s'est développé pour faire beaucoup plus. Le système se compose de deux parties, un backend (démon) et un frontend (serveur web). Le backend effectue des tâches telles que l'acquisition de mesures à partir de capteurs et de dispositifs et la coordination d'un ensemble diversifié de réponses à ces mesures, y compris la capacité de moduler les sorties (commutation de relais, génération de signaux PWM, fonctionnement de pompes, commutation de prises sans fil, publication/abonnement à MQTT, entre autres), de réguler les conditions environnementales avec un contrôle PID, de programmer des minuteries, de capturer des photos et de diffuser des vidéos, de déclencher des actions lorsque les mesures répondent à certaines conditions, etc. Le frontal héberge une interface web qui permet de visualiser et de configurer les appareils à partir de n'importe quel navigateur.

Il existe un certain nombre d'utilisations différentes de Mycodo. Certains utilisateurs stockent simplement les mesures des capteurs pour surveiller les conditions à distance, d'autres régulent les conditions environnementales d'un espace physique, tandis que d'autres capturent des photographies activées par le mouvement ou en time-lapse, entre autres utilisations.

Les contrôleurs d'entrée acquièrent des mesures et les stockent dans la base de données de séries temporelles InfluxDB. Les mesures proviennent généralement de capteurs, mais peuvent également être configurées pour utiliser la valeur de retour de commandes Linux Bash ou Python, ou d'équations mathématiques, ce qui en fait un système très dynamique d'acquisition et de génération de données.

Les contrôleurs de sortie produisent des changements sur les broches d'entrée/sortie générales (GPIO) ou peuvent être configurés pour exécuter des commandes Linux Bash ou Python, ce qui permet une variété d'utilisations potentielles. Il existe différents types de sorties : la simple commutation des broches GPIO (HAUT/BAS), la génération de signaux modulés en largeur d'impulsion (PWM), le contrôle de pompes péristaltiques, la publication MQTT, etc.

Lorsque les entrées et les sorties sont combinées, les contrôleurs de fonction peuvent être utilisés pour créer des boucles de rétroaction qui utilisent le dispositif de sortie pour moduler une condition environnementale mesurée par l'entrée. Certaines entrées peuvent être couplées à certaines sorties pour créer une variété d'applications de contrôle et de régulation différentes. Au-delà de la simple régulation, les méthodes peuvent être utilisées pour créer un point de consigne changeant au fil du temps, permettant des choses telles que les thermocycleurs, les fours de refusion, la simulation environnementale pour les terrariums, la fermentation ou le séchage des aliments et des boissons, et la cuisson des aliments (sous-vide), pour n'en citer que quelques-unes.

Les déclencheurs peuvent être configurés pour activer des événements en fonction de dates et d'heures spécifiques, en fonction de durées, ou du lever/coucher du soleil à une latitude et une longitude spécifiques.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo est un système open-source de surveillance et de régulation de l'environnement conçu pour fonctionner sur des ordinateurs monocartes, notamment le Raspberry Pi.

Développé à l'origine pour la culture de champignons comestibles, Mycodo s'est développé pour faire beaucoup plus. Le système se compose de deux parties, un backend (démon) et un frontend (serveur web). Le backend effectue des tâches telles que l'acquisition de mesures à partir de capteurs et de dispositifs et la coordination d'un ensemble diversifié de réponses à ces mesures, y compris la capacité de moduler les sorties (commutation de relais, génération de signaux PWM, fonctionnement de pompes, commutation de prises sans fil, publication/abonnement à MQTT, entre autres), de réguler les conditions environnementales avec un contrôle PID, de programmer des minuteries, de capturer des photos et de diffuser des vidéos, de déclencher des actions lorsque les mesures répondent à certaines conditions, etc. Le frontal héberge une interface web qui permet de visualiser et de configurer les appareils à partir de n'importe quel navigateur.

Il existe un certain nombre d'utilisations différentes de Mycodo. Certains utilisateurs stockent simplement les mesures des capteurs pour surveiller les conditions à distance, d'autres régulent les conditions environnementales d'un espace physique, tandis que d'autres capturent des photographies activées par le mouvement ou en time-lapse, entre autres utilisations.

Les contrôleurs d'entrée acquièrent des mesures et les stockent dans la base de données de séries temporelles InfluxDB. Les mesures proviennent généralement de capteurs, mais peuvent également être configurées pour utiliser la valeur de retour de commandes Linux Bash ou Python, ou d'équations mathématiques, ce qui en fait un système très dynamique d'acquisition et de génération de données.

Les contrôleurs de sortie produisent des changements sur les broches d'entrée/sortie générales (GPIO) ou peuvent être configurés pour exécuter des commandes Linux Bash ou Python, ce qui permet une variété d'utilisations potentielles. Il existe différents types de sorties : la simple commutation des broches GPIO (HAUT/BAS), la génération de signaux modulés en largeur d'impulsion (PWM), le contrôle de pompes péristaltiques, la publication MQTT, etc.

Lorsque les entrées et les sorties sont combinées, les contrôleurs de fonction peuvent être utilisés pour créer des boucles de rétroaction qui utilisent le dispositif de sortie pour moduler une condition environnementale mesurée par l'entrée. Certaines entrées peuvent être couplées à certaines sorties pour créer une variété d'applications de contrôle et de régulation différentes. Au-delà de la simple régulation, les méthodes peuvent être utilisées pour créer un point de consigne changeant au fil du temps, permettant des choses telles que les thermocycleurs, les fours de refusion, la simulation environnementale pour les terrariums, la fermentation ou le séchage des aliments et des boissons, et la cuisson des aliments (sous-vide), pour n'en citer que quelques-unes.

Les déclencheurs peuvent être configurés pour activer des événements en fonction de dates et d'heures spécifiques, en fonction de durées, ou du lever/coucher du soleil à une latitude et une longitude spécifiques.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.id/index.html b/About.id/index.html index 86c79cc6a..f0cf344e0 100644 --- a/About.id/index.html +++ b/About.id/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo adalah sistem pemantauan dan pengaturan lingkungan bersumber terbuka yang dibangun untuk dijalankan pada komputer papan tunggal, khususnya Raspberry Pi.

Awalnya dikembangkan untuk membudidayakan jamur yang dapat dimakan, Mycodo telah berkembang untuk melakukan lebih banyak lagi. Sistem ini terdiri atas dua bagian, backend (daemon) dan frontend (server web). Backend melakukan tugas-tugas seperti memperoleh pengukuran dari sensor dan perangkat dan mengoordinasikan beragam respons terhadap pengukuran tersebut, termasuk kemampuan untuk memodulasi output (mengganti relay, menghasilkan sinyal PWM, mengoperasikan pompa, mengganti outlet nirkabel, menerbitkan / berlangganan MQTT, antara lain), mengatur kondisi lingkungan dengan kontrol PID, menjadwalkan pengatur waktu, mengambil foto dan streaming video, memicu tindakan ketika pengukuran memenuhi kondisi tertentu, dan banyak lagi. Frontend menjadi tuan rumah antarmuka web yang memungkinkan tampilan dan konfigurasi dari perangkat berkemampuan browser apa pun.

Ada sejumlah kegunaan berbeda untuk Mycodo. Beberapa pengguna hanya menyimpan pengukuran sensor untuk memantau kondisi dari jarak jauh, yang lain mengatur kondisi lingkungan ruang fisik, sementara yang lain menangkap fotografi yang diaktifkan gerakan atau selang waktu, di antara kegunaan lainnya.

Pengontrol input memperoleh pengukuran dan menyimpannya dalam basis data deret waktu InfluxDB. Pengukuran biasanya berasal dari sensor, tetapi juga dapat dikonfigurasi untuk menggunakan nilai balik dari perintah Linux Bash atau Python, atau persamaan matematika, menjadikannya sistem yang sangat dinamis untuk memperoleh dan menghasilkan data.

Pengontrol output menghasilkan perubahan pada pin input/output umum (GPIO) atau dapat dikonfigurasi untuk menjalankan perintah Linux Bash atau Python, memungkinkan berbagai potensi penggunaan. Ada beberapa jenis output yang berbeda: peralihan sederhana pin GPIO (HIGH/LOW), menghasilkan sinyal pulse-width modulated (PWM), mengendalikan pompa peristaltik, penerbitan MQTT, dan banyak lagi.

Ketika Input dan Output digabungkan, Pengontrol fungsi dapat digunakan untuk membuat loop umpan balik yang menggunakan perangkat Output untuk memodulasi kondisi lingkungan yang diukur Input. Input tertentu dapat digabungkan dengan Output tertentu untuk membuat berbagai aplikasi kontrol dan regulasi yang berbeda. Di luar regulasi sederhana, Metode dapat digunakan untuk membuat setpoint yang berubah dari waktu ke waktu, memungkinkan hal-hal seperti thermal cyclers, oven reflow, simulasi lingkungan untuk terarium, fermentasi atau pengawetan makanan dan minuman, dan memasak makanan (sous-vide), untuk beberapa nama.

Pemicu bisa ditetapkan untuk mengaktifkan peristiwa berdasarkan tanggal dan waktu tertentu, menurut durasi waktu, atau matahari terbit/terbenam pada garis lintang dan garis bujur tertentu.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo adalah sistem pemantauan dan pengaturan lingkungan bersumber terbuka yang dibangun untuk dijalankan pada komputer papan tunggal, khususnya Raspberry Pi.

Awalnya dikembangkan untuk membudidayakan jamur yang dapat dimakan, Mycodo telah berkembang untuk melakukan lebih banyak lagi. Sistem ini terdiri atas dua bagian, backend (daemon) dan frontend (server web). Backend melakukan tugas-tugas seperti memperoleh pengukuran dari sensor dan perangkat dan mengoordinasikan beragam respons terhadap pengukuran tersebut, termasuk kemampuan untuk memodulasi output (mengganti relay, menghasilkan sinyal PWM, mengoperasikan pompa, mengganti outlet nirkabel, menerbitkan / berlangganan MQTT, antara lain), mengatur kondisi lingkungan dengan kontrol PID, menjadwalkan pengatur waktu, mengambil foto dan streaming video, memicu tindakan ketika pengukuran memenuhi kondisi tertentu, dan banyak lagi. Frontend menjadi tuan rumah antarmuka web yang memungkinkan tampilan dan konfigurasi dari perangkat berkemampuan browser apa pun.

Ada sejumlah kegunaan berbeda untuk Mycodo. Beberapa pengguna hanya menyimpan pengukuran sensor untuk memantau kondisi dari jarak jauh, yang lain mengatur kondisi lingkungan ruang fisik, sementara yang lain menangkap fotografi yang diaktifkan gerakan atau selang waktu, di antara kegunaan lainnya.

Pengontrol input memperoleh pengukuran dan menyimpannya dalam basis data deret waktu InfluxDB. Pengukuran biasanya berasal dari sensor, tetapi juga dapat dikonfigurasi untuk menggunakan nilai balik dari perintah Linux Bash atau Python, atau persamaan matematika, menjadikannya sistem yang sangat dinamis untuk memperoleh dan menghasilkan data.

Pengontrol output menghasilkan perubahan pada pin input/output umum (GPIO) atau dapat dikonfigurasi untuk menjalankan perintah Linux Bash atau Python, memungkinkan berbagai potensi penggunaan. Ada beberapa jenis output yang berbeda: peralihan sederhana pin GPIO (HIGH/LOW), menghasilkan sinyal pulse-width modulated (PWM), mengendalikan pompa peristaltik, penerbitan MQTT, dan banyak lagi.

Ketika Input dan Output digabungkan, Pengontrol fungsi dapat digunakan untuk membuat loop umpan balik yang menggunakan perangkat Output untuk memodulasi kondisi lingkungan yang diukur Input. Input tertentu dapat digabungkan dengan Output tertentu untuk membuat berbagai aplikasi kontrol dan regulasi yang berbeda. Di luar regulasi sederhana, Metode dapat digunakan untuk membuat setpoint yang berubah dari waktu ke waktu, memungkinkan hal-hal seperti thermal cyclers, oven reflow, simulasi lingkungan untuk terarium, fermentasi atau pengawetan makanan dan minuman, dan memasak makanan (sous-vide), untuk beberapa nama.

Pemicu bisa ditetapkan untuk mengaktifkan peristiwa berdasarkan tanggal dan waktu tertentu, menurut durasi waktu, atau matahari terbit/terbenam pada garis lintang dan garis bujur tertentu.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.it/index.html b/About.it/index.html index 125f51e83..f57ba2a86 100644 --- a/About.it/index.html +++ b/About.it/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo è un sistema open-source di monitoraggio e regolazione ambientale costruito per funzionare su computer a scheda singola, in particolare il Raspberry Pi.

Originariamente sviluppato per la coltivazione di funghi commestibili, Mycodo è cresciuto per fare molto di più. Il sistema è composto da due parti, un backend (demone) e un frontend (server web). Il backend esegue compiti quali l'acquisizione di misure da sensori e dispositivi e il coordinamento di una serie di risposte a tali misure, tra cui la capacità di modulare le uscite (commutare relè, generare segnali PWM, azionare pompe, commutare prese wireless, pubblicare/sottoscrivere a MQTT, tra le altre cose), regolare le condizioni ambientali con il controllo PID, programmare timer, catturare foto e trasmettere video, attivare azioni quando le misure soddisfano determinate condizioni e altro ancora. Il frontend ospita un'interfaccia web che consente la visualizzazione e la configurazione da qualsiasi dispositivo abilitato al browser.

Mycodo può essere utilizzato in diversi modi. Alcuni utenti si limitano a memorizzare le misure dei sensori per monitorare le condizioni a distanza, altri regolano le condizioni ambientali di uno spazio fisico, altri ancora scattano fotografie in movimento o in time-lapse, tra gli altri usi.

I controllori di ingresso acquisiscono le misure e le memorizzano nel database delle serie temporali InfluxDB. Le misure provengono in genere da sensori, ma possono anche essere configurate per utilizzare il valore di ritorno di comandi Linux Bash o Python, o equazioni matematiche, rendendo questo sistema molto dinamico per l'acquisizione e la generazione di dati.

I controllori di uscita producono modifiche ai pin di ingresso/uscita generale (GPIO) o possono essere configurati per eseguire comandi Linux Bash o Python, consentendo una varietà di usi potenziali. Esistono diversi tipi di uscite: semplice commutazione dei pin GPIO (ALTO/BASSO), generazione di segnali modulati a larghezza di impulso (PWM), controllo di pompe peristaltiche, pubblicazione MQTT e altro ancora.

Quando gli ingressi e le uscite sono combinati, i controllori di funzione possono essere utilizzati per creare anelli di retroazione che utilizzano il dispositivo di uscita per modulare una condizione ambientale misurata dall'ingresso. Alcuni ingressi possono essere abbinati a determinate uscite per creare una serie di applicazioni di controllo e regolazione diverse. Oltre alla semplice regolazione, i metodi possono essere utilizzati per creare un setpoint variabile nel tempo, consentendo di realizzare applicazioni come i termociclatori, i forni a rifusione, la simulazione ambientale per i terrari, la fermentazione o la stagionatura di alimenti e bevande e la cottura di cibi (sous-vide), per citarne alcune.

I trigger possono essere impostati per attivare eventi in base a date e orari specifici, in base alla durata del tempo o all'alba/tramonto a una specifica latitudine e longitudine.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo è un sistema open-source di monitoraggio e regolazione ambientale costruito per funzionare su computer a scheda singola, in particolare il Raspberry Pi.

Originariamente sviluppato per la coltivazione di funghi commestibili, Mycodo è cresciuto per fare molto di più. Il sistema è composto da due parti, un backend (demone) e un frontend (server web). Il backend esegue compiti quali l'acquisizione di misure da sensori e dispositivi e il coordinamento di una serie di risposte a tali misure, tra cui la capacità di modulare le uscite (commutare relè, generare segnali PWM, azionare pompe, commutare prese wireless, pubblicare/sottoscrivere a MQTT, tra le altre cose), regolare le condizioni ambientali con il controllo PID, programmare timer, catturare foto e trasmettere video, attivare azioni quando le misure soddisfano determinate condizioni e altro ancora. Il frontend ospita un'interfaccia web che consente la visualizzazione e la configurazione da qualsiasi dispositivo abilitato al browser.

Mycodo può essere utilizzato in diversi modi. Alcuni utenti si limitano a memorizzare le misure dei sensori per monitorare le condizioni a distanza, altri regolano le condizioni ambientali di uno spazio fisico, altri ancora scattano fotografie in movimento o in time-lapse, tra gli altri usi.

I controllori di ingresso acquisiscono le misure e le memorizzano nel database delle serie temporali InfluxDB. Le misure provengono in genere da sensori, ma possono anche essere configurate per utilizzare il valore di ritorno di comandi Linux Bash o Python, o equazioni matematiche, rendendo questo sistema molto dinamico per l'acquisizione e la generazione di dati.

I controllori di uscita producono modifiche ai pin di ingresso/uscita generale (GPIO) o possono essere configurati per eseguire comandi Linux Bash o Python, consentendo una varietà di usi potenziali. Esistono diversi tipi di uscite: semplice commutazione dei pin GPIO (ALTO/BASSO), generazione di segnali modulati a larghezza di impulso (PWM), controllo di pompe peristaltiche, pubblicazione MQTT e altro ancora.

Quando gli ingressi e le uscite sono combinati, i controllori di funzione possono essere utilizzati per creare anelli di retroazione che utilizzano il dispositivo di uscita per modulare una condizione ambientale misurata dall'ingresso. Alcuni ingressi possono essere abbinati a determinate uscite per creare una serie di applicazioni di controllo e regolazione diverse. Oltre alla semplice regolazione, i metodi possono essere utilizzati per creare un setpoint variabile nel tempo, consentendo di realizzare applicazioni come i termociclatori, i forni a rifusione, la simulazione ambientale per i terrari, la fermentazione o la stagionatura di alimenti e bevande e la cottura di cibi (sous-vide), per citarne alcune.

I trigger possono essere impostati per attivare eventi in base a date e orari specifici, in base alla durata del tempo o all'alba/tramonto a una specifica latitudine e longitudine.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.nl/index.html b/About.nl/index.html index 42a07d32a..18b08b1d9 100644 --- a/About.nl/index.html +++ b/About.nl/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo is een open-source milieubewakings- en regelsysteem dat is gebouwd om te draaien op single-board computers, met name de Raspberry Pi.

Mycodo is oorspronkelijk ontwikkeld voor het kweken van eetbare paddenstoelen, maar is uitgegroeid tot veel meer. Het systeem bestaat uit twee delen, een backend (daemon) en een frontend (webserver). De backend voert taken uit zoals het verzamelen van metingen van sensoren en apparaten en het coördineren van een diverse reeks reacties op die metingen, waaronder de mogelijkheid om uitgangen te moduleren (relais schakelen, PWM-signalen genereren, pompen bedienen, draadloze stopcontacten schakelen, publiceren/aanmelden voor MQTT, enzovoort), omgevingscondities regelen met PID-regeling, timers plannen, foto's en video's vastleggen, acties activeren wanneer metingen aan bepaalde voorwaarden voldoen, en nog veel meer. De frontend bevat een webinterface die weergave en configuratie vanaf elk apparaat met een browser mogelijk maakt.

Mycodo wordt op verschillende manieren gebruikt. Sommige gebruikers slaan gewoon sensormetingen op om de omstandigheden op afstand te controleren, anderen regelen de omgevingscondities van een fysieke ruimte, en weer anderen leggen onder meer bewegingsgeactiveerde of time-lapse fotografie vast.

Input controllers verwerven metingen en slaan deze op in de InfluxDB tijdreeksdatabase. Metingen komen meestal van sensoren, maar kunnen ook worden geconfigureerd om de retourwaarde van Linux Bash of Python commando's, of wiskundige vergelijkingen te gebruiken, waardoor dit een zeer dynamisch systeem is voor het verwerven en genereren van gegevens.

Output controllers produceren veranderingen aan de algemene input/output (GPIO) pinnen of kunnen worden geconfigureerd om Linux Bash of Python commando's uit te voeren, waardoor een verscheidenheid aan mogelijke toepassingen mogelijk is. Er zijn een paar verschillende soorten uitgangen: eenvoudig schakelen van GPIO-pinnen (HIGH/LOW), genereren van pulsbreedtegemoduleerde (PWM) signalen, aansturen van slangenpompen, MQTT-publicatie, en meer.

Wanneer ingangen en uitgangen worden gecombineerd, kunnen functieregelaars worden gebruikt om terugkoppellussen te creëren die de uitgang gebruiken om een door de ingang gemeten omgevingsconditie te moduleren. Bepaalde ingangen kunnen aan bepaalde uitgangen worden gekoppeld om een verscheidenheid van verschillende regel- en toezichttoepassingen te creëren. Naast eenvoudige regeling kunnen methoden worden gebruikt om een in de tijd veranderend instelpunt te creëren, waardoor bijvoorbeeld thermische cyclers, reflow-ovens, omgevingssimulatie voor terraria, fermentatie of uitharding van voedsel en dranken, en het koken van voedsel (sous-vide) mogelijk worden.

Triggers kunnen worden ingesteld om gebeurtenissen te activeren op basis van specifieke data en tijden, volgens tijdsduur, of de zonsopgang/ondergang op een specifieke breedte- en lengtegraad.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo is een open-source milieubewakings- en regelsysteem dat is gebouwd om te draaien op single-board computers, met name de Raspberry Pi.

Mycodo is oorspronkelijk ontwikkeld voor het kweken van eetbare paddenstoelen, maar is uitgegroeid tot veel meer. Het systeem bestaat uit twee delen, een backend (daemon) en een frontend (webserver). De backend voert taken uit zoals het verzamelen van metingen van sensoren en apparaten en het coördineren van een diverse reeks reacties op die metingen, waaronder de mogelijkheid om uitgangen te moduleren (relais schakelen, PWM-signalen genereren, pompen bedienen, draadloze stopcontacten schakelen, publiceren/aanmelden voor MQTT, enzovoort), omgevingscondities regelen met PID-regeling, timers plannen, foto's en video's vastleggen, acties activeren wanneer metingen aan bepaalde voorwaarden voldoen, en nog veel meer. De frontend bevat een webinterface die weergave en configuratie vanaf elk apparaat met een browser mogelijk maakt.

Mycodo wordt op verschillende manieren gebruikt. Sommige gebruikers slaan gewoon sensormetingen op om de omstandigheden op afstand te controleren, anderen regelen de omgevingscondities van een fysieke ruimte, en weer anderen leggen onder meer bewegingsgeactiveerde of time-lapse fotografie vast.

Input controllers verwerven metingen en slaan deze op in de InfluxDB tijdreeksdatabase. Metingen komen meestal van sensoren, maar kunnen ook worden geconfigureerd om de retourwaarde van Linux Bash of Python commando's, of wiskundige vergelijkingen te gebruiken, waardoor dit een zeer dynamisch systeem is voor het verwerven en genereren van gegevens.

Output controllers produceren veranderingen aan de algemene input/output (GPIO) pinnen of kunnen worden geconfigureerd om Linux Bash of Python commando's uit te voeren, waardoor een verscheidenheid aan mogelijke toepassingen mogelijk is. Er zijn een paar verschillende soorten uitgangen: eenvoudig schakelen van GPIO-pinnen (HIGH/LOW), genereren van pulsbreedtegemoduleerde (PWM) signalen, aansturen van slangenpompen, MQTT-publicatie, en meer.

Wanneer ingangen en uitgangen worden gecombineerd, kunnen functieregelaars worden gebruikt om terugkoppellussen te creëren die de uitgang gebruiken om een door de ingang gemeten omgevingsconditie te moduleren. Bepaalde ingangen kunnen aan bepaalde uitgangen worden gekoppeld om een verscheidenheid van verschillende regel- en toezichttoepassingen te creëren. Naast eenvoudige regeling kunnen methoden worden gebruikt om een in de tijd veranderend instelpunt te creëren, waardoor bijvoorbeeld thermische cyclers, reflow-ovens, omgevingssimulatie voor terraria, fermentatie of uitharding van voedsel en dranken, en het koken van voedsel (sous-vide) mogelijk worden.

Triggers kunnen worden ingesteld om gebeurtenissen te activeren op basis van specifieke data en tijden, volgens tijdsduur, of de zonsopgang/ondergang op een specifieke breedte- en lengtegraad.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.nn/index.html b/About.nn/index.html index 8c9bfd86c..e593744a0 100644 --- a/About.nn/index.html +++ b/About.nn/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo is an open-source environmental monitoring and regulation system that was built to run on single-board computers, specifically the Raspberry Pi.

Originally developed for cultivating edible mushrooms, Mycodo has grown to do much more. The system consists of two parts, a backend (daemon) and a frontend (web server). The backend performs tasks such as acquiring measurements from sensors and devices and coordinating a diverse set of responses to those measurements, including the ability to modulate outputs (switch relays, generate PWM signals, operate pumps, switch wireless outlets, publish/subscribe to MQTT, among others), regulate environmental conditions with PID control, schedule timers, capture photos and stream video, trigger actions when measurements meet certain conditions, and more. The frontend hosts a web interface that enables viewing and configuration from any browser-enabled device.

There are a number of different uses for Mycodo. Some users simply store sensor measurements to monitor conditions remotely, others regulate the environmental conditions of a physical space, while others capture motion-activated or time-lapse photography, among other uses.

Input controllers acquire measurements and store them in the InfluxDB time series database. Measurements typically come from sensors, but may also be configured to use the return value of Linux Bash or Python commands, or math equations, making this a very dynamic system for acquiring and generating data.

Output controllers produce changes to the general input/output (GPIO) pins or may be configured to execute Linux Bash or Python commands, enabling a variety of potential uses. There are a few different types of outputs: simple switching of GPIO pins (HIGH/LOW), generating pulse-width modulated (PWM) signals, controlling peristaltic pumps, MQTT publishing, and more.

When Inputs and Outputs are combined, Function controllers may be used to create feedback loops that uses the Output device to modulate an environmental condition the Input measures. Certain Inputs may be coupled with certain Outputs to create a variety of different control and regulation applications. Beyond simple regulation, Methods may be used to create a changing setpoint over time, enabling such things as thermal cyclers, reflow ovens, environmental simulation for terrariums, food and beverage fermentation or curing, and cooking food (sous-vide), to name a few.

Triggers can be set to activate events based on specific dates and times, according to durations of time, or the sunrise/sunset at a specific latitude and longitude.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo is an open-source environmental monitoring and regulation system that was built to run on single-board computers, specifically the Raspberry Pi.

Originally developed for cultivating edible mushrooms, Mycodo has grown to do much more. The system consists of two parts, a backend (daemon) and a frontend (web server). The backend performs tasks such as acquiring measurements from sensors and devices and coordinating a diverse set of responses to those measurements, including the ability to modulate outputs (switch relays, generate PWM signals, operate pumps, switch wireless outlets, publish/subscribe to MQTT, among others), regulate environmental conditions with PID control, schedule timers, capture photos and stream video, trigger actions when measurements meet certain conditions, and more. The frontend hosts a web interface that enables viewing and configuration from any browser-enabled device.

There are a number of different uses for Mycodo. Some users simply store sensor measurements to monitor conditions remotely, others regulate the environmental conditions of a physical space, while others capture motion-activated or time-lapse photography, among other uses.

Input controllers acquire measurements and store them in the InfluxDB time series database. Measurements typically come from sensors, but may also be configured to use the return value of Linux Bash or Python commands, or math equations, making this a very dynamic system for acquiring and generating data.

Output controllers produce changes to the general input/output (GPIO) pins or may be configured to execute Linux Bash or Python commands, enabling a variety of potential uses. There are a few different types of outputs: simple switching of GPIO pins (HIGH/LOW), generating pulse-width modulated (PWM) signals, controlling peristaltic pumps, MQTT publishing, and more.

When Inputs and Outputs are combined, Function controllers may be used to create feedback loops that uses the Output device to modulate an environmental condition the Input measures. Certain Inputs may be coupled with certain Outputs to create a variety of different control and regulation applications. Beyond simple regulation, Methods may be used to create a changing setpoint over time, enabling such things as thermal cyclers, reflow ovens, environmental simulation for terrariums, food and beverage fermentation or curing, and cooking food (sous-vide), to name a few.

Triggers can be set to activate events based on specific dates and times, according to durations of time, or the sunrise/sunset at a specific latitude and longitude.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.pl/index.html b/About.pl/index.html index ed79713b7..5a66263dc 100644 --- a/About.pl/index.html +++ b/About.pl/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo to open-source'owy system monitorowania i regulacji środowiska, który został zbudowany do działania na komputerach jednopłytkowych, a konkretnie na Raspberry Pi.

Pierwotnie opracowany do uprawy grzybów jadalnych, Mycodo rozwinął się do znacznie większych możliwości. System składa się z dwóch części, backendu (demona) i frontu (serwera internetowego). Backend wykonuje takie zadania, jak pobieranie pomiarów z czujników i urządzeń oraz koordynacja różnorodnych reakcji na te pomiary, w tym możliwość modulowania wyjść (przełączanie przekaźników, generowanie sygnałów PWM, obsługa pomp, przełączanie gniazdek bezprzewodowych, publikowanie/podpisywanie się do MQTT, między innymi), regulowanie warunków środowiskowych za pomocą kontroli PID, harmonogramy, przechwytywanie zdjęć i strumieniowanie wideo, wyzwalanie działań, gdy pomiary spełniają określone warunki, i wiele innych. Frontend hostuje interfejs webowy, który umożliwia podgląd i konfigurację z dowolnego urządzenia obsługującego przeglądarkę.

Istnieje wiele różnych zastosowań dla Mycodo. Niektórzy użytkownicy po prostu przechowują pomiary czujników, aby zdalnie monitorować warunki, inni regulują warunki środowiskowe w przestrzeni fizycznej, a jeszcze inni rejestrują fotografię aktywowaną ruchem lub poklatkową, wśród innych zastosowań.

Kontrolery wejściowe pozyskują pomiary i przechowują je w bazie danych serii czasowych InfluxDB. Pomiary pochodzą zazwyczaj z czujników, ale mogą być również skonfigurowane tak, aby używać wartości zwrotnej poleceń Linux Bash lub Python, lub równań matematycznych, co sprawia, że jest to bardzo dynamiczny system pozyskiwania i generowania danych.

Kontrolery wyjść wytwarzają zmiany na pinach ogólnego wejścia/wyjścia (GPIO) lub mogą być skonfigurowane do wykonywania poleceń Linux Bash lub Python, umożliwiając wiele potencjalnych zastosowań. Istnieje kilka różnych typów wyjść: proste przełączanie pinów GPIO (HIGH/LOW), generowanie sygnałów modulowanych w szerokości impulsu (PWM), sterowanie pompami perystaltycznymi, publikowanie MQTT i inne.

Gdy wejścia i wyjścia są połączone, sterowniki funkcyjne mogą być używane do tworzenia pętli sprzężenia zwrotnego, które wykorzystuje urządzenie wyjściowe do modulowania warunków środowiskowych mierzonych przez wejście. Niektóre wejścia mogą być połączone z niektórymi wyjściami, aby stworzyć wiele różnych zastosowań w zakresie sterowania i regulacji. Poza prostą regulacją, Metody mogą być używane do tworzenia zmieniających się w czasie wartości zadanych, umożliwiając takie rzeczy jak termocyklery, piece rozpływowe, symulację środowiska dla terrariów, fermentację żywności i napojów lub utwardzanie, oraz gotowanie żywności (sous-vide), aby wymienić tylko kilka.

Wyzwalacze można ustawić tak, aby aktywowały zdarzenia w oparciu o określone daty i godziny, według czasu trwania lub wschodu/zachodu słońca na określonej szerokości i długości geograficznej.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo to open-source'owy system monitorowania i regulacji środowiska, który został zbudowany do działania na komputerach jednopłytkowych, a konkretnie na Raspberry Pi.

Pierwotnie opracowany do uprawy grzybów jadalnych, Mycodo rozwinął się do znacznie większych możliwości. System składa się z dwóch części, backendu (demona) i frontu (serwera internetowego). Backend wykonuje takie zadania, jak pobieranie pomiarów z czujników i urządzeń oraz koordynacja różnorodnych reakcji na te pomiary, w tym możliwość modulowania wyjść (przełączanie przekaźników, generowanie sygnałów PWM, obsługa pomp, przełączanie gniazdek bezprzewodowych, publikowanie/podpisywanie się do MQTT, między innymi), regulowanie warunków środowiskowych za pomocą kontroli PID, harmonogramy, przechwytywanie zdjęć i strumieniowanie wideo, wyzwalanie działań, gdy pomiary spełniają określone warunki, i wiele innych. Frontend hostuje interfejs webowy, który umożliwia podgląd i konfigurację z dowolnego urządzenia obsługującego przeglądarkę.

Istnieje wiele różnych zastosowań dla Mycodo. Niektórzy użytkownicy po prostu przechowują pomiary czujników, aby zdalnie monitorować warunki, inni regulują warunki środowiskowe w przestrzeni fizycznej, a jeszcze inni rejestrują fotografię aktywowaną ruchem lub poklatkową, wśród innych zastosowań.

Kontrolery wejściowe pozyskują pomiary i przechowują je w bazie danych serii czasowych InfluxDB. Pomiary pochodzą zazwyczaj z czujników, ale mogą być również skonfigurowane tak, aby używać wartości zwrotnej poleceń Linux Bash lub Python, lub równań matematycznych, co sprawia, że jest to bardzo dynamiczny system pozyskiwania i generowania danych.

Kontrolery wyjść wytwarzają zmiany na pinach ogólnego wejścia/wyjścia (GPIO) lub mogą być skonfigurowane do wykonywania poleceń Linux Bash lub Python, umożliwiając wiele potencjalnych zastosowań. Istnieje kilka różnych typów wyjść: proste przełączanie pinów GPIO (HIGH/LOW), generowanie sygnałów modulowanych w szerokości impulsu (PWM), sterowanie pompami perystaltycznymi, publikowanie MQTT i inne.

Gdy wejścia i wyjścia są połączone, sterowniki funkcyjne mogą być używane do tworzenia pętli sprzężenia zwrotnego, które wykorzystuje urządzenie wyjściowe do modulowania warunków środowiskowych mierzonych przez wejście. Niektóre wejścia mogą być połączone z niektórymi wyjściami, aby stworzyć wiele różnych zastosowań w zakresie sterowania i regulacji. Poza prostą regulacją, Metody mogą być używane do tworzenia zmieniających się w czasie wartości zadanych, umożliwiając takie rzeczy jak termocyklery, piece rozpływowe, symulację środowiska dla terrariów, fermentację żywności i napojów lub utwardzanie, oraz gotowanie żywności (sous-vide), aby wymienić tylko kilka.

Wyzwalacze można ustawić tak, aby aktywowały zdarzenia w oparciu o określone daty i godziny, według czasu trwania lub wschodu/zachodu słońca na określonej szerokości i długości geograficznej.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.pt/index.html b/About.pt/index.html index 7ecf0288a..f24071818 100644 --- a/About.pt/index.html +++ b/About.pt/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo é um sistema de monitorização e regulação ambiental de código aberto que foi construído para funcionar em computadores de placa única, especificamente o Raspberry Pi.

Originalmente desenvolvido para o cultivo de cogumelos comestíveis, Mycodo tem crescido para fazer muito mais. O sistema consiste em duas partes, um backend (daemon) e um frontend (servidor web). O backend executa tarefas tais como adquirir medições de sensores e dispositivos e coordenar um conjunto diversificado de respostas a essas medições, incluindo a capacidade de modular saídas (comutar relés, gerar sinais PWM, operar bombas, mudar saídas sem fios, publicar/assinar ao MQTT, entre outros), regular as condições ambientais com controlo PID, programar temporizadores, capturar fotos e transmitir vídeo, desencadear acções quando as medições satisfazem determinadas condições, e muito mais. O frontend aloja uma interface web que permite a visualização e configuração a partir de qualquer dispositivo activado por browser.

Existem várias utilizações diferentes para Mycodo. Alguns utilizadores simplesmente armazenam medições de sensores para monitorizar as condições à distância, outros regulam as condições ambientais de um espaço físico, enquanto outros captam fotografia activada por movimento ou time-lapse, entre outras utilizações.

Os controladores de entrada adquirem medidas e armazenam-nas na base de dados de séries temporais InfluxDB. As medições vêm tipicamente de sensores, mas também podem ser configuradas para utilizar o valor de retorno dos comandos Linux Bash ou Python, ou equações matemáticas, tornando-o um sistema muito dinâmico para a aquisição e geração de dados.

Os controladores de saída produzem alterações nos pinos de entrada/saída geral (GPIO) ou podem ser configurados para executar comandos Linux Bash ou Python, permitindo uma variedade de usos potenciais. Existem alguns tipos diferentes de saídas: simples comutação de pinos GPIO (HIGH/LOW), geração de sinais de largura de pulso modulada (PWM), controlo de bombas peristálticas, publicação de MQTT, e muito mais.

Quando as Entradas e Saídas são combinadas, os controladores de funções podem ser utilizados para criar laços de feedback que utilizam o dispositivo de Saída para modular uma condição ambiental as medidas de Entrada. Certas Entradas podem ser acopladas a certas Saídas para criar uma variedade de diferentes aplicações de controlo e regulação. Para além da regulação simples, podem ser utilizados métodos para criar um ponto de ajuste variável ao longo do tempo, permitindo coisas como termocicladores, fornos de refluxo, simulação ambiental para terrários, fermentação ou cura de alimentos e bebidas, e cozinhar alimentos (sous-vide), para citar alguns.

Os gatilhos podem ser definidos para activar eventos com base em datas e horas específicas, de acordo com durações de tempo, ou o nascer/pôr-do-sol a uma latitude e longitude específicas.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo é um sistema de monitorização e regulação ambiental de código aberto que foi construído para funcionar em computadores de placa única, especificamente o Raspberry Pi.

Originalmente desenvolvido para o cultivo de cogumelos comestíveis, Mycodo tem crescido para fazer muito mais. O sistema consiste em duas partes, um backend (daemon) e um frontend (servidor web). O backend executa tarefas tais como adquirir medições de sensores e dispositivos e coordenar um conjunto diversificado de respostas a essas medições, incluindo a capacidade de modular saídas (comutar relés, gerar sinais PWM, operar bombas, mudar saídas sem fios, publicar/assinar ao MQTT, entre outros), regular as condições ambientais com controlo PID, programar temporizadores, capturar fotos e transmitir vídeo, desencadear acções quando as medições satisfazem determinadas condições, e muito mais. O frontend aloja uma interface web que permite a visualização e configuração a partir de qualquer dispositivo activado por browser.

Existem várias utilizações diferentes para Mycodo. Alguns utilizadores simplesmente armazenam medições de sensores para monitorizar as condições à distância, outros regulam as condições ambientais de um espaço físico, enquanto outros captam fotografia activada por movimento ou time-lapse, entre outras utilizações.

Os controladores de entrada adquirem medidas e armazenam-nas na base de dados de séries temporais InfluxDB. As medições vêm tipicamente de sensores, mas também podem ser configuradas para utilizar o valor de retorno dos comandos Linux Bash ou Python, ou equações matemáticas, tornando-o um sistema muito dinâmico para a aquisição e geração de dados.

Os controladores de saída produzem alterações nos pinos de entrada/saída geral (GPIO) ou podem ser configurados para executar comandos Linux Bash ou Python, permitindo uma variedade de usos potenciais. Existem alguns tipos diferentes de saídas: simples comutação de pinos GPIO (HIGH/LOW), geração de sinais de largura de pulso modulada (PWM), controlo de bombas peristálticas, publicação de MQTT, e muito mais.

Quando as Entradas e Saídas são combinadas, os controladores de funções podem ser utilizados para criar laços de feedback que utilizam o dispositivo de Saída para modular uma condição ambiental as medidas de Entrada. Certas Entradas podem ser acopladas a certas Saídas para criar uma variedade de diferentes aplicações de controlo e regulação. Para além da regulação simples, podem ser utilizados métodos para criar um ponto de ajuste variável ao longo do tempo, permitindo coisas como termocicladores, fornos de refluxo, simulação ambiental para terrários, fermentação ou cura de alimentos e bebidas, e cozinhar alimentos (sous-vide), para citar alguns.

Os gatilhos podem ser definidos para activar eventos com base em datas e horas específicas, de acordo com durações de tempo, ou o nascer/pôr-do-sol a uma latitude e longitude específicas.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.ru/index.html b/About.ru/index.html index 77eb91f57..3ef70aec2 100644 --- a/About.ru/index.html +++ b/About.ru/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo - это система мониторинга и регулирования окружающей среды с открытым исходным кодом, созданная для работы на одноплатных компьютерах, в частности Raspberry Pi.

Первоначально разработанная для выращивания съедобных грибов, Mycodo стала делать гораздо больше. Система состоит из двух частей: бэкэнд (демон) и фронтэнд (веб-сервер). Бэкэнд выполняет такие задачи, как получение измерений от датчиков и устройств и координация различных реакций на эти измерения, включая возможность модулировать выходы (переключать реле, генерировать ШИМ-сигналы, управлять насосами, переключать беспроводные розетки, публиковать/подписываться на MQTT и т.д.), регулировать условия окружающей среды с помощью ПИД-регулирования, планировать таймеры, делать фотографии и транслировать видео, запускать действия, когда измерения соответствуют определенным условиям, и многое другое. На передней панели расположен веб-интерфейс, который позволяет просматривать и настраивать систему с любого устройства, поддерживающего браузер.

Mycodo можно использовать по-разному. Некоторые пользователи просто хранят результаты измерений датчиков для удаленного мониторинга условий, другие регулируют условия окружающей среды в физическом пространстве, третьи делают фотографии, активированные движением, или фотографии с временной задержкой.

Входные контроллеры получают измерения и сохраняют их в базе данных временных рядов InfluxDB. Измерения обычно поступают от датчиков, но также могут быть настроены на использование возвращаемых значений команд Linux Bash или Python, или математических уравнений, что делает эту систему очень динамичной для получения и генерации данных.

Контроллеры выходов производят изменения на общих контактах ввода/вывода (GPIO) или могут быть настроены на выполнение команд Linux Bash или Python, что позволяет использовать их в самых разных целях. Существует несколько различных типов выходов: простое переключение контактов GPIO (HIGH/LOW), генерация сигналов с широтно-импульсной модуляцией (PWM), управление перистальтическими насосами, публикация MQTT и многое другое.

Когда входы и выходы объединены, функциональные контроллеры могут использоваться для создания контуров обратной связи, которые используют выходное устройство для изменения условий окружающей среды, измеряемых входом. Определенные входы могут быть соединены с определенными выходами для создания множества различных приложений управления и регулирования. Помимо простого регулирования, методы могут быть использованы для создания изменяющегося во времени заданного значения, что позволяет использовать их в термоциклерах, печах доводки, моделировании окружающей среды для террариумов, ферментации продуктов питания и напитков, приготовления пищи (sous-vide) и т.д., и т.п.

Триггеры могут быть установлены для активации событий на основе определенных дат и времени, в соответствии с продолжительностью времени или восходом/закатом солнца на определенной широте и долготе.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo - это система мониторинга и регулирования окружающей среды с открытым исходным кодом, созданная для работы на одноплатных компьютерах, в частности Raspberry Pi.

Первоначально разработанная для выращивания съедобных грибов, Mycodo стала делать гораздо больше. Система состоит из двух частей: бэкэнд (демон) и фронтэнд (веб-сервер). Бэкэнд выполняет такие задачи, как получение измерений от датчиков и устройств и координация различных реакций на эти измерения, включая возможность модулировать выходы (переключать реле, генерировать ШИМ-сигналы, управлять насосами, переключать беспроводные розетки, публиковать/подписываться на MQTT и т.д.), регулировать условия окружающей среды с помощью ПИД-регулирования, планировать таймеры, делать фотографии и транслировать видео, запускать действия, когда измерения соответствуют определенным условиям, и многое другое. На передней панели расположен веб-интерфейс, который позволяет просматривать и настраивать систему с любого устройства, поддерживающего браузер.

Mycodo можно использовать по-разному. Некоторые пользователи просто хранят результаты измерений датчиков для удаленного мониторинга условий, другие регулируют условия окружающей среды в физическом пространстве, третьи делают фотографии, активированные движением, или фотографии с временной задержкой.

Входные контроллеры получают измерения и сохраняют их в базе данных временных рядов InfluxDB. Измерения обычно поступают от датчиков, но также могут быть настроены на использование возвращаемых значений команд Linux Bash или Python, или математических уравнений, что делает эту систему очень динамичной для получения и генерации данных.

Контроллеры выходов производят изменения на общих контактах ввода/вывода (GPIO) или могут быть настроены на выполнение команд Linux Bash или Python, что позволяет использовать их в самых разных целях. Существует несколько различных типов выходов: простое переключение контактов GPIO (HIGH/LOW), генерация сигналов с широтно-импульсной модуляцией (PWM), управление перистальтическими насосами, публикация MQTT и многое другое.

Когда входы и выходы объединены, функциональные контроллеры могут использоваться для создания контуров обратной связи, которые используют выходное устройство для изменения условий окружающей среды, измеряемых входом. Определенные входы могут быть соединены с определенными выходами для создания множества различных приложений управления и регулирования. Помимо простого регулирования, методы могут быть использованы для создания изменяющегося во времени заданного значения, что позволяет использовать их в термоциклерах, печах доводки, моделировании окружающей среды для террариумов, ферментации продуктов питания и напитков, приготовления пищи (sous-vide) и т.д., и т.п.

Триггеры могут быть установлены для активации событий на основе определенных дат и времени, в соответствии с продолжительностью времени или восходом/закатом солнца на определенной широте и долготе.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.sr/index.html b/About.sr/index.html index 7e52c9197..8c9799705 100644 --- a/About.sr/index.html +++ b/About.sr/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo is an open-source environmental monitoring and regulation system that was built to run on single-board computers, specifically the Raspberry Pi.

Originally developed for cultivating edible mushrooms, Mycodo has grown to do much more. The system consists of two parts, a backend (daemon) and a frontend (web server). The backend performs tasks such as acquiring measurements from sensors and devices and coordinating a diverse set of responses to those measurements, including the ability to modulate outputs (switch relays, generate PWM signals, operate pumps, switch wireless outlets, publish/subscribe to MQTT, among others), regulate environmental conditions with PID control, schedule timers, capture photos and stream video, trigger actions when measurements meet certain conditions, and more. The frontend hosts a web interface that enables viewing and configuration from any browser-enabled device.

There are a number of different uses for Mycodo. Some users simply store sensor measurements to monitor conditions remotely, others regulate the environmental conditions of a physical space, while others capture motion-activated or time-lapse photography, among other uses.

Input controllers acquire measurements and store them in the InfluxDB time series database. Measurements typically come from sensors, but may also be configured to use the return value of Linux Bash or Python commands, or math equations, making this a very dynamic system for acquiring and generating data.

Output controllers produce changes to the general input/output (GPIO) pins or may be configured to execute Linux Bash or Python commands, enabling a variety of potential uses. There are a few different types of outputs: simple switching of GPIO pins (HIGH/LOW), generating pulse-width modulated (PWM) signals, controlling peristaltic pumps, MQTT publishing, and more.

When Inputs and Outputs are combined, Function controllers may be used to create feedback loops that uses the Output device to modulate an environmental condition the Input measures. Certain Inputs may be coupled with certain Outputs to create a variety of different control and regulation applications. Beyond simple regulation, Methods may be used to create a changing setpoint over time, enabling such things as thermal cyclers, reflow ovens, environmental simulation for terrariums, food and beverage fermentation or curing, and cooking food (sous-vide), to name a few.

Triggers can be set to activate events based on specific dates and times, according to durations of time, or the sunrise/sunset at a specific latitude and longitude.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo is an open-source environmental monitoring and regulation system that was built to run on single-board computers, specifically the Raspberry Pi.

Originally developed for cultivating edible mushrooms, Mycodo has grown to do much more. The system consists of two parts, a backend (daemon) and a frontend (web server). The backend performs tasks such as acquiring measurements from sensors and devices and coordinating a diverse set of responses to those measurements, including the ability to modulate outputs (switch relays, generate PWM signals, operate pumps, switch wireless outlets, publish/subscribe to MQTT, among others), regulate environmental conditions with PID control, schedule timers, capture photos and stream video, trigger actions when measurements meet certain conditions, and more. The frontend hosts a web interface that enables viewing and configuration from any browser-enabled device.

There are a number of different uses for Mycodo. Some users simply store sensor measurements to monitor conditions remotely, others regulate the environmental conditions of a physical space, while others capture motion-activated or time-lapse photography, among other uses.

Input controllers acquire measurements and store them in the InfluxDB time series database. Measurements typically come from sensors, but may also be configured to use the return value of Linux Bash or Python commands, or math equations, making this a very dynamic system for acquiring and generating data.

Output controllers produce changes to the general input/output (GPIO) pins or may be configured to execute Linux Bash or Python commands, enabling a variety of potential uses. There are a few different types of outputs: simple switching of GPIO pins (HIGH/LOW), generating pulse-width modulated (PWM) signals, controlling peristaltic pumps, MQTT publishing, and more.

When Inputs and Outputs are combined, Function controllers may be used to create feedback loops that uses the Output device to modulate an environmental condition the Input measures. Certain Inputs may be coupled with certain Outputs to create a variety of different control and regulation applications. Beyond simple regulation, Methods may be used to create a changing setpoint over time, enabling such things as thermal cyclers, reflow ovens, environmental simulation for terrariums, food and beverage fermentation or curing, and cooking food (sous-vide), to name a few.

Triggers can be set to activate events based on specific dates and times, according to durations of time, or the sunrise/sunset at a specific latitude and longitude.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.sv/index.html b/About.sv/index.html index 6061c8966..92c35fe9e 100644 --- a/About.sv/index.html +++ b/About.sv/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo är ett miljöövervaknings- och regleringssystem med öppen källkod som byggdes för att köras på enbordsdatorer, särskilt Raspberry Pi.

Mycodo utvecklades ursprungligen för att odla ätliga svampar, men har vuxit till att göra mycket mer. Systemet består av två delar, en backend (daemon) och en frontend (webbserver). Baksidan utför uppgifter som att samla in mätningar från sensorer och enheter och samordna en mängd olika svar på dessa mätningar, inklusive förmågan att modulera utgångar (koppla om reläer, generera PWM-signaler, driva pumpar, koppla om trådlösa uttag, publicera/skriva på MQTT, med mera), reglera miljöförhållanden med PID-kontroll, schemalägga timers, ta foton och strömma video, utlösa åtgärder när mätningar uppfyller vissa villkor, med mera. Frontenden är värd för ett webbgränssnitt som gör det möjligt att visa och konfigurera från alla enheter med webbläsare.

Mycodo kan användas på många olika sätt. Vissa användare lagrar helt enkelt sensormätningar för att övervaka förhållandena på distans, andra reglerar miljöförhållandena i ett fysiskt utrymme, medan andra bland annat tar rörelsestyrd eller tidsförloppsfotografering.

Ingångskontrollanter samlar in mätningar och lagrar dem i InfluxDB:s tidsseriedatabas. Mätningarna kommer vanligtvis från sensorer, men kan också konfigureras för att använda returvärdet av Linux Bash- eller Pythonkommandon eller matematiska ekvationer, vilket gör detta till ett mycket dynamiskt system för att samla in och generera data.

Utgångskontroller producerar ändringar på GPIO-stift (general input/output) eller kan konfigureras för att utföra Linux Bash- eller Python-kommandon, vilket möjliggör en mängd olika användningsområden. Det finns några olika typer av utgångar: enkel omkoppling av GPIO-stift (HIGH/LOW), generering av PWM-signaler (pulsbreddsmodulerade signaler), styrning av peristaltiska pumpar, MQTT-publicering med mera.

När ingångar och utgångar kombineras kan funktionskontroller användas för att skapa återkopplingsslingor som använder utgångsenheten för att modulera ett miljötillstånd som ingången mäter. Vissa ingångar kan kombineras med vissa utgångar för att skapa en mängd olika styr- och reglertillämpningar. Utöver enkel reglering kan metoderna användas för att skapa ett förändrat börvärde över tiden, vilket möjliggör t.ex. termiska cyklare, reflow-ugnar, miljösimulering för terrarier, jäsning eller härdning av livsmedel och drycker och tillagning av mat (sous-vide), för att nämna några exempel.

Utlösare kan ställas in för att aktivera händelser baserat på specifika datum och tider, enligt tidsperioder eller vid soluppgång/solnedgång på en specifik latitud och longitud.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo är ett miljöövervaknings- och regleringssystem med öppen källkod som byggdes för att köras på enbordsdatorer, särskilt Raspberry Pi.

Mycodo utvecklades ursprungligen för att odla ätliga svampar, men har vuxit till att göra mycket mer. Systemet består av två delar, en backend (daemon) och en frontend (webbserver). Baksidan utför uppgifter som att samla in mätningar från sensorer och enheter och samordna en mängd olika svar på dessa mätningar, inklusive förmågan att modulera utgångar (koppla om reläer, generera PWM-signaler, driva pumpar, koppla om trådlösa uttag, publicera/skriva på MQTT, med mera), reglera miljöförhållanden med PID-kontroll, schemalägga timers, ta foton och strömma video, utlösa åtgärder när mätningar uppfyller vissa villkor, med mera. Frontenden är värd för ett webbgränssnitt som gör det möjligt att visa och konfigurera från alla enheter med webbläsare.

Mycodo kan användas på många olika sätt. Vissa användare lagrar helt enkelt sensormätningar för att övervaka förhållandena på distans, andra reglerar miljöförhållandena i ett fysiskt utrymme, medan andra bland annat tar rörelsestyrd eller tidsförloppsfotografering.

Ingångskontrollanter samlar in mätningar och lagrar dem i InfluxDB:s tidsseriedatabas. Mätningarna kommer vanligtvis från sensorer, men kan också konfigureras för att använda returvärdet av Linux Bash- eller Pythonkommandon eller matematiska ekvationer, vilket gör detta till ett mycket dynamiskt system för att samla in och generera data.

Utgångskontroller producerar ändringar på GPIO-stift (general input/output) eller kan konfigureras för att utföra Linux Bash- eller Python-kommandon, vilket möjliggör en mängd olika användningsområden. Det finns några olika typer av utgångar: enkel omkoppling av GPIO-stift (HIGH/LOW), generering av PWM-signaler (pulsbreddsmodulerade signaler), styrning av peristaltiska pumpar, MQTT-publicering med mera.

När ingångar och utgångar kombineras kan funktionskontroller användas för att skapa återkopplingsslingor som använder utgångsenheten för att modulera ett miljötillstånd som ingången mäter. Vissa ingångar kan kombineras med vissa utgångar för att skapa en mängd olika styr- och reglertillämpningar. Utöver enkel reglering kan metoderna användas för att skapa ett förändrat börvärde över tiden, vilket möjliggör t.ex. termiska cyklare, reflow-ugnar, miljösimulering för terrarier, jäsning eller härdning av livsmedel och drycker och tillagning av mat (sous-vide), för att nämna några exempel.

Utlösare kan ställas in för att aktivera händelser baserat på specifika datum och tider, enligt tidsperioder eller vid soluppgång/solnedgång på en specifik latitud och longitud.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.tr/index.html b/About.tr/index.html index 930d1a128..2f775d436 100644 --- a/About.tr/index.html +++ b/About.tr/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo, tek kartlı bilgisayarlarda, özellikle de Raspberry Pi üzerinde çalışmak üzere inşa edilmiş açık kaynaklı bir çevresel izleme ve düzenleme sistemidir.

Başlangıçta yenilebilir mantar yetiştirmek için geliştirilen Mycodo, çok daha fazlasını yapmak için büyüdü. Sistem, bir arka uç (daemon) ve bir ön uç (web sunucusu) olmak üzere iki bölümden oluşmaktadır. Arka uç, sensörlerden ve cihazlardan ölçümler almak ve bu ölçümlere verilen, çıkışları modüle etme (röleleri değiştirme, PWM sinyalleri üretme, pompaları çalıştırma, kablosuz çıkışları değiştirme, MQTT'ye yayınlama/abone olma ve diğerleri), PID kontrolü ile çevresel koşulları düzenleme, zamanlayıcıları zamanlama, fotoğraf çekme ve video akışı, ölçümler belirli koşulları karşıladığında eylemleri tetikleme ve daha fazlası dahil olmak üzere çeşitli yanıtları koordine etme gibi görevleri yerine getirir. Ön uç, tarayıcı özellikli herhangi bir cihazdan görüntüleme ve yapılandırma sağlayan bir web arayüzü barındırır.

Mycodo'nun çok sayıda farklı kullanım alanı vardır. Bazı kullanıcılar koşulları uzaktan izlemek için sensör ölçümlerini depolarken, diğerleri fiziksel bir alanın çevresel koşullarını düzenliyor, diğerleri ise diğer kullanımların yanı sıra hareketle etkinleştirilen veya hızlandırılmış fotoğraf çekiyor.

Giriş denetleyicileri ölçümleri alır ve bunları InfluxDB zaman serisi veritabanında depolar. Ölçümler genellikle sensörlerden gelir, ancak Linux Bash veya Python komutlarının veya matematik denklemlerinin dönüş değerini kullanmak üzere de yapılandırılabilir, bu da bunu veri elde etmek ve üretmek için çok dinamik bir sistem haline getirir.

Çıkış denetleyicileri genel giriş/çıkış (GPIO) pinlerinde değişiklikler üretir veya Linux Bash veya Python komutlarını yürütecek şekilde yapılandırılarak çeşitli potansiyel kullanımlara olanak sağlar. Birkaç farklı çıkış türü vardır: GPIO pinlerinin basit anahtarlanması (YÜKSEK/DÜŞÜK), darbe genişliği modülasyonlu (PWM) sinyaller üretme, peristaltik pompaları kontrol etme, MQTT yayınlama ve daha fazlası.

Girişler ve Çıkışlar birleştirildiğinde, Fonksiyon kontrolörleri, Girişin ölçtüğü bir çevresel koşulu modüle etmek için Çıkış cihazını kullanan geri besleme döngüleri oluşturmak için kullanılabilir. Çeşitli farklı kontrol ve düzenleme uygulamaları oluşturmak için belirli Girişler belirli Çıkışlarla birleştirilebilir. Basit düzenlemenin ötesinde, Yöntemler zaman içinde değişen bir ayar noktası oluşturmak için kullanılabilir, bu da termal döngüler, yeniden akış fırınları, teraryumlar için çevresel simülasyon, yiyecek ve içecek fermantasyonu veya kürleme ve yiyecek pişirme (sous-vide) gibi şeyleri mümkün kılar.

Tetikleyiciler, belirli tarih ve saatlere, zaman sürelerine veya belirli bir enlem ve boylamda güneşin doğuşuna/ batışına göre olayları etkinleştirmek üzere ayarlanabilir.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo, tek kartlı bilgisayarlarda, özellikle de Raspberry Pi üzerinde çalışmak üzere inşa edilmiş açık kaynaklı bir çevresel izleme ve düzenleme sistemidir.

Başlangıçta yenilebilir mantar yetiştirmek için geliştirilen Mycodo, çok daha fazlasını yapmak için büyüdü. Sistem, bir arka uç (daemon) ve bir ön uç (web sunucusu) olmak üzere iki bölümden oluşmaktadır. Arka uç, sensörlerden ve cihazlardan ölçümler almak ve bu ölçümlere verilen, çıkışları modüle etme (röleleri değiştirme, PWM sinyalleri üretme, pompaları çalıştırma, kablosuz çıkışları değiştirme, MQTT'ye yayınlama/abone olma ve diğerleri), PID kontrolü ile çevresel koşulları düzenleme, zamanlayıcıları zamanlama, fotoğraf çekme ve video akışı, ölçümler belirli koşulları karşıladığında eylemleri tetikleme ve daha fazlası dahil olmak üzere çeşitli yanıtları koordine etme gibi görevleri yerine getirir. Ön uç, tarayıcı özellikli herhangi bir cihazdan görüntüleme ve yapılandırma sağlayan bir web arayüzü barındırır.

Mycodo'nun çok sayıda farklı kullanım alanı vardır. Bazı kullanıcılar koşulları uzaktan izlemek için sensör ölçümlerini depolarken, diğerleri fiziksel bir alanın çevresel koşullarını düzenliyor, diğerleri ise diğer kullanımların yanı sıra hareketle etkinleştirilen veya hızlandırılmış fotoğraf çekiyor.

Giriş denetleyicileri ölçümleri alır ve bunları InfluxDB zaman serisi veritabanında depolar. Ölçümler genellikle sensörlerden gelir, ancak Linux Bash veya Python komutlarının veya matematik denklemlerinin dönüş değerini kullanmak üzere de yapılandırılabilir, bu da bunu veri elde etmek ve üretmek için çok dinamik bir sistem haline getirir.

Çıkış denetleyicileri genel giriş/çıkış (GPIO) pinlerinde değişiklikler üretir veya Linux Bash veya Python komutlarını yürütecek şekilde yapılandırılarak çeşitli potansiyel kullanımlara olanak sağlar. Birkaç farklı çıkış türü vardır: GPIO pinlerinin basit anahtarlanması (YÜKSEK/DÜŞÜK), darbe genişliği modülasyonlu (PWM) sinyaller üretme, peristaltik pompaları kontrol etme, MQTT yayınlama ve daha fazlası.

Girişler ve Çıkışlar birleştirildiğinde, Fonksiyon kontrolörleri, Girişin ölçtüğü bir çevresel koşulu modüle etmek için Çıkış cihazını kullanan geri besleme döngüleri oluşturmak için kullanılabilir. Çeşitli farklı kontrol ve düzenleme uygulamaları oluşturmak için belirli Girişler belirli Çıkışlarla birleştirilebilir. Basit düzenlemenin ötesinde, Yöntemler zaman içinde değişen bir ayar noktası oluşturmak için kullanılabilir, bu da termal döngüler, yeniden akış fırınları, teraryumlar için çevresel simülasyon, yiyecek ve içecek fermantasyonu veya kürleme ve yiyecek pişirme (sous-vide) gibi şeyleri mümkün kılar.

Tetikleyiciler, belirli tarih ve saatlere, zaman sürelerine veya belirli bir enlem ve boylamda güneşin doğuşuna/ batışına göre olayları etkinleştirmek üzere ayarlanabilir.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About.zh/index.html b/About.zh/index.html index 4c5c8581e..cb9f23b08 100644 --- a/About.zh/index.html +++ b/About.zh/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo是一个开源的环境监测和调节系统,它是建立在单板计算机上运行的,特别是 Raspberry Pi

Mycodo最初是为培养食用菌而开发的,现在已经发展到可以做得更多。该系统由两部分组成,一个后端(守护程序)和一个前端(网络服务器)。后台执行的任务包括从传感器和设备获取测量值,并协调对这些测量值的各种反应,包括调制输出的能力(开关继电器、生成PWM信号、操作泵、开关无线插座、发布/订阅MQTT等)、用PID控制调节环境条件、安排定时器、捕捉照片和视频流、在测量值满足某些条件时触发行动等等。前端有一个网络界面,可以从任何支持浏览器的设备上查看和配置。

Mycodo有许多不同的用途。一些用户只是简单地存储传感器的测量值,以远程监控条件,其他用户则是调节物理空间的环境条件,而其他用户则是捕捉运动激活或延时摄影,以及其他用途。

输入控制器获取测量值并将其存储在InfluxDB时间序列数据库中。测量值通常来自传感器,但也可能被配置为使用Linux Bash或Python命令的返回值,或数学方程,这使得这是一个非常动态的获取和生成数据的系统。

输出控制器对通用输入/输出(GPIO)引脚产生变化,或者可以配置为执行Linux Bash或Python命令,实现各种潜在用途。有几种不同类型的输出:GPIO引脚的简单开关(高/低),产生脉宽调制(PWM)信号,控制蠕动泵,MQTT发布,等等。

当输入和输出相结合时,功能控制器可用于创建反馈回路,使用输出设备来调节输入所测量的环境条件。某些输入可以与某些输出结合,以创造各种不同的控制和调节应用。除了简单的调节,方法可用于创建一个随时间变化的设定点,实现诸如热循环器、回流炉、饲养箱的环境模拟、食品和饮料的发酵或腌制,以及烹饪食物(苏式蒸煮),仅举几例。

触发器可以被设置为根据特定的日期和时间,根据时间的长短,或特定经纬度的日出/日落来激活事件。

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo是一个开源的环境监测和调节系统,它是建立在单板计算机上运行的,特别是 Raspberry Pi

Mycodo最初是为培养食用菌而开发的,现在已经发展到可以做得更多。该系统由两部分组成,一个后端(守护程序)和一个前端(网络服务器)。后台执行的任务包括从传感器和设备获取测量值,并协调对这些测量值的各种反应,包括调制输出的能力(开关继电器、生成PWM信号、操作泵、开关无线插座、发布/订阅MQTT等)、用PID控制调节环境条件、安排定时器、捕捉照片和视频流、在测量值满足某些条件时触发行动等等。前端有一个网络界面,可以从任何支持浏览器的设备上查看和配置。

Mycodo有许多不同的用途。一些用户只是简单地存储传感器的测量值,以远程监控条件,其他用户则是调节物理空间的环境条件,而其他用户则是捕捉运动激活或延时摄影,以及其他用途。

输入控制器获取测量值并将其存储在InfluxDB时间序列数据库中。测量值通常来自传感器,但也可能被配置为使用Linux Bash或Python命令的返回值,或数学方程,这使得这是一个非常动态的获取和生成数据的系统。

输出控制器对通用输入/输出(GPIO)引脚产生变化,或者可以配置为执行Linux Bash或Python命令,实现各种潜在用途。有几种不同类型的输出:GPIO引脚的简单开关(高/低),产生脉宽调制(PWM)信号,控制蠕动泵,MQTT发布,等等。

当输入和输出相结合时,功能控制器可用于创建反馈回路,使用输出设备来调节输入所测量的环境条件。某些输入可以与某些输出结合,以创造各种不同的控制和调节应用。除了简单的调节,方法可用于创建一个随时间变化的设定点,实现诸如热循环器、回流炉、饲养箱的环境模拟、食品和饮料的发酵或腌制,以及烹饪食物(苏式蒸煮),仅举几例。

触发器可以被设置为根据特定的日期和时间,根据时间的长短,或特定经纬度的日出/日落来激活事件。

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/About/index.html b/About/index.html index 37b42837a..a62063d88 100644 --- a/About/index.html +++ b/About/index.html @@ -1 +1 @@ - About - Mycodo

About

Mycodo is an open-source environmental monitoring and regulation system that was built to run on single-board computers, specifically the Raspberry Pi.

Originally developed for cultivating edible mushrooms, Mycodo has grown to do much more. The system consists of two parts, a backend (daemon) and a frontend (web server). The backend performs tasks such as acquiring measurements from sensors and devices and coordinating a diverse set of responses to those measurements, including the ability to modulate outputs (switch relays, generate PWM signals, operate pumps, switch wireless outlets, publish/subscribe to MQTT, among others), regulate environmental conditions with PID control, schedule timers, capture photos and stream video, trigger actions when measurements meet certain conditions, and more. The frontend hosts a web interface that enables viewing and configuration from any browser-enabled device.

There are a number of different uses for Mycodo. Some users simply store sensor measurements to monitor conditions remotely, others regulate the environmental conditions of a physical space, while others capture motion-activated or time-lapse photography, among other uses.

Input controllers acquire measurements and store them in the InfluxDB time series database. Measurements typically come from sensors, but may also be configured to use the return value of Linux Bash or Python commands, or math equations, making this a very dynamic system for acquiring and generating data.

Output controllers produce changes to the general input/output (GPIO) pins or may be configured to execute Linux Bash or Python commands, enabling a variety of potential uses. There are a few different types of outputs: simple switching of GPIO pins (HIGH/LOW), generating pulse-width modulated (PWM) signals, controlling peristaltic pumps, MQTT publishing, and more.

When Inputs and Outputs are combined, Function controllers may be used to create feedback loops that uses the Output device to modulate an environmental condition the Input measures. Certain Inputs may be coupled with certain Outputs to create a variety of different control and regulation applications. Beyond simple regulation, Methods may be used to create a changing setpoint over time, enabling such things as thermal cyclers, reflow ovens, environmental simulation for terrariums, food and beverage fermentation or curing, and cooking food (sous-vide), to name a few.

Triggers can be set to activate events based on specific dates and times, according to durations of time, or the sunrise/sunset at a specific latitude and longitude.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file + About - Mycodo

About

Mycodo is an open-source environmental monitoring and regulation system that was built to run on single-board computers, specifically the Raspberry Pi.

Originally developed for cultivating edible mushrooms, Mycodo has grown to do much more. The system consists of two parts, a backend (daemon) and a frontend (web server). The backend performs tasks such as acquiring measurements from sensors and devices and coordinating a diverse set of responses to those measurements, including the ability to modulate outputs (switch relays, generate PWM signals, operate pumps, switch wireless outlets, publish/subscribe to MQTT, among others), regulate environmental conditions with PID control, schedule timers, capture photos and stream video, trigger actions when measurements meet certain conditions, and more. The frontend hosts a web interface that enables viewing and configuration from any browser-enabled device.

There are a number of different uses for Mycodo. Some users simply store sensor measurements to monitor conditions remotely, others regulate the environmental conditions of a physical space, while others capture motion-activated or time-lapse photography, among other uses.

Input controllers acquire measurements and store them in the InfluxDB time series database. Measurements typically come from sensors, but may also be configured to use the return value of Linux Bash or Python commands, or math equations, making this a very dynamic system for acquiring and generating data.

Output controllers produce changes to the general input/output (GPIO) pins or may be configured to execute Linux Bash or Python commands, enabling a variety of potential uses. There are a few different types of outputs: simple switching of GPIO pins (HIGH/LOW), generating pulse-width modulated (PWM) signals, controlling peristaltic pumps, MQTT publishing, and more.

When Inputs and Outputs are combined, Function controllers may be used to create feedback loops that uses the Output device to modulate an environmental condition the Input measures. Certain Inputs may be coupled with certain Outputs to create a variety of different control and regulation applications. Beyond simple regulation, Methods may be used to create a changing setpoint over time, enabling such things as thermal cyclers, reflow ovens, environmental simulation for terrariums, food and beverage fermentation or curing, and cooking food (sous-vide), to name a few.

Triggers can be set to activate events based on specific dates and times, according to durations of time, or the sunrise/sunset at a specific latitude and longitude.

Mycodo has been translated to several languages. By default, the language of the browser will determine which language is used, but may be overridden in the General Settings, on the [Gear Icon] -> Configure -> General page. If you find an issue and would like to correct a translation or would like to add another language, this can be done at https://translate.kylegabriel.com.

\ No newline at end of file diff --git a/Actions/index.html b/Actions/index.html index 608b2de14..9c4f0612e 100644 --- a/Actions/index.html +++ b/Actions/index.html @@ -1 +1 @@ - Actions - Mycodo
Skip to content

Actions

These are the actions that can be added to Controllers (i.e. Input, Conditional, and Trigger Controllers) to provide a way to add additional functionality or interact with other parts of Mycodo. Actions may work with one or more controller type, depending on how the Action has been designed.

For a full list of supported Actions, see Supported Actions.

Custom Actions~

There is a Custom Action import system in Mycodo that allows user-created Actions to be used in the Mycodo system. Custom Actions can be uploaded on the [Gear Icon] -> Configure -> Custom Actions page. After import, they will be available to use on the Setup -> Function page.

If you develop a working Action module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/actions for examples of the proper formatting.

There are also example Custom Actions in the directory Mycodo/mycodo/actions/examples

Additionally, I have another github repository devoted to Custom Modules that are not included in the built-in set, at kizniche/Mycodo-custom.

\ No newline at end of file + Actions - Mycodo
Skip to content

Actions

These are the actions that can be added to Controllers (i.e. Input, Conditional, and Trigger Controllers) to provide a way to add additional functionality or interact with other parts of Mycodo. Actions may work with one or more controller type, depending on how the Action has been designed.

For a full list of supported Actions, see Supported Actions.

Custom Actions~

There is a Custom Action import system in Mycodo that allows user-created Actions to be used in the Mycodo system. Custom Actions can be uploaded on the [Gear Icon] -> Configure -> Custom Actions page. After import, they will be available to use on the Setup -> Function page.

If you develop a working Action module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/actions for examples of the proper formatting.

There are also example Custom Actions in the directory Mycodo/mycodo/actions/examples

Additionally, I have another github repository devoted to Custom Modules that are not included in the built-in set, at kizniche/Mycodo-custom.

\ No newline at end of file diff --git a/Alerts/index.html b/Alerts/index.html index 64d9964bd..0b8ba8c16 100644 --- a/Alerts/index.html +++ b/Alerts/index.html @@ -1 +1 @@ - Alerts - Mycodo

Alerts

Alerts can be used to notify users about the state of the system. For things like sensor monitoring, this could be a threshold that indicates something needs attention. E-Mail notifications are built-in to Mycodo in a number of places, however there are several places (Inputs, Outputs, Controllers) that allow custom Python code to be used, enabling many other notification options to be built.

See Alert Settings for more information about setting up Alerts.

\ No newline at end of file + Alerts - Mycodo

Alerts

Alerts can be used to notify users about the state of the system. For things like sensor monitoring, this could be a threshold that indicates something needs attention. E-Mail notifications are built-in to Mycodo in a number of places, however there are several places (Inputs, Outputs, Controllers) that allow custom Python code to be used, enabling many other notification options to be built.

See Alert Settings for more information about setting up Alerts.

\ No newline at end of file diff --git a/Analog-To-Digital-Converters/index.html b/Analog-To-Digital-Converters/index.html index 7b971fa56..05b34da8a 100644 --- a/Analog-To-Digital-Converters/index.html +++ b/Analog-To-Digital-Converters/index.html @@ -1 +1 @@ - Analog-To-Digital Converters - Mycodo

Analog-To-Digital Converters

An analog-to-digital converter (ADC) allows the measurement of an analog voltage.

Note

A voltage divider may be necessary to convert your source voltage to an acceptable range for the ADC.

  • ADS1x15: Analog-to-digital converter link
  • ADS1256: Analog-to-digital converter link
  • MCP3008: Analog-to-digital converter link
  • MCP342x: Analog-to-digital converter link
\ No newline at end of file + Analog-To-Digital Converters - Mycodo

Analog-To-Digital Converters

An analog-to-digital converter (ADC) allows the measurement of an analog voltage.

Note

A voltage divider may be necessary to convert your source voltage to an acceptable range for the ADC.

  • ADS1x15: Analog-to-digital converter link
  • ADS1256: Analog-to-digital converter link
  • MCP3008: Analog-to-digital converter link
  • MCP342x: Analog-to-digital converter link
\ No newline at end of file diff --git a/Calibration/index.html b/Calibration/index.html index 091b84bb0..bac835574 100644 --- a/Calibration/index.html +++ b/Calibration/index.html @@ -1 +1 @@ - Calibration - Mycodo

Calibration

Calibration can be performed for any Input, Output, or Function if that functionality has been built in to the module. Some common modules that have calibration are several of the Atlas Scientific, MH-Z19, and DS-type Inputs and many of the peristaltic pump Outputs. Calibration actions can be found on the options page for the particular device. Refer to the calibration instructions at this location for how to perform a successful calibration.

\ No newline at end of file + Calibration - Mycodo

Calibration

Calibration can be performed for any Input, Output, or Function if that functionality has been built in to the module. Some common modules that have calibration are several of the Atlas Scientific, MH-Z19, and DS-type Inputs and many of the peristaltic pump Outputs. Calibration actions can be found on the options page for the particular device. Refer to the calibration instructions at this location for how to perform a successful calibration.

\ No newline at end of file diff --git a/Camera/index.html b/Camera/index.html index 36150c33b..c6b0601f7 100644 --- a/Camera/index.html +++ b/Camera/index.html @@ -1 +1 @@ - Camera - Mycodo

Camera

Page: More -> Camera

Cameras can be used to capture still images, create time-lapses, and stream video. Cameras may also be used by Functions to trigger a camera image or video capture.

There are several libraries that may be used to access your camera, which includes picamera (Raspberry Pi Camera), fswebcam, opencv, urllib, and requests (among potentially others). These libraries enable images to be acquired from the Raspberry Pi camera, USB cameras and webcams, and IP cameras that are accessible by a URL. Furthermore, using the urllib and request libraries, any image URL can be used to acquire images.

\ No newline at end of file + Camera - Mycodo

Camera

Page: More -> Camera

Cameras can be used to capture still images, create time-lapses, and stream video. Cameras may also be used by Functions to trigger a camera image or video capture.

There are several libraries that may be used to access your camera, which includes picamera (Raspberry Pi Camera), fswebcam, opencv, urllib, and requests (among potentially others). These libraries enable images to be acquired from the Raspberry Pi camera, USB cameras and webcams, and IP cameras that are accessible by a URL. Furthermore, using the urllib and request libraries, any image URL can be used to acquire images.

\ No newline at end of file diff --git a/Configuration-Settings/index.html b/Configuration-Settings/index.html index d745820ae..2d0f7d542 100644 --- a/Configuration-Settings/index.html +++ b/Configuration-Settings/index.html @@ -1 +1 @@ - System Configuration - Mycodo
Skip to content

System Configuration

Page: [Gear Icon] -> Configure

The settings menu, accessed by selecting the gear icon in the top-right, then the Configure link, is a general area for various system-wide configuration options.

General Settings~

Page: [Gear Icon] -> Configure -> General

Setting Description
Language Set the language that will be displayed in the web user interface.
Force HTTPS Require web browsers to use SSL/HTTPS. Any request to http:// will be redirected to https://.
Hide success alerts Hide all success alert boxes that appear at the top of the page.
Hide info alerts Hide all info alert boxes that appear at the top of the page.
Hide warning alerts Hide all warning alert boxes that appear at the top of the page.
Opt-out of statistics Turn off sending anonymous usage statistics. Please consider that this helps the development to leave on.

Time Series Database Settings~

Page: [Gear Icon] -> Configure -> General

Measurements are stored in a time-series database. There are currently two options that can be used with Mycodo, InfluxDB 1.x and InfluxDB 2.x. InfluxDB 1.x works on both 32-bit and 64-bit operating systems, but 2.x only works on 64-bit operating systems. Therefore, if you are using a 32-bit operating system, you will need to use InfluxDB 1.x. During the Mycodo install, you can select to install influxDB 1.x, 2.x, or neither. If you don't install InfluxDB, you will need to specify the host and credentials to an alternate install for Mycodo to be able to store and query measurements.

If you are installing via Docker, you will need to change the hostname to "mycodo_influxdb" after the Mycodo install to be able to connect to the InfluxDB Docker container.

Setting Description
Database Select the influxdb version to use.
Retention Policy Select the retention policy. Default is "autogen" for v1.x and "infinite" for v2.x.
Hostname The hostname to connect to the time-series server. Default is "localhost".
Port The time-series database port. Default is 8086.
Database Name The name of the database (v1.x) or bucket (v2.x) for Mycodo to store to and query from. Default is "mycodo_db".
Username The username to access the database (if credentials are required). Default is "mycodo".
Password The password to access the database (if credentials are required).

Dashboard Settings~

Page: [Gear Icon] -> Configure -> General

Setting Description
Grid Cell Height (px) The height of each widget cell, in pixels.

Upgrade Settings~

Page: [Gear Icon] -> Configure -> General

Setting Description
Internet Test IP Address The IP address to use to test for an active internet connection.
Internet Test Port The port to use to test for an active internet connection.
Internet Test Timeout The timeout period for testing for an active internet connection.
Check for Updates Automatically check for updates every 2 days and notify through the web interface. If there is a new update, the Configure (Gear Icon) as well as the Upgrade menu will turn the color red.

Energy Usage Settings~

Page: [Gear Icon] -> Configure -> General

In order to calculate accurate energy usage statistics, a few characteristics of your electrical system needs to be know. These variables should describe the characteristics of the electrical system being used by the relays to operate electrical devices.

Note

If not using a current sensor, proper energy usage calculations will rely on the correct current draw to be set for each output (see Output Settings).

Setting Description
Max Amps Set the maximum allowed amperage to be switched on at any given time. If a output that's instructed to turn on will cause the sum of active devices to exceed this amount, the output will not be allowed to turn on, to prevent any damage that may result from exceeding current limits.
Voltage Alternating current (AC) voltage that is switched by the outputs. This is usually 120 or 240.
Cost per kWh This is how much you pay per kWh.
Currency Unit This is the unit used for the currency that pays for electricity.
Day of Month This is the day of the month (1-30) that the electricity meter is read (which will correspond to the electrical bill).
Generate Usage/Cost Report These options define when an Energy Usage Report will be generated. Currently, these Only support the Output Duration calculation method.
Time Span to Generate How often to automatically generate a usage/cost report.
Day of Week/Month to Generate On which day of the week to generate the report. Daily: 1-7 (Monday = 1), Monthly: 1-28.
Hour of Day to Generate On which hour of the day to generate the report (0-23).

Controller Sample Rate Settings~

Page: [Gear Icon] -> Configure -> General

Each controller for Inputs, Outputs, and Functions operate periodically. The fastest these controllers can respond is determined by the sample rate of each. The looping function of each controller is paused for the specific duration. For instance, the Output controller can only have a resolution of 1 second if the sample rate is set to 1 second, meaning if you instruct an output to turn on or off, it will take a maximum of 1 second to respond to that request.

Setting Description
Max Amps Set the maximum allowed amperage to be switched on at any given time. If a output that's instructed to turn on will cause the sum of active devices to exceed this amount, the output will not be allowed to turn on, to prevent any damage that may result from exceeding current limits.
Voltage Alternating current (AC) voltage that is switched by the outputs. This is usually 120 or 240.
Cost per kWh This is how much you pay per kWh.
Currency Unit This is the unit used for the currency that pays for electricity.
Day of Month This is the day of the month (1-30) that the electricity meter is read (which will correspond to the electrical bill).
Generate Usage/Cost Report These options define when an Energy Usage Report will be generated. Currently, these Only support the Output Duration calculation method.

Input Settings~

Page: [Gear Icon] -> Configure -> Custom Inputs

Input modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Inputs for more details.

Setting Description
Import Input Module Select your input module file, then click this button to begin the import.

Output Settings~

Page: [Gear Icon] -> Configure -> Custom Outputs

Output modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Outputs for more details.

Setting Description
Import Output Module Select your output module file, then click this button to begin the import.

Function Settings~

Page: [Gear Icon] -> Configure -> Custom Functions

Function modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Functions for more details.

Setting Description
Import Function Module Select your function module file, then click this button to begin the import.

Action Settings~

Page: [Gear Icon] -> Configure -> Custom Actions

Action modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Actions for more details.

Setting Description
Import Action Module Select your action module file, then click this button to begin the import.

Widget Settings~

Page: [Gear Icon] -> Configure -> Custom Widgets

Widget modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Widgets for more details.

Setting Description
Import Widget Module Select your widget module file, then click this button to begin the import.

Measurement Settings~

Page: [Gear Icon] -> Configure -> Measurements

New measurements, units, and conversions can be created that can extend functionality of Mycodo beyond the built-in types and equations. Be sure to create units before measurements, as units need to be selected when creating a measurement. A measurement can be created that already exists, allowing additional units to be added to a pre-existing measurement. For example, the measurement 'altitude' already exists, however if you wanted to add the unit 'fathom', first create the unit 'fathom', then create the measurement 'altitude' with the 'fathom' unit selected. It is okay to create a custom measurement for a measurement that already exist (this is how new units for a currently-installed measurement is added).

Setting Description
Measurement ID ID for the measurement to use in the measurements_dict of input modules (e.g. "length", "width", "speed").
Measurement Name Common name for the measurement (e.g. "Length", "Weight", "Speed").
Measurement Units Select all the units that are associated with the measurement.
Unit ID ID for the unit to use in the measurements_dict of input modules (e.g. "K", "g", "m").
Unit Name Common name for the unit (e.g. "Kilogram", "Meter").
Unit Abbreviation Abbreviation for the unit (e.g. "kg", "m").
Convert From Unit The unit that will be converted from.
Convert To Unit The unit that will be converted to.
Equation The equation used to convert one unit to another. The lowercase letter "x" must be included in the equation (e.g. "x/1000+20", "250*(x/3)"). This "x" will be replaced with the actual measurement being converted.

User Settings~

Page: [Gear Icon] -> Configure -> Users

Mycodo requires at least one Admin user for the login system to be enabled. If there isn't an Admin user, the web server will redirect to an Admin Creation Form. This is the first page you see when starting Mycodo for the first time. After an Admin user has been created, additional users may be created from the User Settings page.

Setting Description
Username Choose a user name that is between 2 and 64 characters. The user name is case insensitive (all user names are converted to lower-case).
Email The email associated with the new account.
Password/Repeat Choose a password that is between 6 and 64 characters and only contains letters, numbers, and symbols.
Keypad Code Set an optional numeric code that is at least 4 digits for logging in using a keypad.
Role Roles are a way of imposing access restrictions on users, to either allow or deny actions. See the table below for explanations of the four default Roles.
Theme The web user interface theme to apply, including colors, themes, and other design elements.

Roles~

Roles define the permissions of each user. There are 4 default roles that determine if a user can view or edit particular areas of Mycodo. Four roles are provided by default, but custom roles may be created.

Role Admin Editor Monitor Guest
Edit Users X
Edit Controllers X X
Edit Settings X X
View Settings X X X
View Camera X X X
View Stats X X X
View Logs X X X

The Edit Controllers permission protects the editing of Conditionals, Graphs, LCDs, Methods, PIDs, Outputs, and Inputs.

The View Stats permission protects the viewing of usage statistics and the System Information and Energy Usage pages.

Raspberry Pi Settings~

Page: [Gear Icon] -> Configure -> Raspberry Pi

Pi settings configure parts of the linux system that Mycodo runs on.

pigpiod is required if you wish to use PWM Outputs, as well as PWM, RPM, DHT22, DHT11, HTU21D Inputs.

Setting Description
Enable/Disable Feature These are system interfaces that can be enabled and disabled from the web UI via the raspi-config command.
pigpiod Sample Rate This is the sample rate the pigpiod service will operate at. The lower number enables faster PWM frequencies, but may significantly increase processor load on the Pi Zeros. pigpiod may als be disabled completely if it's not required (see note, above).

Alert Settings~

Page: [Gear Icon] -> Configure -> Alerts

Alert settings set up the credentials for sending email notifications.

Setting Description
SMTP Host The SMTP server to use to send emails from.
SMTP Port Port to communicate with the SMTP server (465 for SSL, 587 for TSL).
Enable SSL Check to enable SSL, uncheck to enable TSL.
SMTP User The user name to send the email from. This can be just a name or the entire email address.
SMTP Password The password for the user.
From Email What the from email address be set as. This should be the actual email address for this user.
Max emails (per hour) Set the maximum number of emails that can be sent per hour. If more notifications are triggered within the hour and this number has been reached, the notifications will be discarded.
Send Test Email Test the email configuration by sending a test email.

Camera Settings~

Page: [Gear Icon] -> Configure -> Camera

Many cameras can be used simultaneously with Mycodo. Each camera needs to be set up in the camera settings, then may be used throughout the software.

Note

Not every option (such as Hue or White Balance) may be able to be used with your particular camera, due to manufacturer differences in hardware and software.

Setting Description
Type Select whether the camera is a Raspberry Pi Camera or a USB camera.
Library Select which library to use to communicate with the camera. The Raspberry Pi Camera uses picamera, and USB cameras should be set to fswebcam.
Device The device to use to connect to the camera. fswebcam is the only library that uses this option.
Output This output will turn on during the capture of any still image (which includes timelapses).
Output Duration Turn output on for this duration of time before the image is captured.
Rotate Image The number of degrees to rotate the image.
... Image Width, Image Height, Brightness, Contrast, Exposure, Gain, Hue, Saturation, White Balance. These options are self-explanatory. Not all options will work with all cameras.
Pre Command A command to execute (as user 'root') before a still image is captured.
Post Command A command to execute (as user 'root') after a still image is captured.
Flip horizontally Flip, or mirror, the image horizontally.
Flip vertically Flip, or mirror, the image vertically.

Diagnostic Settings~

Page: [Gear Icon] -> Configure -> Diagnostics

Sometimes issues arise in the system as a result of incompatible configurations, either the result of a misconfigured part of the system (Input, Output, etc.) or an update that didn't properly handle a database upgrade, or other unforeseen issue. Sometimes it is necessary to perform diagnostic actions that can determine the cause of the issue or fix the issue itself. The options below are meant to alleviate issues, such as a misconfigured dashboard element causing an error on the Data -> Dashboard page, which may cause an inability to access the Data -> Dashboard page to correct the issue. Deleting all Dashboard Elements may be the most economical method to enable access to the Data -> Dashboard page again, at the cost of having to readd all the Dashboard Elements that were once there.

Setting Description
Delete All Dashboards Delete all saved Dashboards on the Data - Dashboard page.
Delete All Inputs Delete all Inputs on the Setup -> Input page.
Delete all Note and Note Tags Delete all notes and tags from the More -> Note page.
Delete all Outputs Delete all Outputs from the Setup -> Output page.
Delete Settings Database Delete the mycodo.db settings database (WARNING: This will delete all settings and users).
Delete File: .dependency Delete the .dependency file. If you are having an issue accessing the dependency install page, try this.
Delete File: .upgrade Delete the .upgrade file. If you are having an issue accessing the upgrade page or running an upgrade, try this.
Recreate Influxdb 1.x database Delete the InfluxDB 1.x measurement database, then recreate it. This deletes all measurement data!
Recreate Influxdb 2.x database Delete the InfluxDB 2.x measurement database, then recreate it. This deletes all measurement data!
Reset Email Counter Reset the email/hour email counter.
Install Dependencies Start the dependency install script that will install all needed dependencies for the entire Mycodo system.
Set to Upgrade to Master This will change FORCE_UPGRADE_MASTER to True in config.py. This is a way to instruct the upgrade system to upgrade to the master branch on GitHub without having to log in and manually edit the config.py file.
\ No newline at end of file + System Configuration - Mycodo
Skip to content

System Configuration

Page: [Gear Icon] -> Configure

The settings menu, accessed by selecting the gear icon in the top-right, then the Configure link, is a general area for various system-wide configuration options.

General Settings~

Page: [Gear Icon] -> Configure -> General

Setting Description
Language Set the language that will be displayed in the web user interface.
Force HTTPS Require web browsers to use SSL/HTTPS. Any request to http:// will be redirected to https://.
Hide success alerts Hide all success alert boxes that appear at the top of the page.
Hide info alerts Hide all info alert boxes that appear at the top of the page.
Hide warning alerts Hide all warning alert boxes that appear at the top of the page.
Opt-out of statistics Turn off sending anonymous usage statistics. Please consider that this helps the development to leave on.

Time Series Database Settings~

Page: [Gear Icon] -> Configure -> General

Measurements are stored in a time-series database. There are currently two options that can be used with Mycodo, InfluxDB 1.x and InfluxDB 2.x. InfluxDB 1.x works on both 32-bit and 64-bit operating systems, but 2.x only works on 64-bit operating systems. Therefore, if you are using a 32-bit operating system, you will need to use InfluxDB 1.x. During the Mycodo install, you can select to install influxDB 1.x, 2.x, or neither. If you don't install InfluxDB, you will need to specify the host and credentials to an alternate install for Mycodo to be able to store and query measurements.

If you are installing via Docker, you will need to change the hostname to "mycodo_influxdb" after the Mycodo install to be able to connect to the InfluxDB Docker container.

Setting Description
Database Select the influxdb version to use.
Retention Policy Select the retention policy. Default is "autogen" for v1.x and "infinite" for v2.x.
Hostname The hostname to connect to the time-series server. Default is "localhost".
Port The time-series database port. Default is 8086.
Database Name The name of the database (v1.x) or bucket (v2.x) for Mycodo to store to and query from. Default is "mycodo_db".
Username The username to access the database (if credentials are required). Default is "mycodo".
Password The password to access the database (if credentials are required).

Dashboard Settings~

Page: [Gear Icon] -> Configure -> General

Setting Description
Grid Cell Height (px) The height of each widget cell, in pixels.

Upgrade Settings~

Page: [Gear Icon] -> Configure -> General

Setting Description
Internet Test IP Address The IP address to use to test for an active internet connection.
Internet Test Port The port to use to test for an active internet connection.
Internet Test Timeout The timeout period for testing for an active internet connection.
Check for Updates Automatically check for updates every 2 days and notify through the web interface. If there is a new update, the Configure (Gear Icon) as well as the Upgrade menu will turn the color red.

Energy Usage Settings~

Page: [Gear Icon] -> Configure -> General

In order to calculate accurate energy usage statistics, a few characteristics of your electrical system needs to be know. These variables should describe the characteristics of the electrical system being used by the relays to operate electrical devices.

Note

If not using a current sensor, proper energy usage calculations will rely on the correct current draw to be set for each output (see Output Settings).

Setting Description
Max Amps Set the maximum allowed amperage to be switched on at any given time. If a output that's instructed to turn on will cause the sum of active devices to exceed this amount, the output will not be allowed to turn on, to prevent any damage that may result from exceeding current limits.
Voltage Alternating current (AC) voltage that is switched by the outputs. This is usually 120 or 240.
Cost per kWh This is how much you pay per kWh.
Currency Unit This is the unit used for the currency that pays for electricity.
Day of Month This is the day of the month (1-30) that the electricity meter is read (which will correspond to the electrical bill).
Generate Usage/Cost Report These options define when an Energy Usage Report will be generated. Currently, these Only support the Output Duration calculation method.
Time Span to Generate How often to automatically generate a usage/cost report.
Day of Week/Month to Generate On which day of the week to generate the report. Daily: 1-7 (Monday = 1), Monthly: 1-28.
Hour of Day to Generate On which hour of the day to generate the report (0-23).

Controller Sample Rate Settings~

Page: [Gear Icon] -> Configure -> General

Each controller for Inputs, Outputs, and Functions operate periodically. The fastest these controllers can respond is determined by the sample rate of each. The looping function of each controller is paused for the specific duration. For instance, the Output controller can only have a resolution of 1 second if the sample rate is set to 1 second, meaning if you instruct an output to turn on or off, it will take a maximum of 1 second to respond to that request.

Setting Description
Max Amps Set the maximum allowed amperage to be switched on at any given time. If a output that's instructed to turn on will cause the sum of active devices to exceed this amount, the output will not be allowed to turn on, to prevent any damage that may result from exceeding current limits.
Voltage Alternating current (AC) voltage that is switched by the outputs. This is usually 120 or 240.
Cost per kWh This is how much you pay per kWh.
Currency Unit This is the unit used for the currency that pays for electricity.
Day of Month This is the day of the month (1-30) that the electricity meter is read (which will correspond to the electrical bill).
Generate Usage/Cost Report These options define when an Energy Usage Report will be generated. Currently, these Only support the Output Duration calculation method.

Input Settings~

Page: [Gear Icon] -> Configure -> Custom Inputs

Input modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Inputs for more details.

Setting Description
Import Input Module Select your input module file, then click this button to begin the import.

Output Settings~

Page: [Gear Icon] -> Configure -> Custom Outputs

Output modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Outputs for more details.

Setting Description
Import Output Module Select your output module file, then click this button to begin the import.

Function Settings~

Page: [Gear Icon] -> Configure -> Custom Functions

Function modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Functions for more details.

Setting Description
Import Function Module Select your function module file, then click this button to begin the import.

Action Settings~

Page: [Gear Icon] -> Configure -> Custom Actions

Action modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Actions for more details.

Setting Description
Import Action Module Select your action module file, then click this button to begin the import.

Widget Settings~

Page: [Gear Icon] -> Configure -> Custom Widgets

Widget modules may be imported and used within Mycodo. These modules must follow a specific format. See Custom Widgets for more details.

Setting Description
Import Widget Module Select your widget module file, then click this button to begin the import.

Measurement Settings~

Page: [Gear Icon] -> Configure -> Measurements

New measurements, units, and conversions can be created that can extend functionality of Mycodo beyond the built-in types and equations. Be sure to create units before measurements, as units need to be selected when creating a measurement. A measurement can be created that already exists, allowing additional units to be added to a pre-existing measurement. For example, the measurement 'altitude' already exists, however if you wanted to add the unit 'fathom', first create the unit 'fathom', then create the measurement 'altitude' with the 'fathom' unit selected. It is okay to create a custom measurement for a measurement that already exist (this is how new units for a currently-installed measurement is added).

Setting Description
Measurement ID ID for the measurement to use in the measurements_dict of input modules (e.g. "length", "width", "speed").
Measurement Name Common name for the measurement (e.g. "Length", "Weight", "Speed").
Measurement Units Select all the units that are associated with the measurement.
Unit ID ID for the unit to use in the measurements_dict of input modules (e.g. "K", "g", "m").
Unit Name Common name for the unit (e.g. "Kilogram", "Meter").
Unit Abbreviation Abbreviation for the unit (e.g. "kg", "m").
Convert From Unit The unit that will be converted from.
Convert To Unit The unit that will be converted to.
Equation The equation used to convert one unit to another. The lowercase letter "x" must be included in the equation (e.g. "x/1000+20", "250*(x/3)"). This "x" will be replaced with the actual measurement being converted.

User Settings~

Page: [Gear Icon] -> Configure -> Users

Mycodo requires at least one Admin user for the login system to be enabled. If there isn't an Admin user, the web server will redirect to an Admin Creation Form. This is the first page you see when starting Mycodo for the first time. After an Admin user has been created, additional users may be created from the User Settings page.

Setting Description
Username Choose a user name that is between 2 and 64 characters. The user name is case insensitive (all user names are converted to lower-case).
Email The email associated with the new account.
Password/Repeat Choose a password that is between 6 and 64 characters and only contains letters, numbers, and symbols.
Keypad Code Set an optional numeric code that is at least 4 digits for logging in using a keypad.
Role Roles are a way of imposing access restrictions on users, to either allow or deny actions. See the table below for explanations of the four default Roles.
Theme The web user interface theme to apply, including colors, themes, and other design elements.

Roles~

Roles define the permissions of each user. There are 4 default roles that determine if a user can view or edit particular areas of Mycodo. Four roles are provided by default, but custom roles may be created.

Role Admin Editor Monitor Guest
Edit Users X
Edit Controllers X X
Edit Settings X X
View Settings X X X
View Camera X X X
View Stats X X X
View Logs X X X

The Edit Controllers permission protects the editing of Conditionals, Graphs, LCDs, Methods, PIDs, Outputs, and Inputs.

The View Stats permission protects the viewing of usage statistics and the System Information and Energy Usage pages.

Raspberry Pi Settings~

Page: [Gear Icon] -> Configure -> Raspberry Pi

Pi settings configure parts of the linux system that Mycodo runs on.

pigpiod is required if you wish to use PWM Outputs, as well as PWM, RPM, DHT22, DHT11, HTU21D Inputs.

Setting Description
Enable/Disable Feature These are system interfaces that can be enabled and disabled from the web UI via the raspi-config command.
pigpiod Sample Rate This is the sample rate the pigpiod service will operate at. The lower number enables faster PWM frequencies, but may significantly increase processor load on the Pi Zeros. pigpiod may als be disabled completely if it's not required (see note, above).

Alert Settings~

Page: [Gear Icon] -> Configure -> Alerts

Alert settings set up the credentials for sending email notifications.

Setting Description
SMTP Host The SMTP server to use to send emails from.
SMTP Port Port to communicate with the SMTP server (465 for SSL, 587 for TSL).
Enable SSL Check to enable SSL, uncheck to enable TSL.
SMTP User The user name to send the email from. This can be just a name or the entire email address.
SMTP Password The password for the user.
From Email What the from email address be set as. This should be the actual email address for this user.
Max emails (per hour) Set the maximum number of emails that can be sent per hour. If more notifications are triggered within the hour and this number has been reached, the notifications will be discarded.
Send Test Email Test the email configuration by sending a test email.

Camera Settings~

Page: [Gear Icon] -> Configure -> Camera

Many cameras can be used simultaneously with Mycodo. Each camera needs to be set up in the camera settings, then may be used throughout the software.

Note

Not every option (such as Hue or White Balance) may be able to be used with your particular camera, due to manufacturer differences in hardware and software.

Setting Description
Type Select whether the camera is a Raspberry Pi Camera or a USB camera.
Library Select which library to use to communicate with the camera. The Raspberry Pi Camera uses picamera, and USB cameras should be set to fswebcam.
Device The device to use to connect to the camera. fswebcam is the only library that uses this option.
Output This output will turn on during the capture of any still image (which includes timelapses).
Output Duration Turn output on for this duration of time before the image is captured.
Rotate Image The number of degrees to rotate the image.
... Image Width, Image Height, Brightness, Contrast, Exposure, Gain, Hue, Saturation, White Balance. These options are self-explanatory. Not all options will work with all cameras.
Pre Command A command to execute (as user 'root') before a still image is captured.
Post Command A command to execute (as user 'root') after a still image is captured.
Flip horizontally Flip, or mirror, the image horizontally.
Flip vertically Flip, or mirror, the image vertically.

Diagnostic Settings~

Page: [Gear Icon] -> Configure -> Diagnostics

Sometimes issues arise in the system as a result of incompatible configurations, either the result of a misconfigured part of the system (Input, Output, etc.) or an update that didn't properly handle a database upgrade, or other unforeseen issue. Sometimes it is necessary to perform diagnostic actions that can determine the cause of the issue or fix the issue itself. The options below are meant to alleviate issues, such as a misconfigured dashboard element causing an error on the Data -> Dashboard page, which may cause an inability to access the Data -> Dashboard page to correct the issue. Deleting all Dashboard Elements may be the most economical method to enable access to the Data -> Dashboard page again, at the cost of having to readd all the Dashboard Elements that were once there.

Setting Description
Delete All Dashboards Delete all saved Dashboards on the Data - Dashboard page.
Delete All Inputs Delete all Inputs on the Setup -> Input page.
Delete all Note and Note Tags Delete all notes and tags from the More -> Note page.
Delete all Outputs Delete all Outputs from the Setup -> Output page.
Delete Settings Database Delete the mycodo.db settings database (WARNING: This will delete all settings and users).
Delete File: .dependency Delete the .dependency file. If you are having an issue accessing the dependency install page, try this.
Delete File: .upgrade Delete the .upgrade file. If you are having an issue accessing the upgrade page or running an upgrade, try this.
Recreate Influxdb 1.x database Delete the InfluxDB 1.x measurement database, then recreate it. This deletes all measurement data!
Recreate Influxdb 2.x database Delete the InfluxDB 2.x measurement database, then recreate it. This deletes all measurement data!
Reset Email Counter Reset the email/hour email counter.
Install Dependencies Start the dependency install script that will install all needed dependencies for the entire Mycodo system.
Set to Upgrade to Master This will change FORCE_UPGRADE_MASTER to True in config.py. This is a way to instruct the upgrade system to upgrade to the master branch on GitHub without having to log in and manually edit the config.py file.
\ No newline at end of file diff --git a/Data-Viewing.de/index.html b/Data-Viewing.de/index.html index 5a3c9f8e3..8934c4583 100644 --- a/Data-Viewing.de/index.html +++ b/Data-Viewing.de/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Zum Inhalt

Data Viewing

Live Messungen~

Page: Data -> Live Measurements

Die Seite "Live-Messungen" ist die erste Seite, die ein Benutzer nach dem Einloggen in Mycodo sieht. Sie zeigt die aktuellen Messungen an, die von Eingangs- und Funktionscontrollern erfasst werden. Wenn auf der Seite "Live" nichts angezeigt wird, vergewissern Sie sich, dass ein Eingangs- oder Funktionsregler korrekt konfiguriert und aktiviert ist. Die Daten werden auf der Seite automatisch aus der Messdatenbank aktualisiert.

Asynchrone Diagramme~

Seite: Daten -> Asynchrone Diagramme

Eine grafische Datenanzeige, die für die Anzeige von Datensätzen über relativ lange Zeiträume (Wochen/Monate/Jahre) nützlich ist, deren Anzeige als Synchrondiagramm sehr daten- und prozessorintensiv sein könnte. Wählen Sie einen Zeitraum aus, und die Daten werden aus dieser Zeitspanne geladen, sofern sie vorhanden sind. In der ersten Ansicht wird der gesamte ausgewählte Datensatz angezeigt. Für jede Ansicht/Zoom werden 700 Datenpunkte geladen. Wenn mehr als 700 Datenpunkte für die ausgewählte Zeitspanne aufgezeichnet wurden, werden 700 Punkte aus einer Mittelung der Punkte in dieser Zeitspanne erstellt. Auf diese Weise können viel weniger Daten verwendet werden, um durch einen großen Datensatz zu navigieren. So können beispielsweise 4 Monate an Daten 10 Megabyte umfassen, wenn sie vollständig heruntergeladen werden. Bei der Betrachtung einer 4-monatigen Zeitspanne ist es jedoch nicht möglich, jeden Datenpunkt dieser 10 Megabyte zu sehen, und eine Aggregation der Punkte ist unvermeidlich. Beim asynchronen Laden von Daten laden Sie nur das herunter, was Sie sehen. Anstatt also bei jedem Laden des Diagramms 10 Megabyte herunterzuladen, werden nur ~50kb heruntergeladen, bis eine neue Vergrößerungsstufe ausgewählt wird, woraufhin nur weitere ~50kb heruntergeladen werden.

Note

Diagramme erfordern Messungen, daher muss mindestens ein Eingang/Ausgang/Funktion/etc. hinzugefügt und aktiviert werden, um Daten anzuzeigen.

Dashboard~

Seite: Daten -> Dashboard

Dank der zahlreichen Dashboard-Widgets kann das Dashboard sowohl zur Anzeige von Daten als auch zur Manipulation des Systems verwendet werden. Es können mehrere Dashboards erstellt und gesperrt werden, um eine Änderung der Anordnung zu verhindern.

Widgets~

Widgets sind Elemente auf dem Dashboard, die für verschiedene Zwecke verwendet werden können, z. B. zur Anzeige von Daten (Diagramme, Indikatoren, Messgeräte usw.) oder zur Interaktion mit dem System (Manipulation von Ausgängen, Änderung des PWM-Tastverhältnisses, Abfrage oder Änderung einer Datenbank usw.). Widgets lassen sich durch Ziehen und Ablegen leicht neu anordnen und in der Größe verändern. Eine vollständige Liste der unterstützten Widgets finden Sie unter Unterstützte Widgets.

Benutzerdefinierte Widgets~

In Mycodo gibt es ein System für den Import benutzerdefinierter Widgets, mit dem vom Benutzer erstellte Widgets im Mycodo-System verwendet werden können. Benutzerdefinierte Widgets können auf der Seite [Zahnradsymbol] -> Konfigurieren -> Benutzerdefinierte Widgets hochgeladen werden. Nach dem Import können sie auf der Seite "Einstellungen -> Widgets" verwendet werden.

Wenn Sie ein funktionierendes Modul entwickeln, ziehen Sie bitte in Erwägung, ein neues GitHub-Problem zu erstellen oder einen Pull-Request zu stellen, damit es in das integrierte Set aufgenommen werden kann.

Öffnen Sie eines der integrierten Widget-Module im Verzeichnis Mycodo/mycodo/widgets, um Beispiele für die richtige Formatierung zu sehen. Es gibt auch Beispiele für benutzerdefinierte Widgets im Verzeichnis Mycodo/mycodo/widgets/examples.

Die Erstellung eines benutzerdefinierten Widget-Moduls erfordert oft eine spezielle Platzierung und Ausführung von Javascript. Um dies zu berücksichtigen, wurden in jedem Modul mehrere Variablen erstellt, die der folgenden kurzen Struktur der Dashboard-Seite folgen, die mit mehreren angezeigten Widgets erstellt würde.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live Messungen~

Page: Data -> Live Measurements

Die Seite "Live-Messungen" ist die erste Seite, die ein Benutzer nach dem Einloggen in Mycodo sieht. Sie zeigt die aktuellen Messungen an, die von Eingangs- und Funktionscontrollern erfasst werden. Wenn auf der Seite "Live" nichts angezeigt wird, vergewissern Sie sich, dass ein Eingangs- oder Funktionsregler korrekt konfiguriert und aktiviert ist. Die Daten werden auf der Seite automatisch aus der Messdatenbank aktualisiert.

Asynchrone Diagramme~

Seite: Daten -> Asynchrone Diagramme

Eine grafische Datenanzeige, die für die Anzeige von Datensätzen über relativ lange Zeiträume (Wochen/Monate/Jahre) nützlich ist, deren Anzeige als Synchrondiagramm sehr daten- und prozessorintensiv sein könnte. Wählen Sie einen Zeitraum aus, und die Daten werden aus dieser Zeitspanne geladen, sofern sie vorhanden sind. In der ersten Ansicht wird der gesamte ausgewählte Datensatz angezeigt. Für jede Ansicht/Zoom werden 700 Datenpunkte geladen. Wenn mehr als 700 Datenpunkte für die ausgewählte Zeitspanne aufgezeichnet wurden, werden 700 Punkte aus einer Mittelung der Punkte in dieser Zeitspanne erstellt. Auf diese Weise können viel weniger Daten verwendet werden, um durch einen großen Datensatz zu navigieren. So können beispielsweise 4 Monate an Daten 10 Megabyte umfassen, wenn sie vollständig heruntergeladen werden. Bei der Betrachtung einer 4-monatigen Zeitspanne ist es jedoch nicht möglich, jeden Datenpunkt dieser 10 Megabyte zu sehen, und eine Aggregation der Punkte ist unvermeidlich. Beim asynchronen Laden von Daten laden Sie nur das herunter, was Sie sehen. Anstatt also bei jedem Laden des Diagramms 10 Megabyte herunterzuladen, werden nur ~50kb heruntergeladen, bis eine neue Vergrößerungsstufe ausgewählt wird, woraufhin nur weitere ~50kb heruntergeladen werden.

Note

Diagramme erfordern Messungen, daher muss mindestens ein Eingang/Ausgang/Funktion/etc. hinzugefügt und aktiviert werden, um Daten anzuzeigen.

Dashboard~

Seite: Daten -> Dashboard

Dank der zahlreichen Dashboard-Widgets kann das Dashboard sowohl zur Anzeige von Daten als auch zur Manipulation des Systems verwendet werden. Es können mehrere Dashboards erstellt und gesperrt werden, um eine Änderung der Anordnung zu verhindern.

Widgets~

Widgets sind Elemente auf dem Dashboard, die für verschiedene Zwecke verwendet werden können, z. B. zur Anzeige von Daten (Diagramme, Indikatoren, Messgeräte usw.) oder zur Interaktion mit dem System (Manipulation von Ausgängen, Änderung des PWM-Tastverhältnisses, Abfrage oder Änderung einer Datenbank usw.). Widgets lassen sich durch Ziehen und Ablegen leicht neu anordnen und in der Größe verändern. Eine vollständige Liste der unterstützten Widgets finden Sie unter Unterstützte Widgets.

Benutzerdefinierte Widgets~

In Mycodo gibt es ein System für den Import benutzerdefinierter Widgets, mit dem vom Benutzer erstellte Widgets im Mycodo-System verwendet werden können. Benutzerdefinierte Widgets können auf der Seite [Zahnradsymbol] -> Konfigurieren -> Benutzerdefinierte Widgets hochgeladen werden. Nach dem Import können sie auf der Seite "Einstellungen -> Widgets" verwendet werden.

Wenn Sie ein funktionierendes Modul entwickeln, ziehen Sie bitte in Erwägung, ein neues GitHub-Problem zu erstellen oder einen Pull-Request zu stellen, damit es in das integrierte Set aufgenommen werden kann.

Öffnen Sie eines der integrierten Widget-Module im Verzeichnis Mycodo/mycodo/widgets, um Beispiele für die richtige Formatierung zu sehen. Es gibt auch Beispiele für benutzerdefinierte Widgets im Verzeichnis Mycodo/mycodo/widgets/examples.

Die Erstellung eines benutzerdefinierten Widget-Moduls erfordert oft eine spezielle Platzierung und Ausführung von Javascript. Um dies zu berücksichtigen, wurden in jedem Modul mehrere Variablen erstellt, die der folgenden kurzen Struktur der Dashboard-Seite folgen, die mit mehreren angezeigten Widgets erstellt würde.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.es/index.html b/Data-Viewing.es/index.html index 9a503361b..b25cb5125 100644 --- a/Data-Viewing.es/index.html +++ b/Data-Viewing.es/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Saltar a contenido

Data Viewing

Valores en Vivo~

Page: Data -> Live Measurements

La página Mediciones en vivo es la primera página que ve un usuario después de iniciar sesión en Mycodo. En ella se muestran las mediciones actuales que se están adquiriendo de los controladores de Entrada y Función. Si no se muestra nada en la página Live, asegúrese de que un controlador de Entrada o Función está configurado correctamente y activado. Los datos se actualizarán automáticamente en la página desde la base de datos de mediciones.

Asíncrono~

Página: Datos -> Asíncrono

Una visualización gráfica de datos que resulta útil para ver conjuntos de datos que abarcan periodos de tiempo relativamente largos (semanas/meses/años), cuya visualización en forma de gráfico sincrónico podría requerir muchos datos y un gran número de procesadores. Seleccione un periodo de tiempo y se cargarán los datos de ese periodo, si existen. La primera vista será de todo el conjunto de datos seleccionado. Para cada vista/zoom, se cargarán 700 puntos de datos. Si hay más de 700 puntos de datos registrados para el lapso de tiempo seleccionado, se crearán 700 puntos a partir de un promedio de los puntos de ese lapso de tiempo. Esto permite utilizar muchos menos datos para navegar por un conjunto de datos grande. Por ejemplo, 4 meses de datos pueden ser 10 megabytes si se descargan todos. Sin embargo, al visualizar un lapso de 4 meses, no es posible ver todos los puntos de datos de esos 10 megabytes, y la agregación de puntos es inevitable. Con la carga asíncrona de datos, sólo se descarga lo que se ve. Así, en lugar de descargar 10 megabytes cada vez que se carga el gráfico, sólo se descargarán ~50kb hasta que se seleccione un nuevo nivel de zoom, momento en el que sólo se descargarán otros ~50kb.

Note

Los gráficos requieren mediciones, por lo que es necesario añadir y activar al menos una Entrada/Salida/Función/etc. para poder mostrar los datos.

Tablero~

Página: Datos -> Tablero

El cuadro de mandos puede utilizarse tanto para ver los datos como para manipular el sistema, gracias a los numerosos widgets del cuadro de mandos disponibles. Se pueden crear múltiples cuadros de mando, así como bloquearlos para evitar que se modifique su disposición.

Widgets~

Los widgets son elementos del cuadro de mandos que tienen una serie de usos, como la visualización de datos (gráficos, indicadores, medidores, etc.) o la interacción con el sistema (manipular salidas, cambiar el ciclo de trabajo PWM, consultar o modificar una base de datos, etc.). Los widgets se pueden reorganizar y cambiar de tamaño fácilmente arrastrando y soltando. Para obtener una lista completa de los widgets admitidos, consulte Widgets admitidos.

Widgets personalizados~

Existe un sistema de importación de Widgets personalizados en Mycodo que permite utilizar Widgets creados por el usuario en el sistema Mycodo. Los widgets personalizados pueden cargarse en la página [Icono del engranaje] -> Configurar -> Widgets personalizados. Una vez importados, estarán disponibles para su uso en la página Configuración -> Widget.

Si desarrollas un módulo que funcione, considera la posibilidad de crear una nueva incidencia en GitHub o una solicitud de extracción, y puede que se incluya en el conjunto incorporado.

Abra cualquiera de los módulos de widgets incorporados ubicados en el directorio Mycodo/mycodo/widgets para ver ejemplos del formato adecuado. También hay ejemplos de Widgets personalizados en el directorio Mycodo/mycodo/widgets/examples.

La creación de un módulo de widgets personalizados suele requerir una colocación y ejecución específica de Javascript. Se crearon varias variables en cada módulo para abordar esto, y siguen la siguiente estructura breve de la página del tablero de instrumentos que se generaría con múltiples widgets que se muestran.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Valores en Vivo~

Page: Data -> Live Measurements

La página Mediciones en vivo es la primera página que ve un usuario después de iniciar sesión en Mycodo. En ella se muestran las mediciones actuales que se están adquiriendo de los controladores de Entrada y Función. Si no se muestra nada en la página Live, asegúrese de que un controlador de Entrada o Función está configurado correctamente y activado. Los datos se actualizarán automáticamente en la página desde la base de datos de mediciones.

Asíncrono~

Página: Datos -> Asíncrono

Una visualización gráfica de datos que resulta útil para ver conjuntos de datos que abarcan periodos de tiempo relativamente largos (semanas/meses/años), cuya visualización en forma de gráfico sincrónico podría requerir muchos datos y un gran número de procesadores. Seleccione un periodo de tiempo y se cargarán los datos de ese periodo, si existen. La primera vista será de todo el conjunto de datos seleccionado. Para cada vista/zoom, se cargarán 700 puntos de datos. Si hay más de 700 puntos de datos registrados para el lapso de tiempo seleccionado, se crearán 700 puntos a partir de un promedio de los puntos de ese lapso de tiempo. Esto permite utilizar muchos menos datos para navegar por un conjunto de datos grande. Por ejemplo, 4 meses de datos pueden ser 10 megabytes si se descargan todos. Sin embargo, al visualizar un lapso de 4 meses, no es posible ver todos los puntos de datos de esos 10 megabytes, y la agregación de puntos es inevitable. Con la carga asíncrona de datos, sólo se descarga lo que se ve. Así, en lugar de descargar 10 megabytes cada vez que se carga el gráfico, sólo se descargarán ~50kb hasta que se seleccione un nuevo nivel de zoom, momento en el que sólo se descargarán otros ~50kb.

Note

Los gráficos requieren mediciones, por lo que es necesario añadir y activar al menos una Entrada/Salida/Función/etc. para poder mostrar los datos.

Tablero~

Página: Datos -> Tablero

El cuadro de mandos puede utilizarse tanto para ver los datos como para manipular el sistema, gracias a los numerosos widgets del cuadro de mandos disponibles. Se pueden crear múltiples cuadros de mando, así como bloquearlos para evitar que se modifique su disposición.

Widgets~

Los widgets son elementos del cuadro de mandos que tienen una serie de usos, como la visualización de datos (gráficos, indicadores, medidores, etc.) o la interacción con el sistema (manipular salidas, cambiar el ciclo de trabajo PWM, consultar o modificar una base de datos, etc.). Los widgets se pueden reorganizar y cambiar de tamaño fácilmente arrastrando y soltando. Para obtener una lista completa de los widgets admitidos, consulte Widgets admitidos.

Widgets personalizados~

Existe un sistema de importación de Widgets personalizados en Mycodo que permite utilizar Widgets creados por el usuario en el sistema Mycodo. Los widgets personalizados pueden cargarse en la página [Icono del engranaje] -> Configurar -> Widgets personalizados. Una vez importados, estarán disponibles para su uso en la página Configuración -> Widget.

Si desarrollas un módulo que funcione, considera la posibilidad de crear una nueva incidencia en GitHub o una solicitud de extracción, y puede que se incluya en el conjunto incorporado.

Abra cualquiera de los módulos de widgets incorporados ubicados en el directorio Mycodo/mycodo/widgets para ver ejemplos del formato adecuado. También hay ejemplos de Widgets personalizados en el directorio Mycodo/mycodo/widgets/examples.

La creación de un módulo de widgets personalizados suele requerir una colocación y ejecución específica de Javascript. Se crearon varias variables en cada módulo para abordar esto, y siguen la siguiente estructura breve de la página del tablero de instrumentos que se generaría con múltiples widgets que se muestran.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.fr/index.html b/Data-Viewing.fr/index.html index 759d0bb02..1a9df8065 100644 --- a/Data-Viewing.fr/index.html +++ b/Data-Viewing.fr/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Aller au contenu

Data Viewing

Mesures en direct~

Page: Data -> Live Measurements

La page Live Measurements est la première page qu'un utilisateur voit après s'être connecté à Mycodo. Elle affiche les mesures actuelles acquises par les contrôleurs d'entrée et de fonction. Si rien n'est affiché sur la page Live, assurez-vous qu'un contrôleur d'entrée ou de fonction est correctement configuré et activé. Les données seront automatiquement mises à jour sur la page à partir de la base de données des mesures.

Graphique Asynchrone~

Page: Les données -> Graphique Asynchrone

Un affichage graphique des données qui est utile pour visualiser des ensembles de données couvrant des périodes relativement longues (semaines/mois/années), qui pourraient être très gourmands en données et en processeur pour être affichés sous forme de graphique synchrone. Sélectionnez une période de temps et les données seront chargées à partir de cette période, si elle existe. La première vue sera celle de l'ensemble des données sélectionnées. Pour chaque vue/zoom, 700 points de données seront chargés. S'il y a plus de 700 points de données enregistrés pour l'intervalle de temps sélectionné, 700 points seront créés à partir d'une moyenne des points de cet intervalle de temps. Cela permet d'utiliser beaucoup moins de données pour naviguer dans un grand ensemble de données. Par exemple, 4 mois de données peuvent représenter 10 mégaoctets si elles sont toutes téléchargées. Cependant, lorsqu'on visualise une période de 4 mois, il n'est pas possible de voir chaque point de données de ces 10 mégaoctets, et l'agrégation des points est inévitable. Avec le chargement asynchrone des données, vous ne téléchargez que ce que vous voyez. Ainsi, au lieu de télécharger 10 mégaoctets à chaque chargement de graphique, seuls ~50kb seront téléchargés jusqu'à ce qu'un nouveau niveau de zoom soit sélectionné, auquel moment seulement ~50kb supplémentaires seront téléchargés.

Note

Les graphiques nécessitent des mesures, donc au moins une entrée/sortie/fonction/etc. doit être ajoutée et activée afin d'afficher les données.

Tableau de bord~

Page: Les données -> Tableau de bord

Le tableau de bord peut être utilisé à la fois pour visualiser les données et pour manipuler le système, grâce aux nombreux widgets de tableau de bord disponibles. Il est possible de créer plusieurs tableaux de bord et de les verrouiller pour empêcher toute modification de leur agencement.

Widgets~

Les widgets sont des éléments du tableau de bord qui ont un certain nombre d'utilisations, telles que l'affichage de données (graphiques, indicateurs, jauges, etc.) ou l'interaction avec le système (manipulation des sorties, modification du cycle de fonctionnement du PWM, interrogation ou modification d'une base de données, etc.) Les widgets peuvent être facilement réorganisés et redimensionnés par glisser-déposer. Pour une liste complète des widgets pris en charge, voir Widgets pris en charge.

Widgets personnalisés~

Il existe un système d'importation de Widgets personnalisés dans Mycodo qui permet aux Widgets créés par les utilisateurs d'être utilisés dans le système Mycodo. Les widgets personnalisés peuvent être téléchargés sur la page [Icône Gear] -> Configurer -> Widgets personnalisés. Après importation, ils seront disponibles pour être utilisés sur la page Setup -> Widget.

Si vous développez un module fonctionnel, veuillez envisager de créer un nouveau problème GitHub ou une demande de retrait, et il pourra être inclus dans l'ensemble intégré.

Ouvrez l'un des modules Widget intégrés situés dans le répertoire Mycodo/mycodo/widgets pour voir des exemples de formatage approprié. Il existe également des exemples de Widgets personnalisés dans le répertoire Mycodo/mycodo/widgets/examples.

La création d'un module de widgets personnalisés nécessite souvent un placement et une exécution spécifiques de Javascript. Plusieurs variables ont été créées dans chaque module pour y remédier, et suivent la brève structure suivante de la page du tableau de bord qui serait générée avec l'affichage de plusieurs widgets.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Mesures en direct~

Page: Data -> Live Measurements

La page Live Measurements est la première page qu'un utilisateur voit après s'être connecté à Mycodo. Elle affiche les mesures actuelles acquises par les contrôleurs d'entrée et de fonction. Si rien n'est affiché sur la page Live, assurez-vous qu'un contrôleur d'entrée ou de fonction est correctement configuré et activé. Les données seront automatiquement mises à jour sur la page à partir de la base de données des mesures.

Graphique Asynchrone~

Page: Les données -> Graphique Asynchrone

Un affichage graphique des données qui est utile pour visualiser des ensembles de données couvrant des périodes relativement longues (semaines/mois/années), qui pourraient être très gourmands en données et en processeur pour être affichés sous forme de graphique synchrone. Sélectionnez une période de temps et les données seront chargées à partir de cette période, si elle existe. La première vue sera celle de l'ensemble des données sélectionnées. Pour chaque vue/zoom, 700 points de données seront chargés. S'il y a plus de 700 points de données enregistrés pour l'intervalle de temps sélectionné, 700 points seront créés à partir d'une moyenne des points de cet intervalle de temps. Cela permet d'utiliser beaucoup moins de données pour naviguer dans un grand ensemble de données. Par exemple, 4 mois de données peuvent représenter 10 mégaoctets si elles sont toutes téléchargées. Cependant, lorsqu'on visualise une période de 4 mois, il n'est pas possible de voir chaque point de données de ces 10 mégaoctets, et l'agrégation des points est inévitable. Avec le chargement asynchrone des données, vous ne téléchargez que ce que vous voyez. Ainsi, au lieu de télécharger 10 mégaoctets à chaque chargement de graphique, seuls ~50kb seront téléchargés jusqu'à ce qu'un nouveau niveau de zoom soit sélectionné, auquel moment seulement ~50kb supplémentaires seront téléchargés.

Note

Les graphiques nécessitent des mesures, donc au moins une entrée/sortie/fonction/etc. doit être ajoutée et activée afin d'afficher les données.

Tableau de bord~

Page: Les données -> Tableau de bord

Le tableau de bord peut être utilisé à la fois pour visualiser les données et pour manipuler le système, grâce aux nombreux widgets de tableau de bord disponibles. Il est possible de créer plusieurs tableaux de bord et de les verrouiller pour empêcher toute modification de leur agencement.

Widgets~

Les widgets sont des éléments du tableau de bord qui ont un certain nombre d'utilisations, telles que l'affichage de données (graphiques, indicateurs, jauges, etc.) ou l'interaction avec le système (manipulation des sorties, modification du cycle de fonctionnement du PWM, interrogation ou modification d'une base de données, etc.) Les widgets peuvent être facilement réorganisés et redimensionnés par glisser-déposer. Pour une liste complète des widgets pris en charge, voir Widgets pris en charge.

Widgets personnalisés~

Il existe un système d'importation de Widgets personnalisés dans Mycodo qui permet aux Widgets créés par les utilisateurs d'être utilisés dans le système Mycodo. Les widgets personnalisés peuvent être téléchargés sur la page [Icône Gear] -> Configurer -> Widgets personnalisés. Après importation, ils seront disponibles pour être utilisés sur la page Setup -> Widget.

Si vous développez un module fonctionnel, veuillez envisager de créer un nouveau problème GitHub ou une demande de retrait, et il pourra être inclus dans l'ensemble intégré.

Ouvrez l'un des modules Widget intégrés situés dans le répertoire Mycodo/mycodo/widgets pour voir des exemples de formatage approprié. Il existe également des exemples de Widgets personnalisés dans le répertoire Mycodo/mycodo/widgets/examples.

La création d'un module de widgets personnalisés nécessite souvent un placement et une exécution spécifiques de Javascript. Plusieurs variables ont été créées dans chaque module pour y remédier, et suivent la brève structure suivante de la page du tableau de bord qui serait générée avec l'affichage de plusieurs widgets.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.id/index.html b/Data-Viewing.id/index.html index f5a1f0fab..dbc3dee32 100644 --- a/Data-Viewing.id/index.html +++ b/Data-Viewing.id/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Lewati ke isi

Data Viewing

Live Measurements~

Page: Data -> Live Measurements

Halaman Pengukuran Langsung adalah halaman pertama yang dilihat pengguna setelah masuk ke Mycodo. Ini akan menampilkan pengukuran saat ini yang diperoleh dari pengontrol Input dan Fungsi. Jika tidak ada yang ditampilkan pada halaman Live, pastikan pengontrol Input atau Fungsi dikonfigurasi dengan benar dan diaktifkan. Data akan secara otomatis diperbarui pada halaman dari database pengukuran.

Asynchronous Graphs~

Page: data -> Asynchronous Graphs

Tampilan data grafis yang berguna untuk melihat kumpulan data yang mencakup periode waktu yang relatif lama (minggu/bulan/tahun), yang bisa jadi sangat intensif data dan prosesor untuk dilihat sebagai Grafik Sinkron. Pilih kerangka waktu dan data akan dimuat dari rentang waktu tersebut, jika ada. Tampilan pertama adalah seluruh kumpulan data yang dipilih. Untuk setiap tampilan/zoom, 700 titik data akan dimuat. Jika terdapat lebih dari 700 titik data yang direkam untuk rentang waktu yang dipilih, 700 titik akan dibuat dari rata-rata titik dalam rentang waktu tersebut. Hal ini memungkinkan data yang jauh lebih sedikit digunakan untuk menavigasi kumpulan data yang besar. Misalnya, data 4 bulan mungkin 10 megabyte jika semuanya diunduh. Namun, ketika melihat rentang waktu 4 bulan, tidak mungkin untuk melihat setiap titik data dari 10 megabyte itu, dan pengumpulan titik-titik tidak dapat dihindari. Dengan pemuatan data secara asinkron, Anda hanya mengunduh apa yang Anda lihat. Jadi, alih-alih mengunduh 10 megabyte setiap pemuatan grafik, hanya ~50kb yang akan diunduh hingga tingkat zoom baru dipilih, dan pada saat itu hanya ~50kb lagi yang diunduh.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Dasbor~

Page: data -> Dasbor

Dasbor dapat digunakan untuk melihat data dan memanipulasi sistem, berkat banyaknya widget dasbor yang tersedia. Beberapa dasbor dapat dibuat serta dikunci untuk mencegah perubahan pengaturan.

Widgets~

Widget adalah elemen pada Dasbor yang memiliki sejumlah kegunaan, seperti melihat data (grafik, indikator, pengukur, dll.) atau berinteraksi dengan sistem (memanipulasi output, mengubah siklus tugas PWM, menanyakan atau memodifikasi database, dll.). Widget dapat dengan mudah diatur ulang dan diubah ukurannya dengan menyeret dan menjatuhkan. Untuk daftar lengkap Widget yang didukung, lihat Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live Measurements~

Page: Data -> Live Measurements

Halaman Pengukuran Langsung adalah halaman pertama yang dilihat pengguna setelah masuk ke Mycodo. Ini akan menampilkan pengukuran saat ini yang diperoleh dari pengontrol Input dan Fungsi. Jika tidak ada yang ditampilkan pada halaman Live, pastikan pengontrol Input atau Fungsi dikonfigurasi dengan benar dan diaktifkan. Data akan secara otomatis diperbarui pada halaman dari database pengukuran.

Asynchronous Graphs~

Page: data -> Asynchronous Graphs

Tampilan data grafis yang berguna untuk melihat kumpulan data yang mencakup periode waktu yang relatif lama (minggu/bulan/tahun), yang bisa jadi sangat intensif data dan prosesor untuk dilihat sebagai Grafik Sinkron. Pilih kerangka waktu dan data akan dimuat dari rentang waktu tersebut, jika ada. Tampilan pertama adalah seluruh kumpulan data yang dipilih. Untuk setiap tampilan/zoom, 700 titik data akan dimuat. Jika terdapat lebih dari 700 titik data yang direkam untuk rentang waktu yang dipilih, 700 titik akan dibuat dari rata-rata titik dalam rentang waktu tersebut. Hal ini memungkinkan data yang jauh lebih sedikit digunakan untuk menavigasi kumpulan data yang besar. Misalnya, data 4 bulan mungkin 10 megabyte jika semuanya diunduh. Namun, ketika melihat rentang waktu 4 bulan, tidak mungkin untuk melihat setiap titik data dari 10 megabyte itu, dan pengumpulan titik-titik tidak dapat dihindari. Dengan pemuatan data secara asinkron, Anda hanya mengunduh apa yang Anda lihat. Jadi, alih-alih mengunduh 10 megabyte setiap pemuatan grafik, hanya ~50kb yang akan diunduh hingga tingkat zoom baru dipilih, dan pada saat itu hanya ~50kb lagi yang diunduh.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Dasbor~

Page: data -> Dasbor

Dasbor dapat digunakan untuk melihat data dan memanipulasi sistem, berkat banyaknya widget dasbor yang tersedia. Beberapa dasbor dapat dibuat serta dikunci untuk mencegah perubahan pengaturan.

Widgets~

Widget adalah elemen pada Dasbor yang memiliki sejumlah kegunaan, seperti melihat data (grafik, indikator, pengukur, dll.) atau berinteraksi dengan sistem (memanipulasi output, mengubah siklus tugas PWM, menanyakan atau memodifikasi database, dll.). Widget dapat dengan mudah diatur ulang dan diubah ukurannya dengan menyeret dan menjatuhkan. Untuk daftar lengkap Widget yang didukung, lihat Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.it/index.html b/Data-Viewing.it/index.html index 471d0372d..cd7454d07 100644 --- a/Data-Viewing.it/index.html +++ b/Data-Viewing.it/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Vai al contenuto

Data Viewing

Misure dal vivo~

Page: Data -> Live Measurements

La pagina Misure in tempo reale è la prima pagina che l'utente vede dopo aver effettuato l'accesso a Mycodo. Mostra le misure correnti acquisite dai controllori di ingresso e di funzione. Se non viene visualizzato nulla nella pagina Live, accertarsi che un controllore di ingresso o di funzione sia configurato correttamente e attivato. I dati saranno aggiornati automaticamente sulla pagina dal database delle misure.

Grafici asincroni~

Pagina: Dati -> Grafici asincroni

Una visualizzazione grafica dei dati utile per visualizzare insiemi di dati che coprono periodi di tempo relativamente lunghi (settimane/mesi/anni), che potrebbero essere molto impegnativi in termini di dati e di processore se visualizzati come grafico sincrono. Selezionando un intervallo di tempo, i dati verranno caricati da quell'intervallo, se esistente. La prima visualizzazione sarà quella dell'intero set di dati selezionato. Per ogni vista/zoom, verranno caricati 700 punti di dati. Se sono stati registrati più di 700 punti di dati per l'intervallo di tempo selezionato, verranno creati 700 punti da una media dei punti di quell'intervallo di tempo. In questo modo è possibile utilizzare una quantità di dati molto inferiore per navigare in un set di dati di grandi dimensioni. Ad esempio, 4 mesi di dati potrebbero essere 10 megabyte se venissero scaricati tutti. Tuttavia, quando si visualizza un arco di tempo di 4 mesi, non è possibile vedere tutti i punti dati di quei 10 megabyte e l'aggregazione dei punti è inevitabile. Con il caricamento asincrono dei dati, si scarica solo ciò che si vede. Quindi, invece di scaricare 10 megabyte a ogni caricamento del grafico, verranno scaricati solo ~50kb fino a quando non viene selezionato un nuovo livello di zoom, a quel punto verranno scaricati solo altri ~50kb.

Note

I grafici richiedono misurazioni, pertanto è necessario aggiungere e attivare almeno un ingresso/uscita/funzione/ecc. per poter visualizzare i dati.

Cruscotto~

Pagina: Dati -> Cruscotto

Il cruscotto può essere utilizzato sia per visualizzare i dati che per manipolare il sistema, grazie ai numerosi widget disponibili. È possibile creare più cruscotti e bloccarli per evitare di modificarne la disposizione.

Widget~

I widget sono elementi della Dashboard che possono essere utilizzati in vari modi, ad esempio per visualizzare i dati (grafici, indicatori, ecc.) o per interagire con il sistema (manipolare le uscite, modificare il ciclo di lavoro PWM, interrogare o modificare un database, ecc.) I widget possono essere facilmente riorganizzati e ridimensionati trascinandoli. Per un elenco completo dei widget supportati, vedere Widget supportati.

Widget personalizzati~

In Mycodo esiste un sistema di importazione di Widget personalizzati che consente di utilizzare nel sistema Mycodo i Widget creati dagli utenti. I widget personalizzati possono essere caricati nella pagina [Icona ingranaggio] -> Configura -> Widget personalizzati. Dopo l'importazione, saranno disponibili per l'uso nella pagina Impostazione -> Widget.

Se sviluppate un modulo funzionante, prendete in considerazione la possibilità di creare un nuovo problema su GitHub o una richiesta di pull, in modo da includerlo nel set integrato.

Aprire uno qualsiasi dei moduli Widget incorporati che si trovano nella directory Mycodo/mycodo/widgets per avere esempi di formattazione corretta. Ci sono anche esempi di widget personalizzati nella directory Mycodo/mycodo/widgets/examples.

La creazione di un modulo di widget personalizzato richiede spesso un posizionamento e un'esecuzione specifici di Javascript. Per questo motivo, in ogni modulo sono state create diverse variabili, che seguono la seguente breve struttura della pagina del dashboard che verrebbe generata con la visualizzazione di più widget.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Misure dal vivo~

Page: Data -> Live Measurements

La pagina Misure in tempo reale è la prima pagina che l'utente vede dopo aver effettuato l'accesso a Mycodo. Mostra le misure correnti acquisite dai controllori di ingresso e di funzione. Se non viene visualizzato nulla nella pagina Live, accertarsi che un controllore di ingresso o di funzione sia configurato correttamente e attivato. I dati saranno aggiornati automaticamente sulla pagina dal database delle misure.

Grafici asincroni~

Pagina: Dati -> Grafici asincroni

Una visualizzazione grafica dei dati utile per visualizzare insiemi di dati che coprono periodi di tempo relativamente lunghi (settimane/mesi/anni), che potrebbero essere molto impegnativi in termini di dati e di processore se visualizzati come grafico sincrono. Selezionando un intervallo di tempo, i dati verranno caricati da quell'intervallo, se esistente. La prima visualizzazione sarà quella dell'intero set di dati selezionato. Per ogni vista/zoom, verranno caricati 700 punti di dati. Se sono stati registrati più di 700 punti di dati per l'intervallo di tempo selezionato, verranno creati 700 punti da una media dei punti di quell'intervallo di tempo. In questo modo è possibile utilizzare una quantità di dati molto inferiore per navigare in un set di dati di grandi dimensioni. Ad esempio, 4 mesi di dati potrebbero essere 10 megabyte se venissero scaricati tutti. Tuttavia, quando si visualizza un arco di tempo di 4 mesi, non è possibile vedere tutti i punti dati di quei 10 megabyte e l'aggregazione dei punti è inevitabile. Con il caricamento asincrono dei dati, si scarica solo ciò che si vede. Quindi, invece di scaricare 10 megabyte a ogni caricamento del grafico, verranno scaricati solo ~50kb fino a quando non viene selezionato un nuovo livello di zoom, a quel punto verranno scaricati solo altri ~50kb.

Note

I grafici richiedono misurazioni, pertanto è necessario aggiungere e attivare almeno un ingresso/uscita/funzione/ecc. per poter visualizzare i dati.

Cruscotto~

Pagina: Dati -> Cruscotto

Il cruscotto può essere utilizzato sia per visualizzare i dati che per manipolare il sistema, grazie ai numerosi widget disponibili. È possibile creare più cruscotti e bloccarli per evitare di modificarne la disposizione.

Widget~

I widget sono elementi della Dashboard che possono essere utilizzati in vari modi, ad esempio per visualizzare i dati (grafici, indicatori, ecc.) o per interagire con il sistema (manipolare le uscite, modificare il ciclo di lavoro PWM, interrogare o modificare un database, ecc.) I widget possono essere facilmente riorganizzati e ridimensionati trascinandoli. Per un elenco completo dei widget supportati, vedere Widget supportati.

Widget personalizzati~

In Mycodo esiste un sistema di importazione di Widget personalizzati che consente di utilizzare nel sistema Mycodo i Widget creati dagli utenti. I widget personalizzati possono essere caricati nella pagina [Icona ingranaggio] -> Configura -> Widget personalizzati. Dopo l'importazione, saranno disponibili per l'uso nella pagina Impostazione -> Widget.

Se sviluppate un modulo funzionante, prendete in considerazione la possibilità di creare un nuovo problema su GitHub o una richiesta di pull, in modo da includerlo nel set integrato.

Aprire uno qualsiasi dei moduli Widget incorporati che si trovano nella directory Mycodo/mycodo/widgets per avere esempi di formattazione corretta. Ci sono anche esempi di widget personalizzati nella directory Mycodo/mycodo/widgets/examples.

La creazione di un modulo di widget personalizzato richiede spesso un posizionamento e un'esecuzione specifici di Javascript. Per questo motivo, in ogni modulo sono state create diverse variabili, che seguono la seguente breve struttura della pagina del dashboard che verrebbe generata con la visualizzazione di più widget.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.nl/index.html b/Data-Viewing.nl/index.html index f06de5c3d..e2a91a76e 100644 --- a/Data-Viewing.nl/index.html +++ b/Data-Viewing.nl/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Ga naar inhoud

Data Viewing

Live metingen~

Page: Data -> Live Measurements

De Live Measurements pagina is de eerste pagina die een gebruiker ziet na het inloggen op Mycodo. Het toont de huidige metingen die worden verkregen van ingangs- en functiecontrollers. Als er niets wordt weergegeven op de Live-pagina, zorg er dan voor dat een ingangs- of functiecontroller correct is geconfigureerd en geactiveerd. Gegevens worden automatisch bijgewerkt op de pagina vanuit de meetdatabase.

Asynchroon~

Pagina: Gegevens -> Asynchroon

Een grafische weergave van gegevens die nuttig is voor het bekijken van gegevensreeksen over relatief lange perioden (weken/maanden/jaren), die zeer gegevens- en processorintensief zouden kunnen zijn om te bekijken als een synchrone grafiek. Selecteer een tijdspanne en de gegevens worden geladen van die tijdspanne, als die bestaat. De eerste weergave betreft de gehele geselecteerde gegevensreeks. Voor elke weergave/zoom worden 700 datapunten geladen. Als er meer dan 700 datapunten zijn opgenomen voor de geselecteerde tijdspanne, worden 700 punten gecreëerd uit een gemiddelde van de punten in die tijdspanne. Hierdoor kunnen veel minder gegevens worden gebruikt om door een grote dataset te navigeren. Bijvoorbeeld, 4 maanden gegevens kunnen 10 megabytes zijn als ze allemaal werden gedownload. Bij het bekijken van een periode van 4 maanden is het echter niet mogelijk elk gegevenspunt van die 10 megabyte te zien, en is het samenvoegen van punten onvermijdelijk. Met asynchroon laden van gegevens downloadt u alleen wat u ziet. Dus in plaats van 10 megabyte te downloaden bij elke grafieklading, wordt slechts ~50kb gedownload tot een nieuw zoomniveau wordt geselecteerd, waarna nog eens ~50kb wordt gedownload.

Note

Grafieken vereisen metingen, daarom moet ten minste één ingang/uitgang/functie/etc. worden toegevoegd en geactiveerd om gegevens weer te geven.

Dashboard~

Pagina: Gegevens -> Dashboard

Het dashboard kan zowel worden gebruikt om gegevens te bekijken als om het systeem te manipuleren, dankzij de talrijke beschikbare dashboardwidgets. Er kunnen meerdere dashboards worden aangemaakt en vergrendeld om de indeling niet te wijzigen.

Widgets~

Widgets zijn elementen op het Dashboard die een aantal toepassingen hebben, zoals het bekijken van gegevens (grafieken, indicatoren, meters, enz.) of interactie met het systeem (uitgangen manipuleren, PWM duty cycle wijzigen, een database opvragen of wijzigen, enz.) Widgets kunnen gemakkelijk worden herschikt en van grootte veranderd door ze te verslepen. Voor een volledige lijst van ondersteunde Widgets, zie Ondersteunde Widgets.

Aangepaste Widgets~

Er is een systeem voor het importeren van aangepaste Widgets in Mycodo waarmee door gebruikers gemaakte Widgets in het Mycodo-systeem kunnen worden gebruikt. Aangepaste Widgets kunnen worden geüpload op de pagina [Versnellingspictogram] -> Configuratie -> Aangepaste Widgets. Na het importeren zijn ze beschikbaar voor gebruik op de pagina Instellen -> Widget.

Als je een werkende module ontwikkelt, overweeg dan een nieuw GitHub issue aanmaken of een pull request, en het kan worden opgenomen in de ingebouwde set.

Open een van de ingebouwde Widget-modules in de directory Mycodo/mycodo/widgets voor voorbeelden van de juiste opmaak. Er zijn ook voorbeelden van aangepaste Widgets in de map Mycodo/mycodo/widgets/voorbeelden.

Het maken van een aangepaste widgetmodule vereist vaak specifieke plaatsing en uitvoering van Javascript. In elke module werden verschillende variabelen gemaakt om dit aan te pakken, en de volgende korte structuur te volgen van de dashboardpagina die zou worden gegenereerd met meerdere widgets die worden weergegeven.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live metingen~

Page: Data -> Live Measurements

De Live Measurements pagina is de eerste pagina die een gebruiker ziet na het inloggen op Mycodo. Het toont de huidige metingen die worden verkregen van ingangs- en functiecontrollers. Als er niets wordt weergegeven op de Live-pagina, zorg er dan voor dat een ingangs- of functiecontroller correct is geconfigureerd en geactiveerd. Gegevens worden automatisch bijgewerkt op de pagina vanuit de meetdatabase.

Asynchroon~

Pagina: Gegevens -> Asynchroon

Een grafische weergave van gegevens die nuttig is voor het bekijken van gegevensreeksen over relatief lange perioden (weken/maanden/jaren), die zeer gegevens- en processorintensief zouden kunnen zijn om te bekijken als een synchrone grafiek. Selecteer een tijdspanne en de gegevens worden geladen van die tijdspanne, als die bestaat. De eerste weergave betreft de gehele geselecteerde gegevensreeks. Voor elke weergave/zoom worden 700 datapunten geladen. Als er meer dan 700 datapunten zijn opgenomen voor de geselecteerde tijdspanne, worden 700 punten gecreëerd uit een gemiddelde van de punten in die tijdspanne. Hierdoor kunnen veel minder gegevens worden gebruikt om door een grote dataset te navigeren. Bijvoorbeeld, 4 maanden gegevens kunnen 10 megabytes zijn als ze allemaal werden gedownload. Bij het bekijken van een periode van 4 maanden is het echter niet mogelijk elk gegevenspunt van die 10 megabyte te zien, en is het samenvoegen van punten onvermijdelijk. Met asynchroon laden van gegevens downloadt u alleen wat u ziet. Dus in plaats van 10 megabyte te downloaden bij elke grafieklading, wordt slechts ~50kb gedownload tot een nieuw zoomniveau wordt geselecteerd, waarna nog eens ~50kb wordt gedownload.

Note

Grafieken vereisen metingen, daarom moet ten minste één ingang/uitgang/functie/etc. worden toegevoegd en geactiveerd om gegevens weer te geven.

Dashboard~

Pagina: Gegevens -> Dashboard

Het dashboard kan zowel worden gebruikt om gegevens te bekijken als om het systeem te manipuleren, dankzij de talrijke beschikbare dashboardwidgets. Er kunnen meerdere dashboards worden aangemaakt en vergrendeld om de indeling niet te wijzigen.

Widgets~

Widgets zijn elementen op het Dashboard die een aantal toepassingen hebben, zoals het bekijken van gegevens (grafieken, indicatoren, meters, enz.) of interactie met het systeem (uitgangen manipuleren, PWM duty cycle wijzigen, een database opvragen of wijzigen, enz.) Widgets kunnen gemakkelijk worden herschikt en van grootte veranderd door ze te verslepen. Voor een volledige lijst van ondersteunde Widgets, zie Ondersteunde Widgets.

Aangepaste Widgets~

Er is een systeem voor het importeren van aangepaste Widgets in Mycodo waarmee door gebruikers gemaakte Widgets in het Mycodo-systeem kunnen worden gebruikt. Aangepaste Widgets kunnen worden geüpload op de pagina [Versnellingspictogram] -> Configuratie -> Aangepaste Widgets. Na het importeren zijn ze beschikbaar voor gebruik op de pagina Instellen -> Widget.

Als je een werkende module ontwikkelt, overweeg dan een nieuw GitHub issue aanmaken of een pull request, en het kan worden opgenomen in de ingebouwde set.

Open een van de ingebouwde Widget-modules in de directory Mycodo/mycodo/widgets voor voorbeelden van de juiste opmaak. Er zijn ook voorbeelden van aangepaste Widgets in de map Mycodo/mycodo/widgets/voorbeelden.

Het maken van een aangepaste widgetmodule vereist vaak specifieke plaatsing en uitvoering van Javascript. In elke module werden verschillende variabelen gemaakt om dit aan te pakken, en de volgende korte structuur te volgen van de dashboardpagina die zou worden gegenereerd met meerdere widgets die worden weergegeven.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.nn/index.html b/Data-Viewing.nn/index.html index 527e0822d..02a86f01e 100644 --- a/Data-Viewing.nn/index.html +++ b/Data-Viewing.nn/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Gå til innhald

Data Viewing

Live målinger~

Page: Data -> Live Measurements

The Live Measurements page is the first page a user sees after logging in to Mycodo. It will display the current measurements being acquired from Input and Function controllers. If there is nothing displayed on the Live page, ensure an Input or Function controller is both configured correctly and activated. Data will be automatically updated on the page from the measurement database.

Asynchronous Graphs~

Page: Data -> Asynchronous Graphs

A graphical data display that is useful for viewing data sets spanning relatively long periods of time (weeks/months/years), which could be very data- and processor-intensive to view as a Synchronous Graph. Select a time frame and data will be loaded from that time span, if it exists. The first view will be of the entire selected data set. For every view/zoom, 700 data points will be loaded. If there are more than 700 data points recorded for the time span selected, 700 points will be created from an averaging of the points in that time span. This enables much less data to be used to navigate a large data set. For instance, 4 months of data may be 10 megabytes if all of it were downloaded. However, when viewing a 4 month span, it's not possible to see every data point of that 10 megabytes, and aggregating of points is inevitable. With asynchronous loading of data, you only download what you see. So, instead of downloading 10 megabytes every graph load, only ~50kb will be downloaded until a new zoom level is selected, at which time only another ~50kb is downloaded.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

dashbord~

Page: Data -> dashbord

The dashboard can be used for both viewing data and manipulating the system, thanks to the numerous dashboard widgets available. Multiple dashboards can be created as well as locked to prevent changing the arrangement.

Widgets~

Widgets are elements on the Dashboard that have a number of uses, such as viewing data (charts, indicators, gauges, etc.) or interacting with the system (manipulate outputs, change PWM duty cycle, querying or modifying a database, etc.). Widgets can be easily rearranged and resized by dragging and dropping. For a full list of supported Widgets, see Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live målinger~

Page: Data -> Live Measurements

The Live Measurements page is the first page a user sees after logging in to Mycodo. It will display the current measurements being acquired from Input and Function controllers. If there is nothing displayed on the Live page, ensure an Input or Function controller is both configured correctly and activated. Data will be automatically updated on the page from the measurement database.

Asynchronous Graphs~

Page: Data -> Asynchronous Graphs

A graphical data display that is useful for viewing data sets spanning relatively long periods of time (weeks/months/years), which could be very data- and processor-intensive to view as a Synchronous Graph. Select a time frame and data will be loaded from that time span, if it exists. The first view will be of the entire selected data set. For every view/zoom, 700 data points will be loaded. If there are more than 700 data points recorded for the time span selected, 700 points will be created from an averaging of the points in that time span. This enables much less data to be used to navigate a large data set. For instance, 4 months of data may be 10 megabytes if all of it were downloaded. However, when viewing a 4 month span, it's not possible to see every data point of that 10 megabytes, and aggregating of points is inevitable. With asynchronous loading of data, you only download what you see. So, instead of downloading 10 megabytes every graph load, only ~50kb will be downloaded until a new zoom level is selected, at which time only another ~50kb is downloaded.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

dashbord~

Page: Data -> dashbord

The dashboard can be used for both viewing data and manipulating the system, thanks to the numerous dashboard widgets available. Multiple dashboards can be created as well as locked to prevent changing the arrangement.

Widgets~

Widgets are elements on the Dashboard that have a number of uses, such as viewing data (charts, indicators, gauges, etc.) or interacting with the system (manipulate outputs, change PWM duty cycle, querying or modifying a database, etc.). Widgets can be easily rearranged and resized by dragging and dropping. For a full list of supported Widgets, see Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.pl/index.html b/Data-Viewing.pl/index.html index 11c11f89a..fd8898c15 100644 --- a/Data-Viewing.pl/index.html +++ b/Data-Viewing.pl/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Przejdź do treści

Data Viewing

Pomiary żywo~

Page: Data -> Live Measurements

Strona Pomiary na żywo jest pierwszą stroną, którą widzi użytkownik po zalogowaniu się do Mycodo. Wyświetla ona aktualne pomiary uzyskane z kontrolerów wejścia i funkcji. Jeśli nic nie jest wyświetlane na stronie Live, upewnij się, że kontroler wejścia lub funkcji jest poprawnie skonfigurowany i aktywowany. Dane będą automatycznie aktualizowane na stronie z bazy danych pomiarów.

Wykresy asynchroniczne~

Strona: Dane -> Wykresy asynchroniczne

Graficzne wyświetlanie danych przydatne do przeglądania zestawów danych obejmujących stosunkowo długie okresy czasu (tygodnie/miesiące/roki), których wyświetlanie w postaci wykresu synchronicznego mogłoby wymagać dużej ilości danych i procesora. Po wybraniu przedziału czasowego zostaną wczytane dane z tego przedziału, jeśli istnieje. Pierwszy widok będzie dotyczył całego wybranego zestawu danych. Dla każdego widoku/powiększenia zostanie załadowanych 700 punktów danych. Jeśli dla wybranego przedziału czasowego zarejestrowano więcej niż 700 punktów danych, 700 punktów zostanie utworzonych z uśrednienia punktów w tym przedziale czasowym. Umożliwia to wykorzystanie znacznie mniejszej ilości danych do nawigacji po dużym zbiorze danych. Na przykład, 4 miesiące danych mogą mieć rozmiar 10 megabajtów, jeśli wszystkie zostaną pobrane. Jednak podczas przeglądania 4-miesięcznego okresu nie jest możliwe zobaczenie każdego punktu danych z tych 10 megabajtów, a agregacja punktów jest nieunikniona. Przy asynchronicznym ładowaniu danych, pobierasz tylko to, co widzisz. Tak więc, zamiast pobierać 10 megabajtów przy każdym ładowaniu wykresu, tylko ~50kb zostanie pobrane do momentu wybrania nowego poziomu powiększenia, w którym to momencie pobierane jest tylko kolejne ~50kb.

Note

Wykresy wymagają pomiarów, dlatego aby wyświetlić dane należy dodać i aktywować przynajmniej jedno Wejście/Wyjście/Funkcję/etc.

Pulpit~

Strona: Dane -> Pulpit

Dashboard może służyć zarówno do przeglądania danych, jak i do manipulowania systemem, dzięki licznym dostępnym widżetom dashboardowym. Można tworzyć wiele dashboardów, jak również zablokować je, aby uniemożliwić zmianę układu.

widgety~

Widżety to elementy na pulpicie nawigacyjnym, które mają wiele zastosowań, takich jak wyświetlanie danych (wykresy, wskaźniki, mierniki itp.) lub interakcja z systemem (manipulowanie wyjściami, zmiana cyklu pracy PWM, odpytywanie lub modyfikowanie bazy danych itp.) Widżety można łatwo zmieniać układ i rozmiar poprzez przeciąganie i upuszczanie. Pełna lista obsługiwanych Widżetów znajduje się w Obsługiwane Widżety.

Własne widżety~

W Mycodo istnieje system importu Custom Widget, który umożliwia wykorzystanie w systemie Mycodo widgetów stworzonych przez użytkownika. Custom Widgety można wgrać na stronie [Gear Icon] -> Configure -> Custom Widgets. Po zaimportowaniu będą one dostępne do użycia na stronie Setup -> Widget.

Jeśli opracujesz działający moduł, rozważ utworzenie nowego wydania GitHub lub pull request, a może on zostać włączony do wbudowanego zestawu.

Otwórz dowolny z wbudowanych modułów Widget znajdujących się w katalogu Mycodo/mycodo/widgets, aby uzyskać przykłady prawidłowego formatowania. Istnieją również przykładowe Widżety niestandardowe w katalogu Mycodo/mycodo/widgets/examples.

Tworzenie niestandardowego modułu widżetów często wymaga specyficznego umieszczenia i wykonania skryptów Javascript. W każdym module utworzono kilka zmiennych, aby rozwiązać ten problem, i podążać za następującą krótką strukturą strony pulpitu nawigacyjnego, która zostałaby wygenerowana przy wyświetlaniu wielu widżetów.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Pomiary żywo~

Page: Data -> Live Measurements

Strona Pomiary na żywo jest pierwszą stroną, którą widzi użytkownik po zalogowaniu się do Mycodo. Wyświetla ona aktualne pomiary uzyskane z kontrolerów wejścia i funkcji. Jeśli nic nie jest wyświetlane na stronie Live, upewnij się, że kontroler wejścia lub funkcji jest poprawnie skonfigurowany i aktywowany. Dane będą automatycznie aktualizowane na stronie z bazy danych pomiarów.

Wykresy asynchroniczne~

Strona: Dane -> Wykresy asynchroniczne

Graficzne wyświetlanie danych przydatne do przeglądania zestawów danych obejmujących stosunkowo długie okresy czasu (tygodnie/miesiące/roki), których wyświetlanie w postaci wykresu synchronicznego mogłoby wymagać dużej ilości danych i procesora. Po wybraniu przedziału czasowego zostaną wczytane dane z tego przedziału, jeśli istnieje. Pierwszy widok będzie dotyczył całego wybranego zestawu danych. Dla każdego widoku/powiększenia zostanie załadowanych 700 punktów danych. Jeśli dla wybranego przedziału czasowego zarejestrowano więcej niż 700 punktów danych, 700 punktów zostanie utworzonych z uśrednienia punktów w tym przedziale czasowym. Umożliwia to wykorzystanie znacznie mniejszej ilości danych do nawigacji po dużym zbiorze danych. Na przykład, 4 miesiące danych mogą mieć rozmiar 10 megabajtów, jeśli wszystkie zostaną pobrane. Jednak podczas przeglądania 4-miesięcznego okresu nie jest możliwe zobaczenie każdego punktu danych z tych 10 megabajtów, a agregacja punktów jest nieunikniona. Przy asynchronicznym ładowaniu danych, pobierasz tylko to, co widzisz. Tak więc, zamiast pobierać 10 megabajtów przy każdym ładowaniu wykresu, tylko ~50kb zostanie pobrane do momentu wybrania nowego poziomu powiększenia, w którym to momencie pobierane jest tylko kolejne ~50kb.

Note

Wykresy wymagają pomiarów, dlatego aby wyświetlić dane należy dodać i aktywować przynajmniej jedno Wejście/Wyjście/Funkcję/etc.

Pulpit~

Strona: Dane -> Pulpit

Dashboard może służyć zarówno do przeglądania danych, jak i do manipulowania systemem, dzięki licznym dostępnym widżetom dashboardowym. Można tworzyć wiele dashboardów, jak również zablokować je, aby uniemożliwić zmianę układu.

widgety~

Widżety to elementy na pulpicie nawigacyjnym, które mają wiele zastosowań, takich jak wyświetlanie danych (wykresy, wskaźniki, mierniki itp.) lub interakcja z systemem (manipulowanie wyjściami, zmiana cyklu pracy PWM, odpytywanie lub modyfikowanie bazy danych itp.) Widżety można łatwo zmieniać układ i rozmiar poprzez przeciąganie i upuszczanie. Pełna lista obsługiwanych Widżetów znajduje się w Obsługiwane Widżety.

Własne widżety~

W Mycodo istnieje system importu Custom Widget, który umożliwia wykorzystanie w systemie Mycodo widgetów stworzonych przez użytkownika. Custom Widgety można wgrać na stronie [Gear Icon] -> Configure -> Custom Widgets. Po zaimportowaniu będą one dostępne do użycia na stronie Setup -> Widget.

Jeśli opracujesz działający moduł, rozważ utworzenie nowego wydania GitHub lub pull request, a może on zostać włączony do wbudowanego zestawu.

Otwórz dowolny z wbudowanych modułów Widget znajdujących się w katalogu Mycodo/mycodo/widgets, aby uzyskać przykłady prawidłowego formatowania. Istnieją również przykładowe Widżety niestandardowe w katalogu Mycodo/mycodo/widgets/examples.

Tworzenie niestandardowego modułu widżetów często wymaga specyficznego umieszczenia i wykonania skryptów Javascript. W każdym module utworzono kilka zmiennych, aby rozwiązać ten problem, i podążać za następującą krótką strukturą strony pulpitu nawigacyjnego, która zostałaby wygenerowana przy wyświetlaniu wielu widżetów.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.pt/index.html b/Data-Viewing.pt/index.html index 4888c6788..f756ae9c1 100644 --- a/Data-Viewing.pt/index.html +++ b/Data-Viewing.pt/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Ir para o conteúdo

Data Viewing

Medições ao vivo~

Page: Data -> Live Measurements

A página "Medições em directo" é a primeira página que um utilizador vê depois de entrar no Mycodo. Irá mostrar as medidas actuais que estão a ser adquiridas dos controladores de Entrada e Função. Se não houver nada exibido na página Vivo, certifique-se de que um controlador de Entrada ou de Função está configurado correctamente e activado. Os dados serão automaticamente actualizados na página a partir da base de dados de medições.

Assíncrono~

Página: Dados -> Assíncrono

Uma visualização gráfica de dados que é útil para visualizar conjuntos de dados que abrangem períodos de tempo relativamente longos (semanas/meses/anos), que podem ser muito exigentes em termos de dados e de processador para serem visualizados como um Gráfico Síncrono. Seleccione um período de tempo e os dados serão carregados a partir desse período de tempo, se este existir. A primeira vista será de todo o conjunto de dados seleccionado. Para cada vista/zoom, 700 pontos de dados serão carregados. Se houver mais de 700 pontos de dados registados para o intervalo de tempo seleccionado, serão criados 700 pontos a partir de uma média dos pontos nesse intervalo de tempo. Isto permite que muito menos dados sejam utilizados para navegar num grande conjunto de dados. Por exemplo, 4 meses de dados podem ser de 10 megabytes se todos os dados forem descarregados. Contudo, ao visualizar um período de 4 meses, não é possível ver todos os pontos de dados desses 10 megabytes, e a agregação de pontos é inevitável. Com o carregamento assíncrono de dados, só é possível descarregar o que se vê. Assim, em vez de descarregar 10 megabytes por cada carga gráfica, apenas ~50kb serão descarregados até ser seleccionado um novo nível de zoom, altura em que apenas outros ~50kb serão descarregados.

Note

Os gráficos requerem medições, pelo que pelo menos uma Entrada/Saída/Função/etc. precisa de ser adicionada e activada para exibir os dados.

painel de controle~

Página: Dados -> painel de controle

O tablier pode ser utilizado tanto para visualizar dados como para manipular o sistema, graças aos numerosos widgets de tablier disponíveis. Podem ser criados vários painéis de instrumentos, bem como bloqueados para impedir a alteração da disposição.

Widgets~

Os Widgets são elementos do Painel que têm várias utilizações, tais como visualizar dados (gráficos, indicadores, medidores, etc.) ou interagir com o sistema (manipular saídas, alterar o ciclo de funcionamento do PWM, consultar ou modificar uma base de dados, etc.). Os widgets podem ser facilmente rearranjados e redimensionados por arrastar e largar. Para uma lista completa de Widgets suportados, ver Supported Widgets.

Widgets personalizados~

Existe um sistema personalizado de importação de Widgets em Mycodo que permite a utilização de Widgets criados pelo utilizador no sistema Mycodo. Os Widgets Personalizados podem ser carregados na página [Ícone do Equipamento] -> Configurar -> Widgets Personalizados'. Após a importação, estarão disponíveis para utilização na páginaSetup -> Widget`.

Se desenvolver um módulo de trabalho, considere criar uma nova edição do GitHub ou faça um pedido, e este pode ser incluído no conjunto integrado.

Abrir qualquer um dos módulos Widget integrados localizados no directório Mycodo/mycodo/widgets para exemplos da formatação adequada. Há também exemplos de Widgets personalizados no directório Mycodo/mycodo/widgets/examples.

A criação de um módulo widget personalizado requer frequentemente a colocação e execução específicas de Javascript. Várias variáveis foram criadas em cada módulo para tratar disto, e seguir a seguinte breve estrutura da página do painel que seria gerada com múltiplos widgets a serem exibidos.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Medições ao vivo~

Page: Data -> Live Measurements

A página "Medições em directo" é a primeira página que um utilizador vê depois de entrar no Mycodo. Irá mostrar as medidas actuais que estão a ser adquiridas dos controladores de Entrada e Função. Se não houver nada exibido na página Vivo, certifique-se de que um controlador de Entrada ou de Função está configurado correctamente e activado. Os dados serão automaticamente actualizados na página a partir da base de dados de medições.

Assíncrono~

Página: Dados -> Assíncrono

Uma visualização gráfica de dados que é útil para visualizar conjuntos de dados que abrangem períodos de tempo relativamente longos (semanas/meses/anos), que podem ser muito exigentes em termos de dados e de processador para serem visualizados como um Gráfico Síncrono. Seleccione um período de tempo e os dados serão carregados a partir desse período de tempo, se este existir. A primeira vista será de todo o conjunto de dados seleccionado. Para cada vista/zoom, 700 pontos de dados serão carregados. Se houver mais de 700 pontos de dados registados para o intervalo de tempo seleccionado, serão criados 700 pontos a partir de uma média dos pontos nesse intervalo de tempo. Isto permite que muito menos dados sejam utilizados para navegar num grande conjunto de dados. Por exemplo, 4 meses de dados podem ser de 10 megabytes se todos os dados forem descarregados. Contudo, ao visualizar um período de 4 meses, não é possível ver todos os pontos de dados desses 10 megabytes, e a agregação de pontos é inevitável. Com o carregamento assíncrono de dados, só é possível descarregar o que se vê. Assim, em vez de descarregar 10 megabytes por cada carga gráfica, apenas ~50kb serão descarregados até ser seleccionado um novo nível de zoom, altura em que apenas outros ~50kb serão descarregados.

Note

Os gráficos requerem medições, pelo que pelo menos uma Entrada/Saída/Função/etc. precisa de ser adicionada e activada para exibir os dados.

painel de controle~

Página: Dados -> painel de controle

O tablier pode ser utilizado tanto para visualizar dados como para manipular o sistema, graças aos numerosos widgets de tablier disponíveis. Podem ser criados vários painéis de instrumentos, bem como bloqueados para impedir a alteração da disposição.

Widgets~

Os Widgets são elementos do Painel que têm várias utilizações, tais como visualizar dados (gráficos, indicadores, medidores, etc.) ou interagir com o sistema (manipular saídas, alterar o ciclo de funcionamento do PWM, consultar ou modificar uma base de dados, etc.). Os widgets podem ser facilmente rearranjados e redimensionados por arrastar e largar. Para uma lista completa de Widgets suportados, ver Supported Widgets.

Widgets personalizados~

Existe um sistema personalizado de importação de Widgets em Mycodo que permite a utilização de Widgets criados pelo utilizador no sistema Mycodo. Os Widgets Personalizados podem ser carregados na página [Ícone do Equipamento] -> Configurar -> Widgets Personalizados'. Após a importação, estarão disponíveis para utilização na páginaSetup -> Widget`.

Se desenvolver um módulo de trabalho, considere criar uma nova edição do GitHub ou faça um pedido, e este pode ser incluído no conjunto integrado.

Abrir qualquer um dos módulos Widget integrados localizados no directório Mycodo/mycodo/widgets para exemplos da formatação adequada. Há também exemplos de Widgets personalizados no directório Mycodo/mycodo/widgets/examples.

A criação de um módulo widget personalizado requer frequentemente a colocação e execução específicas de Javascript. Várias variáveis foram criadas em cada módulo para tratar disto, e seguir a seguinte breve estrutura da página do painel que seria gerada com múltiplos widgets a serem exibidos.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.ru/index.html b/Data-Viewing.ru/index.html index fd87d4d87..f2c3e58ac 100644 --- a/Data-Viewing.ru/index.html +++ b/Data-Viewing.ru/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Перейти к содержанию

Data Viewing

Живые измерения~

Page: Data -> Live Measurements

Страница Live Measurements - это первая страница, которую видит пользователь после входа в Mycodo. На ней отображаются текущие измерения, получаемые от входных и функциональных контроллеров. Если на странице Live ничего не отображается, убедитесь, что входной или функциональный контроллер настроен правильно и активирован. Данные будут автоматически обновляться на этой странице из базы данных измерений.

асинхронный~

Page: Данные -> асинхронный

Графическое отображение данных, полезное для просмотра наборов данных, охватывающих относительно длительные периоды времени (недели/месяцы/годы), просмотр которых в виде синхронного графика может потребовать больших затрат данных и процессора. Выберите временной интервал, и данные будут загружены из этого временного интервала, если он существует. Первый просмотр будет всего выбранного набора данных. Для каждого вида/масштаба будет загружено 700 точек данных. Если для выбранного временного интервала записано более 700 точек данных, 700 точек будут созданы на основе усреднения точек этого временного интервала. Это позволяет использовать гораздо меньше данных для навигации по большому набору данных. Например, данные за 4 месяца могут занимать 10 мегабайт, если загрузить их все. Однако при просмотре данных за 4 месяца невозможно увидеть каждую точку данных из этих 10 мегабайт, и объединение точек неизбежно. При асинхронной загрузке данных вы загружаете только то, что видите. Таким образом, вместо загрузки 10 мегабайт при каждой загрузке графика, будет загружаться только ~50 кб, пока не будет выбран новый уровень масштабирования, и тогда будет загружено еще ~50 кб.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Панель управления~

Page: Данные -> Панель управления

Приборная панель может использоваться как для просмотра данных, так и для манипулирования системой благодаря многочисленным виджетам приборной панели. Можно создать несколько приборных панелей, а также заблокировать их для предотвращения изменения расположения.

Widgets~

Виджеты - это элементы приборной панели, которые могут использоваться для просмотра данных (графики, индикаторы, датчики и т.д.) или взаимодействия с системой (манипулирование выходами, изменение рабочего цикла ШИМ, запрос или изменение базы данных и т.д.). Виджеты можно легко переставлять и изменять их размер путем перетаскивания. Полный список поддерживаемых виджетов см. в Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Живые измерения~

Page: Data -> Live Measurements

Страница Live Measurements - это первая страница, которую видит пользователь после входа в Mycodo. На ней отображаются текущие измерения, получаемые от входных и функциональных контроллеров. Если на странице Live ничего не отображается, убедитесь, что входной или функциональный контроллер настроен правильно и активирован. Данные будут автоматически обновляться на этой странице из базы данных измерений.

асинхронный~

Page: Данные -> асинхронный

Графическое отображение данных, полезное для просмотра наборов данных, охватывающих относительно длительные периоды времени (недели/месяцы/годы), просмотр которых в виде синхронного графика может потребовать больших затрат данных и процессора. Выберите временной интервал, и данные будут загружены из этого временного интервала, если он существует. Первый просмотр будет всего выбранного набора данных. Для каждого вида/масштаба будет загружено 700 точек данных. Если для выбранного временного интервала записано более 700 точек данных, 700 точек будут созданы на основе усреднения точек этого временного интервала. Это позволяет использовать гораздо меньше данных для навигации по большому набору данных. Например, данные за 4 месяца могут занимать 10 мегабайт, если загрузить их все. Однако при просмотре данных за 4 месяца невозможно увидеть каждую точку данных из этих 10 мегабайт, и объединение точек неизбежно. При асинхронной загрузке данных вы загружаете только то, что видите. Таким образом, вместо загрузки 10 мегабайт при каждой загрузке графика, будет загружаться только ~50 кб, пока не будет выбран новый уровень масштабирования, и тогда будет загружено еще ~50 кб.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Панель управления~

Page: Данные -> Панель управления

Приборная панель может использоваться как для просмотра данных, так и для манипулирования системой благодаря многочисленным виджетам приборной панели. Можно создать несколько приборных панелей, а также заблокировать их для предотвращения изменения расположения.

Widgets~

Виджеты - это элементы приборной панели, которые могут использоваться для просмотра данных (графики, индикаторы, датчики и т.д.) или взаимодействия с системой (манипулирование выходами, изменение рабочего цикла ШИМ, запрос или изменение базы данных и т.д.). Виджеты можно легко переставлять и изменять их размер путем перетаскивания. Полный список поддерживаемых виджетов см. в Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.sr/index.html b/Data-Viewing.sr/index.html index 249818d1a..4d5e1b7aa 100644 --- a/Data-Viewing.sr/index.html +++ b/Data-Viewing.sr/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Иди на текст

Data Viewing

Ливе Меасурементс~

Page: Data -> Live Measurements

The Live Measurements page is the first page a user sees after logging in to Mycodo. It will display the current measurements being acquired from Input and Function controllers. If there is nothing displayed on the Live page, ensure an Input or Function controller is both configured correctly and activated. Data will be automatically updated on the page from the measurement database.

Асинц~

Page: Дата -> Асинц

A graphical data display that is useful for viewing data sets spanning relatively long periods of time (weeks/months/years), which could be very data- and processor-intensive to view as a Synchronous Graph. Select a time frame and data will be loaded from that time span, if it exists. The first view will be of the entire selected data set. For every view/zoom, 700 data points will be loaded. If there are more than 700 data points recorded for the time span selected, 700 points will be created from an averaging of the points in that time span. This enables much less data to be used to navigate a large data set. For instance, 4 months of data may be 10 megabytes if all of it were downloaded. However, when viewing a 4 month span, it's not possible to see every data point of that 10 megabytes, and aggregating of points is inevitable. With asynchronous loading of data, you only download what you see. So, instead of downloading 10 megabytes every graph load, only ~50kb will be downloaded until a new zoom level is selected, at which time only another ~50kb is downloaded.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Командна табла~

Page: Дата -> Командна табла

The dashboard can be used for both viewing data and manipulating the system, thanks to the numerous dashboard widgets available. Multiple dashboards can be created as well as locked to prevent changing the arrangement.

Widgets~

Widgets are elements on the Dashboard that have a number of uses, such as viewing data (charts, indicators, gauges, etc.) or interacting with the system (manipulate outputs, change PWM duty cycle, querying or modifying a database, etc.). Widgets can be easily rearranged and resized by dragging and dropping. For a full list of supported Widgets, see Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Ливе Меасурементс~

Page: Data -> Live Measurements

The Live Measurements page is the first page a user sees after logging in to Mycodo. It will display the current measurements being acquired from Input and Function controllers. If there is nothing displayed on the Live page, ensure an Input or Function controller is both configured correctly and activated. Data will be automatically updated on the page from the measurement database.

Асинц~

Page: Дата -> Асинц

A graphical data display that is useful for viewing data sets spanning relatively long periods of time (weeks/months/years), which could be very data- and processor-intensive to view as a Synchronous Graph. Select a time frame and data will be loaded from that time span, if it exists. The first view will be of the entire selected data set. For every view/zoom, 700 data points will be loaded. If there are more than 700 data points recorded for the time span selected, 700 points will be created from an averaging of the points in that time span. This enables much less data to be used to navigate a large data set. For instance, 4 months of data may be 10 megabytes if all of it were downloaded. However, when viewing a 4 month span, it's not possible to see every data point of that 10 megabytes, and aggregating of points is inevitable. With asynchronous loading of data, you only download what you see. So, instead of downloading 10 megabytes every graph load, only ~50kb will be downloaded until a new zoom level is selected, at which time only another ~50kb is downloaded.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Командна табла~

Page: Дата -> Командна табла

The dashboard can be used for both viewing data and manipulating the system, thanks to the numerous dashboard widgets available. Multiple dashboards can be created as well as locked to prevent changing the arrangement.

Widgets~

Widgets are elements on the Dashboard that have a number of uses, such as viewing data (charts, indicators, gauges, etc.) or interacting with the system (manipulate outputs, change PWM duty cycle, querying or modifying a database, etc.). Widgets can be easily rearranged and resized by dragging and dropping. For a full list of supported Widgets, see Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.sv/index.html b/Data-Viewing.sv/index.html index 08bb71526..7723b63bc 100644 --- a/Data-Viewing.sv/index.html +++ b/Data-Viewing.sv/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Gå till innehållet

Data Viewing

Live mätningar~

Page: Data -> Live Measurements

Sidan Live Measurements är den första sidan som en användare ser efter att ha loggat in på Mycodo. Den visar de aktuella mätningar som erhålls från styrenheter för ingång och funktion. Om det inte visas något på sidan Live ska du se till att en ingångs- eller funktionsregulator är både korrekt konfigurerad och aktiverad. Data kommer automatiskt att uppdateras på sidan från mätningsdatabasen.

Asynchronous Graphs~

Sidan: Data -> Asynchronous Graphs

En grafisk datavisning som är användbar för att visa datamängder som sträcker sig över relativt långa tidsperioder (veckor/månader/år), vilket kan vara mycket data- och processorkrävande att visa som en synkron graf. Välj en tidsram och data kommer att laddas från den tidsperioden, om den finns. Den första visningen kommer att vara av hela den valda datamängden. För varje vy/zoom kommer 700 datapunkter att laddas. Om det finns fler än 700 datapunkter registrerade för det valda tidsspannet kommer 700 punkter att skapas genom en genomsnittlig beräkning av punkterna i det tidsspannet. På så sätt kan mycket mindre data användas för att navigera i en stor datamängd. Exempelvis kan 4 månaders data vara 10 megabyte om alla data laddas ner. När man tittar på en 4-månadersperiod är det dock inte möjligt att se varje datapunkt i de 10 megabyte, och aggregering av punkter är oundviklig. Med asynkron laddning av data hämtar du bara det du ser. Så i stället för att ladda ner 10 megabyte varje gång grafen laddas, laddas endast ~50 kb ner tills en ny zoomnivå väljs, varvid endast ytterligare ~50 kb laddas ner.

Note

Grafer kräver mätningar, därför måste minst en ingång/utgång/funktion/etc. läggas till och aktiveras för att data ska kunna visas.

instrumentbräda~

Sidan: Data -> instrumentbräda

Instrumentpanelen kan användas både för att visa data och för att manipulera systemet, tack vare de många widgetar som finns tillgängliga. Flera instrumentpaneler kan skapas och låsas för att förhindra att arrangemanget ändras.

Widgets~

Widgets är element på instrumentpanelen som kan användas på olika sätt, t.ex. för att visa data (diagram, indikatorer, mätare osv.) eller för att interagera med systemet (manipulera utgångar, ändra PWM-tjänstgöringscykel, fråga eller ändra en databas osv.). Widgetar kan enkelt omorganiseras och ändras i storlek genom att dra och släppa dem. För en fullständig lista över widgets som stöds, se Supported Widgets.

Anpassade widgetar~

Det finns ett importsystem för anpassade widgetar i Mycodo som gör det möjligt att använda användarskapade widgetar i Mycodo-systemet. Anpassade widgetar kan laddas upp på sidan [Gear Icon] -> Configure -> Custom Widgets. Efter import kommer de att vara tillgängliga för användning på sidan Setup -> Widget.

Om du utvecklar en fungerande modul kan du överväga att skapa ett nytt GitHub-ärende eller en pull request, så att den kan inkluderas i den inbyggda uppsättningen.

Öppna någon av de inbyggda widgetmoduler som finns i katalogen Mycodo/mycodo/widgets för att få exempel på korrekt formatering. Det finns också exempel på anpassade widgets i katalogen Mycodo/mycodo/widgets/examples.

För att skapa en anpassad widgetmodul krävs ofta en specifik placering och utförande av Javascript. Flera variabler skapades i varje modul för att lösa detta och följer följande korta struktur för den instrumentbrädsida som skulle genereras när flera widgetar visas.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live mätningar~

Page: Data -> Live Measurements

Sidan Live Measurements är den första sidan som en användare ser efter att ha loggat in på Mycodo. Den visar de aktuella mätningar som erhålls från styrenheter för ingång och funktion. Om det inte visas något på sidan Live ska du se till att en ingångs- eller funktionsregulator är både korrekt konfigurerad och aktiverad. Data kommer automatiskt att uppdateras på sidan från mätningsdatabasen.

Asynchronous Graphs~

Sidan: Data -> Asynchronous Graphs

En grafisk datavisning som är användbar för att visa datamängder som sträcker sig över relativt långa tidsperioder (veckor/månader/år), vilket kan vara mycket data- och processorkrävande att visa som en synkron graf. Välj en tidsram och data kommer att laddas från den tidsperioden, om den finns. Den första visningen kommer att vara av hela den valda datamängden. För varje vy/zoom kommer 700 datapunkter att laddas. Om det finns fler än 700 datapunkter registrerade för det valda tidsspannet kommer 700 punkter att skapas genom en genomsnittlig beräkning av punkterna i det tidsspannet. På så sätt kan mycket mindre data användas för att navigera i en stor datamängd. Exempelvis kan 4 månaders data vara 10 megabyte om alla data laddas ner. När man tittar på en 4-månadersperiod är det dock inte möjligt att se varje datapunkt i de 10 megabyte, och aggregering av punkter är oundviklig. Med asynkron laddning av data hämtar du bara det du ser. Så i stället för att ladda ner 10 megabyte varje gång grafen laddas, laddas endast ~50 kb ner tills en ny zoomnivå väljs, varvid endast ytterligare ~50 kb laddas ner.

Note

Grafer kräver mätningar, därför måste minst en ingång/utgång/funktion/etc. läggas till och aktiveras för att data ska kunna visas.

instrumentbräda~

Sidan: Data -> instrumentbräda

Instrumentpanelen kan användas både för att visa data och för att manipulera systemet, tack vare de många widgetar som finns tillgängliga. Flera instrumentpaneler kan skapas och låsas för att förhindra att arrangemanget ändras.

Widgets~

Widgets är element på instrumentpanelen som kan användas på olika sätt, t.ex. för att visa data (diagram, indikatorer, mätare osv.) eller för att interagera med systemet (manipulera utgångar, ändra PWM-tjänstgöringscykel, fråga eller ändra en databas osv.). Widgetar kan enkelt omorganiseras och ändras i storlek genom att dra och släppa dem. För en fullständig lista över widgets som stöds, se Supported Widgets.

Anpassade widgetar~

Det finns ett importsystem för anpassade widgetar i Mycodo som gör det möjligt att använda användarskapade widgetar i Mycodo-systemet. Anpassade widgetar kan laddas upp på sidan [Gear Icon] -> Configure -> Custom Widgets. Efter import kommer de att vara tillgängliga för användning på sidan Setup -> Widget.

Om du utvecklar en fungerande modul kan du överväga att skapa ett nytt GitHub-ärende eller en pull request, så att den kan inkluderas i den inbyggda uppsättningen.

Öppna någon av de inbyggda widgetmoduler som finns i katalogen Mycodo/mycodo/widgets för att få exempel på korrekt formatering. Det finns också exempel på anpassade widgets i katalogen Mycodo/mycodo/widgets/examples.

För att skapa en anpassad widgetmodul krävs ofta en specifik placering och utförande av Javascript. Flera variabler skapades i varje modul för att lösa detta och följer följande korta struktur för den instrumentbrädsida som skulle genereras när flera widgetar visas.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.tr/index.html b/Data-Viewing.tr/index.html index b1961caf9..9e7baff8d 100644 --- a/Data-Viewing.tr/index.html +++ b/Data-Viewing.tr/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Ana içeriğe geç

Data Viewing

Live Measurements~

Page: Data -> Live Measurements

Canlı Ölçümler sayfası, bir kullanıcının Mycodo'ya giriş yaptıktan sonra gördüğü ilk sayfadır. Giriş ve Fonksiyon kontrolörlerinden alınan mevcut ölçümleri görüntüler. Canlı` sayfasında hiçbir şey görüntülenmiyorsa, bir Giriş veya Fonksiyon kontrolörünün hem doğru yapılandırıldığından hem de etkinleştirildiğinden emin olun. Veriler ölçüm veritabanından otomatik olarak sayfada güncellenecektir.

Asynchronous Graphs~

Page: Veri -> Asynchronous Graphs

Senkron Grafik olarak görüntülemek için çok veri ve işlemci yoğun olabilecek nispeten uzun zaman dilimlerini (haftalar/aylar/yıllar) kapsayan veri kümelerini görüntülemek için yararlı olan bir grafik veri ekranı. Bir zaman dilimi seçtiğinizde, eğer varsa, o zaman aralığındaki veriler yüklenecektir. İlk görünüm seçilen veri setinin tamamına ait olacaktır. Her görünüm/yakınlaştırma için 700 veri noktası yüklenecektir. Seçilen zaman aralığı için 700'den fazla veri noktası kaydedilmişse, 700 nokta o zaman aralığındaki noktaların ortalamasından oluşturulacaktır. Bu, büyük bir veri setinde gezinmek için çok daha az verinin kullanılmasını sağlar. Örneğin, 4 aylık verinin tamamı indirilirse 10 megabayt olabilir. Ancak, 4 aylık bir süreyi görüntülerken, bu 10 megabaytın her veri noktasını görmek mümkün değildir ve noktaların toplanması kaçınılmazdır. Eşzamansız veri yüklemesi ile yalnızca gördüğünüz kadarını indirirsiniz. Böylece, her grafik yüklemesinde 10 megabayt indirmek yerine, yeni bir yakınlaştırma seviyesi seçilene kadar yalnızca ~50kb indirilir ve bu sırada yalnızca ~50kb daha indirilir.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Gösterge Tablosu~

Page: Veri -> Gösterge Tablosu

Gösterge paneli, mevcut çok sayıda gösterge paneli widget'ı sayesinde hem verileri görüntülemek hem de sistemi manipüle etmek için kullanılabilir. Birden fazla gösterge tablosu oluşturulabilir ve düzenlemenin değiştirilmesini önlemek için kilitlenebilir.

Widgets~

Pencere öğeleri, Gösterge Tablosunda veri görüntüleme (grafikler, göstergeler, göstergeler, vb.) veya sistemle etkileşim (çıkışları manipüle etme, PWM görev döngüsünü değiştirme, bir veritabanını sorgulama veya değiştirme, vb.) Pencere öğeleri sürüklenip bırakılarak kolayca yeniden düzenlenebilir ve yeniden boyutlandırılabilir. Desteklenen Pencere Araçlarının tam listesi için Desteklenen Pencere Araçları bölümüne bakın.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live Measurements~

Page: Data -> Live Measurements

Canlı Ölçümler sayfası, bir kullanıcının Mycodo'ya giriş yaptıktan sonra gördüğü ilk sayfadır. Giriş ve Fonksiyon kontrolörlerinden alınan mevcut ölçümleri görüntüler. Canlı` sayfasında hiçbir şey görüntülenmiyorsa, bir Giriş veya Fonksiyon kontrolörünün hem doğru yapılandırıldığından hem de etkinleştirildiğinden emin olun. Veriler ölçüm veritabanından otomatik olarak sayfada güncellenecektir.

Asynchronous Graphs~

Page: Veri -> Asynchronous Graphs

Senkron Grafik olarak görüntülemek için çok veri ve işlemci yoğun olabilecek nispeten uzun zaman dilimlerini (haftalar/aylar/yıllar) kapsayan veri kümelerini görüntülemek için yararlı olan bir grafik veri ekranı. Bir zaman dilimi seçtiğinizde, eğer varsa, o zaman aralığındaki veriler yüklenecektir. İlk görünüm seçilen veri setinin tamamına ait olacaktır. Her görünüm/yakınlaştırma için 700 veri noktası yüklenecektir. Seçilen zaman aralığı için 700'den fazla veri noktası kaydedilmişse, 700 nokta o zaman aralığındaki noktaların ortalamasından oluşturulacaktır. Bu, büyük bir veri setinde gezinmek için çok daha az verinin kullanılmasını sağlar. Örneğin, 4 aylık verinin tamamı indirilirse 10 megabayt olabilir. Ancak, 4 aylık bir süreyi görüntülerken, bu 10 megabaytın her veri noktasını görmek mümkün değildir ve noktaların toplanması kaçınılmazdır. Eşzamansız veri yüklemesi ile yalnızca gördüğünüz kadarını indirirsiniz. Böylece, her grafik yüklemesinde 10 megabayt indirmek yerine, yeni bir yakınlaştırma seviyesi seçilene kadar yalnızca ~50kb indirilir ve bu sırada yalnızca ~50kb daha indirilir.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Gösterge Tablosu~

Page: Veri -> Gösterge Tablosu

Gösterge paneli, mevcut çok sayıda gösterge paneli widget'ı sayesinde hem verileri görüntülemek hem de sistemi manipüle etmek için kullanılabilir. Birden fazla gösterge tablosu oluşturulabilir ve düzenlemenin değiştirilmesini önlemek için kilitlenebilir.

Widgets~

Pencere öğeleri, Gösterge Tablosunda veri görüntüleme (grafikler, göstergeler, göstergeler, vb.) veya sistemle etkileşim (çıkışları manipüle etme, PWM görev döngüsünü değiştirme, bir veritabanını sorgulama veya değiştirme, vb.) Pencere öğeleri sürüklenip bırakılarak kolayca yeniden düzenlenebilir ve yeniden boyutlandırılabilir. Desteklenen Pencere Araçlarının tam listesi için Desteklenen Pencere Araçları bölümüne bakın.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing.zh/index.html b/Data-Viewing.zh/index.html index a8ea63cc3..c26b3e8d0 100644 --- a/Data-Viewing.zh/index.html +++ b/Data-Viewing.zh/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
跳转至

Data Viewing

实时测量~

Page: Data -> Live Measurements

实时测量 "页面是用户登录Mycodo后看到的第一个页面。它将显示当前从输入和功能控制器获得的测量结果。如果 "实时 "页面上没有显示,请确保输入或功能控制器配置正确并被激活。数据将从测量数据库中自动更新到该页面上。

异步~

Page: 数据 -> 异步

一种图形化的数据显示,对于查看跨度相对较长的时间段(周/月/年)的数据集很有用,如果以同步图的形式查看,可能会非常耗费数据和处理器。选择一个时间框架,如果存在的话,数据将从该时间段加载。第一个视图将是整个选定的数据集。对于每个视图/缩放,700个数据点将被加载。如果所选的时间跨度有超过700个数据点,700个点将从该时间跨度的点的平均数中产生。这样就可以用少得多的数据来浏览一个大的数据集。例如,如果全部下载,4个月的数据可能是10兆字节。然而,当查看4个月的时间跨度时,不可能看到这10兆字节的每一个数据点,点的聚集是不可避免的。通过数据的异步加载,你只下载你所看到的东西。因此,每次加载图表都要下载10兆字节的数据,而在选择新的缩放级别之前,只下载约50kb的数据,这时又只下载约50kb的数据。

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

仪表板~

Page: 数据 -> 仪表板

由于有许多仪表盘部件可用,仪表盘既可用于查看数据,也可用于操纵系统。可以创建多个仪表盘,也可以锁定以防止改变安排。

Widgets~

部件是仪表板上的元素,有多种用途,如查看数据(图表、指标、仪表等)或与系统互动(操纵输出、改变PWM占空比、查询或修改数据库等)。小工具可以通过拖放轻松地重新安排和调整大小。关于支持的Widgets的完整列表,见[支持的Widgets

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

实时测量~

Page: Data -> Live Measurements

实时测量 "页面是用户登录Mycodo后看到的第一个页面。它将显示当前从输入和功能控制器获得的测量结果。如果 "实时 "页面上没有显示,请确保输入或功能控制器配置正确并被激活。数据将从测量数据库中自动更新到该页面上。

异步~

Page: 数据 -> 异步

一种图形化的数据显示,对于查看跨度相对较长的时间段(周/月/年)的数据集很有用,如果以同步图的形式查看,可能会非常耗费数据和处理器。选择一个时间框架,如果存在的话,数据将从该时间段加载。第一个视图将是整个选定的数据集。对于每个视图/缩放,700个数据点将被加载。如果所选的时间跨度有超过700个数据点,700个点将从该时间跨度的点的平均数中产生。这样就可以用少得多的数据来浏览一个大的数据集。例如,如果全部下载,4个月的数据可能是10兆字节。然而,当查看4个月的时间跨度时,不可能看到这10兆字节的每一个数据点,点的聚集是不可避免的。通过数据的异步加载,你只下载你所看到的东西。因此,每次加载图表都要下载10兆字节的数据,而在选择新的缩放级别之前,只下载约50kb的数据,这时又只下载约50kb的数据。

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

仪表板~

Page: 数据 -> 仪表板

由于有许多仪表盘部件可用,仪表盘既可用于查看数据,也可用于操纵系统。可以创建多个仪表盘,也可以锁定以防止改变安排。

Widgets~

部件是仪表板上的元素,有多种用途,如查看数据(图表、指标、仪表等)或与系统互动(操纵输出、改变PWM占空比、查询或修改数据库等)。小工具可以通过拖放轻松地重新安排和调整大小。关于支持的Widgets的完整列表,见[支持的Widgets

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Data-Viewing/index.html b/Data-Viewing/index.html index 52073176c..79e5adc33 100644 --- a/Data-Viewing/index.html +++ b/Data-Viewing/index.html @@ -1,4 +1,4 @@ - Data Viewing - Mycodo
Skip to content

Data Viewing

Live Measurements~

Page: Data -> Live Measurements

The Live Measurements page is the first page a user sees after logging in to Mycodo. It will display the current measurements being acquired from Input and Function controllers. If there is nothing displayed on the Live page, ensure an Input or Function controller is both configured correctly and activated. Data will be automatically updated on the page from the measurement database.

Asynchronous Graphs~

Page: Data -> Asynchronous Graphs

A graphical data display that is useful for viewing data sets spanning relatively long periods of time (weeks/months/years), which could be very data- and processor-intensive to view as a Synchronous Graph. Select a time frame and data will be loaded from that time span, if it exists. The first view will be of the entire selected data set. For every view/zoom, 700 data points will be loaded. If there are more than 700 data points recorded for the time span selected, 700 points will be created from an averaging of the points in that time span. This enables much less data to be used to navigate a large data set. For instance, 4 months of data may be 10 megabytes if all of it were downloaded. However, when viewing a 4 month span, it's not possible to see every data point of that 10 megabytes, and aggregating of points is inevitable. With asynchronous loading of data, you only download what you see. So, instead of downloading 10 megabytes every graph load, only ~50kb will be downloaded until a new zoom level is selected, at which time only another ~50kb is downloaded.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Dashboard~

Page: Data -> Dashboard

The dashboard can be used for both viewing data and manipulating the system, thanks to the numerous dashboard widgets available. Multiple dashboards can be created as well as locked to prevent changing the arrangement.

Widgets~

Widgets are elements on the Dashboard that have a number of uses, such as viewing data (charts, indicators, gauges, etc.) or interacting with the system (manipulate outputs, change PWM duty cycle, querying or modifying a database, etc.). Widgets can be easily rearranged and resized by dragging and dropping. For a full list of supported Widgets, see Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
+ Data Viewing - Mycodo      

Data Viewing

Live Measurements~

Page: Data -> Live Measurements

The Live Measurements page is the first page a user sees after logging in to Mycodo. It will display the current measurements being acquired from Input and Function controllers. If there is nothing displayed on the Live page, ensure an Input or Function controller is both configured correctly and activated. Data will be automatically updated on the page from the measurement database.

Asynchronous Graphs~

Page: Data -> Asynchronous Graphs

A graphical data display that is useful for viewing data sets spanning relatively long periods of time (weeks/months/years), which could be very data- and processor-intensive to view as a Synchronous Graph. Select a time frame and data will be loaded from that time span, if it exists. The first view will be of the entire selected data set. For every view/zoom, 700 data points will be loaded. If there are more than 700 data points recorded for the time span selected, 700 points will be created from an averaging of the points in that time span. This enables much less data to be used to navigate a large data set. For instance, 4 months of data may be 10 megabytes if all of it were downloaded. However, when viewing a 4 month span, it's not possible to see every data point of that 10 megabytes, and aggregating of points is inevitable. With asynchronous loading of data, you only download what you see. So, instead of downloading 10 megabytes every graph load, only ~50kb will be downloaded until a new zoom level is selected, at which time only another ~50kb is downloaded.

Note

Graphs require measurements, therefore at least one Input/Output/Function/etc. needs to be added and activated in order to display data.

Dashboard~

Page: Data -> Dashboard

The dashboard can be used for both viewing data and manipulating the system, thanks to the numerous dashboard widgets available. Multiple dashboards can be created as well as locked to prevent changing the arrangement.

Widgets~

Widgets are elements on the Dashboard that have a number of uses, such as viewing data (charts, indicators, gauges, etc.) or interacting with the system (manipulate outputs, change PWM duty cycle, querying or modifying a database, etc.). Widgets can be easily rearranged and resized by dragging and dropping. For a full list of supported Widgets, see Supported Widgets.

Custom Widgets~

There is a Custom Widget import system in Mycodo that allows user-created Widgets to be used in the Mycodo system. Custom Widgets can be uploaded on the [Gear Icon] -> Configure -> Custom Widgets page. After import, they will be available to use on the Setup -> Widget page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in Widget modules located in the directory Mycodo/mycodo/widgets for examples of the proper formatting. There are also example Custom Widgets in the directory Mycodo/mycodo/widgets/examples.

Creating a custom widget module often requires specific placement and execution of Javascript. Several variables were created in each module to address this, and follow the following brief structure of the dashboard page that would be generated with multiple widgets being displayed.

<html>
 <head>
   <title>Title</title>
   <script>
@@ -40,4 +40,4 @@
 
 </body>
 </html>
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Dependencies/index.html b/Dependencies/index.html index 3ceaa0957..c103fb9e2 100644 --- a/Dependencies/index.html +++ b/Dependencies/index.html @@ -1 +1 @@ - Dependencies - Mycodo

Dependencies

Page: [Gear Icon] -> Dependencies

The dependency page allows viewing of dependency information and the ability to initiate their installation. This is not something you will need to normally do, as dependencies are installed on an as-needed basis. If an Input, Output, Function, or other device you're adding has unmet dependencies, you will be prompted to install them when you attempt to install that device.

\ No newline at end of file + Dependencies - Mycodo

Dependencies

Page: [Gear Icon] -> Dependencies

The dependency page allows viewing of dependency information and the ability to initiate their installation. This is not something you will need to normally do, as dependencies are installed on an as-needed basis. If an Input, Output, Function, or other device you're adding has unmet dependencies, you will be prompted to install them when you attempt to install that device.

\ No newline at end of file diff --git a/Device-Notes/index.html b/Device-Notes/index.html index caaa33b55..cfb8164bb 100644 --- a/Device-Notes/index.html +++ b/Device-Notes/index.html @@ -1,4 +1,4 @@ - Device Notes - Mycodo
Skip to content

Device Notes

This information may not be current, so always reference and follow manufacturer recommendations for operating their devices.

Edge Detection~

The detection of a changing signal, for instance a simple switch completing a circuit, requires the use of edge detection. By detecting a rising edge (LOW to HIGH), a falling edge (HIGH to LOW), or both, actions or events can be triggered. The GPIO chosen to detect the signal should be equipped with an appropriate resistor that either pulls the GPIO up [to 5-volts] or down [to ground]. The option to enable the internal pull-up or pull-down resistors is not available for safety reasons. Use your own resistor to pull the GPIO high or low.

Examples of devices that can be used with edge detection: simple switches and buttons, PIR motion sensors, reed switches, hall effect sensors, float switches, and more.

Displays~

There are only a few number fo displays that are supported. 16x2 and 20x4 character LCD displays with I2C backpacks and the 128x32 / 128x64 OLED displays are supported. The below image is the type of device with the I2C backpack that should be compatible. See Supported Functions for more information.

image4

Raspberry Pi~

The Raspberry Pi has an integrated temperature sensor on the BCM2835 SoC that measure the temperature of the CPU/GPU. This is the easiest sensor to set up in Mycodo, as it is immediately available to be used.

AM2315~

From @Theoi-Meteoroi on GitHub:

I figured out why this [AM2315] sensor is unreliable with Rpi3 hardware I2C. It is among a number of I2C devices that really hates the BCM2835 clock stretching blunder (hardware bug: raspberrypi/linux#254). The wakeup attempts fail, consistently. I checked the bitstream with a sniffer, and see that the sensor may respond once out of 20 or so tries (or not at all) but only with a single byte returned. The solution is to use a software implementation of the I2C bus. You need to add pull-up resistors (4.7k is dandy) to 3.3v and install the i2c_gpio device overlay. Seems to work fine now, will run for a few days, but the CRC failures are gone and I get good readings, every time. And no twiddling the power for the sensor is required.

To enable software I2C, add the following line to your /boot/config.txt

dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=4

After rebooting, a new I2C bus at /dev/i2c-3 should exist with SDA on pin 23 (BCM) and SCL on pin 24 (BCM). Make sure you add the appropriate pull-up resistors before connecting any devices.

K-30~

image5

Be very careful when connecting the K-30, as there is no reverse-voltage protection and improper connections could destroy your sensor.

Wiring instructions for the Raspberry Pi can be found here.

USB Device Persistence Across Reboots~

From (#547) Theoi-Meteoroi on Github:

Using USB devices, such as USB-to-serial interfaces (CP210x) to connect a sensor, while convenient, poses an issue if there are multiple devices when the system reboots. After a reboot, there is no guarantee the device will persist with the same name. For instance, if Sensor A is /dev/ttyUSB0 and Sensor B is /dev/ttyUSB1, after a reboot Sensor A may be /dev/ttyUSB1 and Sensor B may be /dev/ttyUSB0. This will cause Mycodo to query the wrong device for a measurement, potentially causing a mis-measurement, or worse, an incorrect measurement because the response is not from the correct sensor (I've seen my temperature sensor read 700+ degrees celsius because of this!). Follow the instructions below to alleviate this issue.

I use udev to create a persistent device name ('/dev/dust-sensor') that will be linked to the /dev/ttyUSBn that is chosen at device arrival in the kernel. The only requirement is some attribute returned from the USB device that is unique. The common circumstance is that none of the attributes are unique and you get stuck with just VID and PID, which is ok as long as you don't have any other adapters that report the same VID and PID. If you have multiple adapters with the same VID and PID, then hopefully they have some unique attribute. This command will walk the attributes. Run on each USB device and then compare differences to possibly find some attribute to use.

udevadm info --name=/dev/ttyUSB0 --attribute-walk

I ended up using the serial number on the ZH03B to program the USB adapter serial field. This way guarantees unique serial numbers rather than me trying to remember what was the last serial number I used to increment by 1.

When you plug a USB device in it can be enumerated to different device names by the operating system. To fix this problem for this sensor on linux, I changed attributes that make the connection unique.

First - find the VID and PID for the USB device:

pi@raspberry:~ $ lsusb
+ Device Notes - Mycodo      

Device Notes

This information may not be current, so always reference and follow manufacturer recommendations for operating their devices.

Edge Detection~

The detection of a changing signal, for instance a simple switch completing a circuit, requires the use of edge detection. By detecting a rising edge (LOW to HIGH), a falling edge (HIGH to LOW), or both, actions or events can be triggered. The GPIO chosen to detect the signal should be equipped with an appropriate resistor that either pulls the GPIO up [to 5-volts] or down [to ground]. The option to enable the internal pull-up or pull-down resistors is not available for safety reasons. Use your own resistor to pull the GPIO high or low.

Examples of devices that can be used with edge detection: simple switches and buttons, PIR motion sensors, reed switches, hall effect sensors, float switches, and more.

Displays~

There are only a few number fo displays that are supported. 16x2 and 20x4 character LCD displays with I2C backpacks and the 128x32 / 128x64 OLED displays are supported. The below image is the type of device with the I2C backpack that should be compatible. See Supported Functions for more information.

image4

Raspberry Pi~

The Raspberry Pi has an integrated temperature sensor on the BCM2835 SoC that measure the temperature of the CPU/GPU. This is the easiest sensor to set up in Mycodo, as it is immediately available to be used.

AM2315~

From @Theoi-Meteoroi on GitHub:

I figured out why this [AM2315] sensor is unreliable with Rpi3 hardware I2C. It is among a number of I2C devices that really hates the BCM2835 clock stretching blunder (hardware bug: raspberrypi/linux#254). The wakeup attempts fail, consistently. I checked the bitstream with a sniffer, and see that the sensor may respond once out of 20 or so tries (or not at all) but only with a single byte returned. The solution is to use a software implementation of the I2C bus. You need to add pull-up resistors (4.7k is dandy) to 3.3v and install the i2c_gpio device overlay. Seems to work fine now, will run for a few days, but the CRC failures are gone and I get good readings, every time. And no twiddling the power for the sensor is required.

To enable software I2C, add the following line to your /boot/config.txt

dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=4

After rebooting, a new I2C bus at /dev/i2c-3 should exist with SDA on pin 23 (BCM) and SCL on pin 24 (BCM). Make sure you add the appropriate pull-up resistors before connecting any devices.

K-30~

image5

Be very careful when connecting the K-30, as there is no reverse-voltage protection and improper connections could destroy your sensor.

Wiring instructions for the Raspberry Pi can be found here.

USB Device Persistence Across Reboots~

From (#547) Theoi-Meteoroi on Github:

Using USB devices, such as USB-to-serial interfaces (CP210x) to connect a sensor, while convenient, poses an issue if there are multiple devices when the system reboots. After a reboot, there is no guarantee the device will persist with the same name. For instance, if Sensor A is /dev/ttyUSB0 and Sensor B is /dev/ttyUSB1, after a reboot Sensor A may be /dev/ttyUSB1 and Sensor B may be /dev/ttyUSB0. This will cause Mycodo to query the wrong device for a measurement, potentially causing a mis-measurement, or worse, an incorrect measurement because the response is not from the correct sensor (I've seen my temperature sensor read 700+ degrees celsius because of this!). Follow the instructions below to alleviate this issue.

I use udev to create a persistent device name ('/dev/dust-sensor') that will be linked to the /dev/ttyUSBn that is chosen at device arrival in the kernel. The only requirement is some attribute returned from the USB device that is unique. The common circumstance is that none of the attributes are unique and you get stuck with just VID and PID, which is ok as long as you don't have any other adapters that report the same VID and PID. If you have multiple adapters with the same VID and PID, then hopefully they have some unique attribute. This command will walk the attributes. Run on each USB device and then compare differences to possibly find some attribute to use.

udevadm info --name=/dev/ttyUSB0 --attribute-walk

I ended up using the serial number on the ZH03B to program the USB adapter serial field. This way guarantees unique serial numbers rather than me trying to remember what was the last serial number I used to increment by 1.

When you plug a USB device in it can be enumerated to different device names by the operating system. To fix this problem for this sensor on linux, I changed attributes that make the connection unique.

First - find the VID and PID for the USB device:

pi@raspberry:~ $ lsusb
 Bus 001 Device 008: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
 Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
 Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
@@ -10,4 +10,4 @@
 

Now I have an attribute to tell udev what to do. I create a file in /etc/udev/rules.d with a name like "99-dustsensor.rules". In that file I tell udev what device name to create when it sees this device plugged in:

SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="ZH03B180904" SYMLINK+="dust-sensor"

To test the new rule:

pi@raspberry:/dev $ sudo udevadm trigger
 pi@raspberry:/dev $ ls -al dust-sensor
 lrwxrwxrwx 1 root root 7 Oct 6 21:04 dust-sensor -> ttyUSB0
-

Now, every time the dust sensor is plugged in, it shows up at /dev/dust-sensor

Diagrams~

DHT11 Diagrams~

Schematic-Sensor-DHT11-01

Schematic-Sensor-DHT11-02

DS18B20 Diagrams~

Schematic-Sensor-DS18B20-01

Schematic-Sensor-DS18B20-02

Schematic-Sensor-DS18B20-03

Raspberry Pi and Relay Diagrams~

Raspberry Pi, 4 relays, 4 outlets, 1 DS18B20 sensor~

Schematic: Pi, 4 relays, 4 outlets, and 1 DS18B20 sensor

Raspberry Pi, 8 relays, 8 outlets~

Schematic: Pi, 8 relays, and 8 outlets

\ No newline at end of file +

Now, every time the dust sensor is plugged in, it shows up at /dev/dust-sensor

Diagrams~

DHT11 Diagrams~

Schematic-Sensor-DHT11-01

Schematic-Sensor-DHT11-02

DS18B20 Diagrams~

Schematic-Sensor-DS18B20-01

Schematic-Sensor-DS18B20-02

Schematic-Sensor-DS18B20-03

Raspberry Pi and Relay Diagrams~

Raspberry Pi, 4 relays, 4 outlets, 1 DS18B20 sensor~

Schematic: Pi, 4 relays, 4 outlets, and 1 DS18B20 sensor

Raspberry Pi, 8 relays, 8 outlets~

Schematic: Pi, 8 relays, and 8 outlets

\ No newline at end of file diff --git a/Energy-Usage/index.html b/Energy-Usage/index.html index 539392f4c..9f94415c0 100644 --- a/Energy-Usage/index.html +++ b/Energy-Usage/index.html @@ -1 +1 @@ - Energy Usage - Mycodo

Energy Usage

Page: More -> Energy Usage

There are two methods for calculating energy usage. The first relies on determining how long Outputs have been on. Based on this, if the number of Amps the output draws has been set in the output Settings, then the kWh and cost can be calculated. Discovering the number of amps the device draws can be accomplished by calculating this from the output typically given as watts on the device label, or with the use of a current clamp while the device is operating. The limitation of this method is PWM Outputs are not currently used to calculate these figures due to the difficulty determining the current consumption of devices driven by PWM signals.

The second method for calculating energy consumption is more accurate and is the recommended method if you desire the most accurate estimation of energy consumption and cost. This method relies on an Input or Function measuring Amps. One way to do this is with the used of an analog-to-digital converter (ADC) that converts the voltage output from a transformer into current (Amps). One wire from the AC line that powers your device(s) passes thorough the transformer and the device converts the current that passes through that wire into a voltage that corresponds to the amperage. For instance, the below sensor converts 0 -50 amps input to 0 - 5 volts output. An ADC receives this output as its input. One would set this conversion range in Mycodo and the calculated amperage will be stored. On the Energy Usage page, add this ADC Input measurement and a report summary will be generated. Keep in mind that for a particular period (for example, the past week) to be accurate, there needs to be a constant measurement of amps at a periodic rate. The faster the rate the more accurate the calculation will be. This is due to the amperage measurements being averaged for this period prior to calculating kWh and cost. If there is any time turing this period where amp measurements aren't being acquired when in fact there are devices consuming current, the calculation is likely to not be accurate.

Current Sensor Transformer

Greystone CS-650-50 AC Solid Core Current Sensor (Transformer)

The following settings are for calculating energy usage from an amp measurement. For calculating based on Output duration, see Energy Usage Settings.

Setting Description
Select Amp Measurement This is a measurement with the amp (A) units that will be used to calculate energy usage.
\ No newline at end of file + Energy Usage - Mycodo

Energy Usage

Page: More -> Energy Usage

There are two methods for calculating energy usage. The first relies on determining how long Outputs have been on. Based on this, if the number of Amps the output draws has been set in the output Settings, then the kWh and cost can be calculated. Discovering the number of amps the device draws can be accomplished by calculating this from the output typically given as watts on the device label, or with the use of a current clamp while the device is operating. The limitation of this method is PWM Outputs are not currently used to calculate these figures due to the difficulty determining the current consumption of devices driven by PWM signals.

The second method for calculating energy consumption is more accurate and is the recommended method if you desire the most accurate estimation of energy consumption and cost. This method relies on an Input or Function measuring Amps. One way to do this is with the used of an analog-to-digital converter (ADC) that converts the voltage output from a transformer into current (Amps). One wire from the AC line that powers your device(s) passes thorough the transformer and the device converts the current that passes through that wire into a voltage that corresponds to the amperage. For instance, the below sensor converts 0 -50 amps input to 0 - 5 volts output. An ADC receives this output as its input. One would set this conversion range in Mycodo and the calculated amperage will be stored. On the Energy Usage page, add this ADC Input measurement and a report summary will be generated. Keep in mind that for a particular period (for example, the past week) to be accurate, there needs to be a constant measurement of amps at a periodic rate. The faster the rate the more accurate the calculation will be. This is due to the amperage measurements being averaged for this period prior to calculating kWh and cost. If there is any time turing this period where amp measurements aren't being acquired when in fact there are devices consuming current, the calculation is likely to not be accurate.

Current Sensor Transformer

Greystone CS-650-50 AC Solid Core Current Sensor (Transformer)

The following settings are for calculating energy usage from an amp measurement. For calculating based on Output duration, see Energy Usage Settings.

Setting Description
Select Amp Measurement This is a measurement with the amp (A) units that will be used to calculate energy usage.
\ No newline at end of file diff --git a/Error-Codes/index.html b/Error-Codes/index.html index 7a49eca32..1a9dabe9e 100644 --- a/Error-Codes/index.html +++ b/Error-Codes/index.html @@ -1 +1 @@ - Error Codes - Mycodo
Skip to content

Error Codes

Error Codes~

Mycodo can return a number of different errors. Below are a few of the numbered errors that you may receive and information about how to diagnose the issue.

Error 100~

Cannot set a value of 'X' of type Y. Must be a float or string representing a float.

  • Examples:
  • Cannot set a value of '1.33.4' of type str.
  • Cannot set a value of 'Output: 1.2' of type str.
  • Cannot set a value of '[1.3, 2.4]' of type list.
  • Cannot set a value of '{"output": 1.99}' of type dict.
  • Cannot set a value of 'None' of type Nonetype.

This error occurs because the value provided to be stored in the influxdb time-series database is not a numerical value (integer or decimal/float) or it is not a string that represents a float (e.g. "5", "3.14"). There are a number of reasons why this error occurs, but the most common reason is the sensor being ready by an Input did not return a measurement when queried, or it returned something other than something that represents a numerical value, indicating the sensor is not working. This could be from a number of reasons, including but not limited to, faulty wiring, faulty/insufficient power supply, defective sensor, I2C bus hasn't been enabled, misconfigured settings, etc. Often, a sensor can fail or not get set up correctly during Input initialization when the daemon starts, leading to this error every measurement period. You will need to review the Daemon Log ([Gear Icon] -> Mycodo Logs) all the way back to when the daemon started (since this is when the Input started and potentially failed with an initial error that may be more informative). Enabling Log Level: Debug in the Controller setting can also be useful by providing debugging log lines (when available) in addition to the info and error log lines.

Error 101~

X not set up properly

  • Examples
  • Device not set up
  • Output channel Y not set up

This error occurs when the Controller (Input/Output/Function/etc.) could not properly initialize the device or channel when it started and is now trying to access an uninitialized device or channel. For Inputs, this could be loading the 3rd party library used to communicate with the sensor. If there was an error loading the library, then the library cannot be used to communicate with the sensor. You will often need to review the Daemon Log ([Gear Icon] -> Mycodo Logs) for any relevant errors that occurred when the Controller was initially activated to determine the issue setting up the device. Try deactivating, then activating the device, to see the initialization error again. Enabling Log Level: Debug in the Controller setting can also be useful by providing debugging log lines (when available) in addition to the info and error log lines.

\ No newline at end of file + Error Codes - Mycodo
Skip to content

Error Codes

Error Codes~

Mycodo can return a number of different errors. Below are a few of the numbered errors that you may receive and information about how to diagnose the issue.

Error 100~

Cannot set a value of 'X' of type Y. Must be a float or string representing a float.

  • Examples:
  • Cannot set a value of '1.33.4' of type str.
  • Cannot set a value of 'Output: 1.2' of type str.
  • Cannot set a value of '[1.3, 2.4]' of type list.
  • Cannot set a value of '{"output": 1.99}' of type dict.
  • Cannot set a value of 'None' of type Nonetype.

This error occurs because the value provided to be stored in the influxdb time-series database is not a numerical value (integer or decimal/float) or it is not a string that represents a float (e.g. "5", "3.14"). There are a number of reasons why this error occurs, but the most common reason is the sensor being ready by an Input did not return a measurement when queried, or it returned something other than something that represents a numerical value, indicating the sensor is not working. This could be from a number of reasons, including but not limited to, faulty wiring, faulty/insufficient power supply, defective sensor, I2C bus hasn't been enabled, misconfigured settings, etc. Often, a sensor can fail or not get set up correctly during Input initialization when the daemon starts, leading to this error every measurement period. You will need to review the Daemon Log ([Gear Icon] -> Mycodo Logs) all the way back to when the daemon started (since this is when the Input started and potentially failed with an initial error that may be more informative). Enabling Log Level: Debug in the Controller setting can also be useful by providing debugging log lines (when available) in addition to the info and error log lines.

Error 101~

X not set up properly

  • Examples
  • Device not set up
  • Output channel Y not set up

This error occurs when the Controller (Input/Output/Function/etc.) could not properly initialize the device or channel when it started and is now trying to access an uninitialized device or channel. For Inputs, this could be loading the 3rd party library used to communicate with the sensor. If there was an error loading the library, then the library cannot be used to communicate with the sensor. You will often need to review the Daemon Log ([Gear Icon] -> Mycodo Logs) for any relevant errors that occurred when the Controller was initially activated to determine the issue setting up the device. Try deactivating, then activating the device, to see the initialization error again. Enabling Log Level: Debug in the Controller setting can also be useful by providing debugging log lines (when available) in addition to the info and error log lines.

\ No newline at end of file diff --git a/Export-Import/index.html b/Export-Import/index.html index 336ccc59d..4e83bbf78 100644 --- a/Export-Import/index.html +++ b/Export-Import/index.html @@ -1 +1 @@ - Export/Import - Mycodo

Export/Import

Page: More -> Export Import

Measurements that fall within the selected date/time frame may be exported as CSV with their corresponding timestamps.

Additionally, the entire measurement database (influxdb) may be exported as a ZIP archive backup. This ZIP may be imported back in any Mycodo system to restore these measurements.

Note

Measurements are associated with specific IDs that correspond to the Inputs/Outputs/etc. of your specific system. If you import measurements without also importing the associated Inputs/Outputs/etc., you will not see these measurements (e.g. on Dashboard Graphs). Therefore, it is recommended to export both Measurements and Settings at the same time so when you import them at a later time, you will have the devices associated with the measurements available on the system you're importing to.

Note

Importing measurement data will not destroy old data and will be added to the current measurement data.

Mycodo settings may be exported as a ZIP file containing the Mycodo settings database (sqlite) and any custom Inputs, Outputs, Functions, and Widgets. This ZIP file may be used to restore these to another Mycodo install, as long as the Mycodo and database versions being imported are equal or less than the system you are installing them to. Additionally, you can only import to a system with the same major version number (the first number in the version format x.x.x). For instance, you can export settings from Mycodo 8.5.0 and import them into Mycodo 8.8.0, however you can not import them into Mycodo 8.2.0 (earlier version with same major version number), 7.0.0 (not the same major version number), or 9.0.0 (not the same major version number).

Warning

An import will override the current settings and custom controller data (i.e. destroying it). It is advised to make a Mycodo backup prior to attempting an import.

\ No newline at end of file + Export/Import - Mycodo

Export/Import

Page: More -> Export Import

Measurements that fall within the selected date/time frame may be exported as CSV with their corresponding timestamps.

Additionally, the entire measurement database (influxdb) may be exported as a ZIP archive backup. This ZIP may be imported back in any Mycodo system to restore these measurements.

Note

Measurements are associated with specific IDs that correspond to the Inputs/Outputs/etc. of your specific system. If you import measurements without also importing the associated Inputs/Outputs/etc., you will not see these measurements (e.g. on Dashboard Graphs). Therefore, it is recommended to export both Measurements and Settings at the same time so when you import them at a later time, you will have the devices associated with the measurements available on the system you're importing to.

Note

Importing measurement data will not destroy old data and will be added to the current measurement data.

Mycodo settings may be exported as a ZIP file containing the Mycodo settings database (sqlite) and any custom Inputs, Outputs, Functions, and Widgets. This ZIP file may be used to restore these to another Mycodo install, as long as the Mycodo and database versions being imported are equal or less than the system you are installing them to. Additionally, you can only import to a system with the same major version number (the first number in the version format x.x.x). For instance, you can export settings from Mycodo 8.5.0 and import them into Mycodo 8.8.0, however you can not import them into Mycodo 8.2.0 (earlier version with same major version number), 7.0.0 (not the same major version number), or 9.0.0 (not the same major version number).

Warning

An import will override the current settings and custom controller data (i.e. destroying it). It is advised to make a Mycodo backup prior to attempting an import.

\ No newline at end of file diff --git a/Functions/index.html b/Functions/index.html index 14272cc08..d9073ee8c 100644 --- a/Functions/index.html +++ b/Functions/index.html @@ -1,4 +1,4 @@ - Functions - Mycodo
Skip to content

Functions

Page: Setup -> Function

For a full list of supported Functions, see Supported Functions.

Function controllers perform tasks that often involve the use of Inputs and Outputs.

Note

"Last" means the Function will only acquire the last (latest) measurement in the database. "Past" means the Function will acquire all measurements from the present until the "Max Age (seconds)" that's been set (e.g. if measurements are acquired every 10 seconds, and a Max Age is set to 60 seconds, there will on average be 6 measurements returned to the Function to operate with).

Custom Functions~

There is a Custom Function import system in Mycodo that allows user-created Functions to be used in the Mycodo system. Custom Functions can be uploaded on the [Gear Icon] -> Configure -> Custom Functions page. After import, they will be available to use on the Setup -> Function page.

If you develop a working Function module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/functions for examples of the proper formatting.

There are also example Custom Functions in the directory Mycodo/mycodo/functions/examples

Additionally, I have another github repository devoted to Custom Modules that are not included in the built-in set, at kizniche/Mycodo-custom.

For Functions that require new measurements/units, they can be added on the [Gear Icon] -> Configure -> Measurements page.

PID Controller~

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

PID settings may be changed while the PID is activated and the new settings will take effect immediately. If settings are changed while the controller is paused, the values will be used once the controller resumes operation.

PID Controller Options~

Setting Description
Activate/Deactivate Turn a particular PID controller on or off.
Pause When paused, the control variable will not be updated and the PID will not turn on the associated outputs. Settings can be changed without losing current PID output values.
Hold When held, the control variable will not be updated but the PID will turn on the associated outputs, Settings can be changed without losing current PID output values.
Resume Resume a PID controller from being held or paused.
Direction This is the direction that you wish to regulate. For example, if you only require the temperature to be raised, set this to "Up," but if you require regulation up and down, set this to "Both."
Period This is the duration between when the PID acquires a measurement, the PID is updated, and the output is modulated.
Start Offset (seconds) Wait this duration before attempting the first calculation/measurement.
Max Age The time (in seconds) that the sensor measurement age is required to be less than. If the measurement is not younger than this age, the measurement is thrown out and the PID will not actuate the output. This is a safety measure to ensure the PID is only using recent measurements.
Setpoint This is the specific point you would like the environment to be regulated at. For example, if you would like the humidity regulated to 60%, enter 60.
Band (+/- Setpoint) Hysteresis option. If set to a non-0 value, the setpoint will become a band, which will be between the band_max=setpoint+band and band_min=setpoint-band. If Raising, the PID will raise above band_max, then wait until the condition falls below band_min to resume regulation. If Lowering, the PID will lower below band_min, then wait until the condition rises above band_max to resume regulating. If set to Both, regulation will only occur to the outside min and max of the band, and cease when within the band. Set to 0 to disable Hysteresis.
Store Lower as Negative Checking this will store all output variables (PID and output duration/duty cycle) as a negative values in the measurement database. This is useful for displaying graphs that indicate whether the PID is currently lowering or raising. Disable this if you desire all positive values to be stored in the measurement database.
KP Gain Proportional coefficient (non-negative). Accounts for present values of the error. For example, if the error is large and positive, the control output will also be large and positive.
KI Gain Integral coefficient (non-negative). Accounts for past values of the error. For example, if the current output is not sufficiently strong, the integral of the error will accumulate over time, and the controller will respond by applying a stronger action.
KD Gain Derivative coefficient (non-negative). Accounts for predicted future values of the error, based on its current rate of change.
Integrator Min The minimum allowed integrator value, for calculating Ki_total: (Ki_total = Ki * integrator; and PID output = Kp_total + Ki_total + Kd_total)
Integrator Max The maximum allowed integrator value, for calculating Ki_total: (Ki_total = Ki * integrator; and PID output = Kp_total + Ki_total + Kd_total)
Output (Raise/Lower) This is the output that will cause the particular environmental condition to rise or lower. In the case of raising the temperature, this may be a heating pad or coil.
Min On Duration, Duty Cycle, or Amount (Raise/Lower) This is the minimum value that the PID output must be before Output (Lower) turns on. If the PID output is less than this value, Duration Outputs will not turn on, and PWM Outputs will be turned off unless Always Min is enabled.
Max On Duration, Duty Cycle, or Amount (Raise/Lower) This is the maximum duration, volume, or duty cycle the Output (Raise) can be set to. If the PID output is greater than this value, the Max value set here will be used.
Min Off Duration (Raise/Lower) For On/Off (Duration) Outputs, this is the minimum amount of time the Output must have been off for before it is allowed to turn back on. Ths is useful for devices that can be damaged by rapid power cycling (e.g. fridges).
Always Min (Raise/Lower) For PWM Outputs only. If enabled, the duty cycle will never be set below the Min value.
Setpoint Tracking Method Set a method to change the setpoint over time.

PID Output Calculation~

PID Controllers can control a number of different output types (e.g. duration, volume, or PWM duty cycle). For most output types, the PID output (Control Variable) will be proportional (i.e. Output Duration = PID Control Variable). However, when outputting a duty cycle, it will be calculated as Duty Cycle = (Control Variable / Period) * 100.

Note

Control Variable = P Output + I Output + D Output. Duty cycle is limited within the 0 - 100 % range and the set Min Duty Cycle and Max Duty Cycle. An output duration is limited by the set Min On Duration and Max On Duration, and output volume similarly.

PID Tuning~

PID tuning can be a complex process, depending on the output device(s) used and the environment or system under control. A system with large perturbations will be more difficult to control than one that is stable. Similarly, output devices that are unsuitable may make PID tuning difficult or impossible. Learning how PID controllers operate and the theory behind their tuning will not only better prepare you to operate a PID controller, but also in the development of your system and selection and implementation of the output devices used to regulate your system.

PID Tuning Resources~

PID Control Theory~

The PID controller is the most common regulatory controller found in industrial settings, for it"s ability to handle both simple and complex regulation. The PID controller has three paths, the proportional, integral, and derivative.

The Proportional takes the error and multiplies it by the constant KP, to yield an output value. When the error is large, there will be a large proportional output.

The Integral takes the error and multiplies it by KI, then integrates it (KI · 1/s). As the error changes over time, the integral will continually sum it and multiply it by the constant KI. The integral is used to remove perpetual error in the control system. If using KP alone produces an output that produces a perpetual error (i.e. if the sensor measurement never reaches the Set Point), the integral will increase the output until the error decreases and the Set Point is reached.

The Derivative multiplies the error by KD, then differentiates it (KD · s). When the error rate changes over time, the output signal will change. The faster the change in error, the larger the derivative path becomes, decreasing the output rate of change. This has the effect of dampening overshoot and undershoot (oscillation) of the Set Point.

PID Animation

The KP, KI, and KD gains determine how much each of the P, I, and D variables influence the final PID output value. For instance, the greater the value of the gain, the more influence that variable has on the output.

PID Equation

The output from the PID controller can be used in a number of ways. A simple use is to use this value as the number of seconds an output is turned on during a periodic interval (Period). For instance, if the Period is set to 30 seconds, the PID equation has the desired measurement and the actual measurement used to calculate the PID output every 30 seconds. The more the output is on during this period, the more it will affect the system. For example, an output on for 15 seconds every 30 seconds is at a 50 % duty cycle, and would affect the system roughly half as much as when the output is on for 30 seconds every 30 seconds, or at at 100 % duty cycle. The PID controller will calculate the output based on the amount of error (how far the actual measurement is from the desired measurement). If the error increases or persists, the output increases, causing the output to turn on for a longer duration within the Period, which usually in term causes the measured condition to change and the error to reduce. When the error reduces, the control variable decreases, meaning the output is turned on for a shorter duration of time. The ultimate goal of a well-tuned PID controller is to bring the actual measurement to the desired measurement quickly, with little overshoot, and maintain the setpoint with minimal oscillation.


Using temperature as an example, the Process Variable (PV) is the measured temperature, the Setpoint (SP) is the desired temperature, and the Error (e) is the distance between the measured temperature and the desired temperature (indicating if the actual temperature is too hot or too cold and to what degree). The error is manipulated by each of the three PID components, producing an output, called the Manipulated Variable (MV) or Control Variable (CV). To allow control of how much each path contributes to the output value, each path is multiplied by a gain (represented by KP, KI, and KD). By adjusting the gains, the sensitivity of the system to each path is affected. When all three paths are summed, the PID output is produced. If a gain is set to 0, that path does not contribute to the output and that path is essentially turned off.

The output can be used a number of ways, however this controller was designed to use the output to affect the measured value (PV). This feedback loop, with a properly tuned PID controller, can achieve a set point in a short period of time, maintain regulation with little oscillation, and respond quickly to disturbance.

Therefor, if one would be regulating temperature, the sensor would be a temperature sensor and the feedback device(s) would be able to heat and cool. If the temperature is lower than the Set Point, the output value would be positive and a heater would activate. The temperature would rise toward the desired temperature, causing the error to decrease and a lower output to be produced. This feedback loop would continue until the error reaches 0 (at which point the output would be 0). If the temperature continues to rise past the Set Point (this is may be acceptable, depending on the degree), the PID would produce a negative output, which could be used by the cooling device to bring the temperature back down, to reduce the error. If the temperature would normally lower without the aid of a cooling device, then the system can be simplified by omitting a cooler and allowing it to lower on its own.

Implementing a controller that effectively utilizes KP, KI, and KD can be challenging. Furthermore, it is often unnecessary. For instance, the KI and KD can be set to 0, effectively turning them off and producing the very popular and simple P controller. Also popular is the PI controller. It is recommended to start with only KP activated, then experiment with KP and KI, before finally using all three. Because systems will vary (e.g. airspace volume, degree of insulation, and the degree of impact from the connected device, etc.), each path will need to be adjusted through experimentation to produce an effective output.

Quick Setup Examples~

These example setups are meant to illustrate how to configure regulation in particular directions, and not to achieve ideal values to configure your KP, KI, and KD gains. There are a number of online resources that discuss techniques and methods that have been developed to determine ideal PID values (such as here, here, here, here, and here) and since there are no universal values that will work for every system, it is recommended to conduct your own research to understand the variables and essential to conduct your own experiments to effectively implement them.

Provided merely as an example of the variance of PID values, one of my setups had temperature PID values (up regulation) of KP = 30, KI = 1.0, and KD = 0.5, and humidity PID values (up regulation) of KP = 1.0, KI = 0.2, and KD = 0.5. Furthermore, these values may not have been optimal but they worked well for the conditions of my environmental chamber.

Exact Temperature Regulation~

This will set up the system to raise and lower the temperature to a certain level with two regulatory devices (one that heats and one that cools).

Add a sensor, then save the proper device and pin/address for each sensor and activate the sensor.

Add two outputs, then save each GPIO and On Trigger state.

Add a PID, then select the newly-created sensor. Change Setpoint to the desired temperature, Regulate Direction to "Both". Set Raise Output to the relay attached to the heating device and the Lower Relay to the relay attached to the cooling device.

Set KP = 1, KI = 0, and KD = 0, then activate the PID.

If the temperature is lower than the Set Point, the heater should activate at some interval determined by the PID controller until the temperature rises to the set point. If the temperature goes higher than the Set Point (or Set Point + Buffer), the cooling device will activate until the temperature returns to the set point. If the temperature is not reaching the Set Point after a reasonable amount of time, increase the KP value and see how that affects the system. Experiment with different configurations involving only Read Interval and KP to achieve a good regulation. Avoid changing the KI and KD from 0 until a working regulation is achieved with KP alone.

View graphs in the 6 to 12 hour time span to identify how well the temperature is regulated to the Setpoint. What is meant by well-regulated will vary, depending on your specific application and tolerances. Most applications of a PID controller would like to see the proper temperature attained within a reasonable amount of time and with little oscillation around the Setpoint.

Once regulation is achieved, experiment by reducing KP slightly (~25%) and increasing KI by a low amount to start, such as 0.1 (or lower, 0.01), then start the PID and observe how well the controller regulates. Slowly increase KI until regulation becomes both quick and with little oscillation. At this point, you should be fairly familiar with experimenting with the system and the KD value can be experimented with once both KP and KI have been tuned.

High Temperature Regulation~

Often the system can be simplified if two-way regulation is not needed. For instance, if cooling is unnecessary, this can be removed from the system and only up-regulation can be used.

Use the same configuration as the Exact Temperature Regulation example, except change Regulate Direction to "Raise" and do not touch the "Down Relay" section.

PID Autotune~

Warning

This is an experimental feature. It is best not used until you are familiar with the theory, operation, and tuning of a PID.

The Autotune function is a standalone controller that is useful for determining appropriate Kp, Ki, and Kd gains for use in the a PID controller. The autotuner will manipulate an output and analyze the measured response in a particular environment/system. It will take several cycles of perturbing the system with the chosen output before enough data is available to calculate the PID gains. In order to use this feature, select a Measurement and an Output that can module the specific condition being measured. Then, configure the Noise Band and Outstep and activate the function. Log lines of the autotuner will appear in the daemon log ([Gear Icon] -> Mycodo Logs -> Daemon Log). While the autotune is being performed, it is recommended to create a dashboard graph that includes the Measurement and Output in order to see what the PID Autotuner is doing and to notice any potential issues with the autotune settings that have been configured. If the autotune is taking a long time to complete, there may not be enough stability in the system being manipulated to calculate a reliable set of PID gains. This may be because there are too many perturbations to the system, or conditions are changing too rapidly to acquire consistent measurement oscillations. If this is the case, try modifying your system to increase stability and yield consistent measurement oscillations. Once the autotune successfully completes, perturbations may be reintroduced in order to further tune the PID controller to handle them.

Setting Description
Measurement This is the Input or Function measurement that is measuring the specific condition that the Output will affect. For instance, this could be a temperature measurement and the output could be a heater.
Output This is the Output that will affect the measurement when it's activated. The autotune function will periodically turn this output on in order to raise the measurement beyond the setpoint.
Period This is the period of time between the Output being turned on. This should be set to the same Period you wish to use for your PID controller. A different Period can significantly affect the PID gains that the autotune produces.
Setpoint This is the desired measurement condition value. For instance, if temperature is being measured, this should be set a several degrees higher than the current temperature so the output, when activated, will cause the temperature to rise beyond the setpoint.
Noise Band This is the amount above the setpoint the measured condition must reach before the output turns off. This is also how much below the setpoint the measured condition must fall before the output turns back on.
Outstep This is how many seconds the output will turn on every PID Period. For instance, to autotune with 50% power, ensure the Outstep is half the value of the PID Period.
Direction This is the direction for which the Output will push the Measurement. For instance, a heater will raise temperature, whereas a cooler will lower temperature.

Typical graph output will look like this:

PID Autotune Output

And typical Daemon Log output will look like this:

2018-08-04 23:32:20,876 - mycodo.pid_3b533dff - INFO - Activated in 187.2 ms
+ Functions - Mycodo      

Functions

Page: Setup -> Function

For a full list of supported Functions, see Supported Functions.

Function controllers perform tasks that often involve the use of Inputs and Outputs.

Note

"Last" means the Function will only acquire the last (latest) measurement in the database. "Past" means the Function will acquire all measurements from the present until the "Max Age (seconds)" that's been set (e.g. if measurements are acquired every 10 seconds, and a Max Age is set to 60 seconds, there will on average be 6 measurements returned to the Function to operate with).

Custom Functions~

There is a Custom Function import system in Mycodo that allows user-created Functions to be used in the Mycodo system. Custom Functions can be uploaded on the [Gear Icon] -> Configure -> Custom Functions page. After import, they will be available to use on the Setup -> Function page.

If you develop a working Function module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/functions for examples of the proper formatting.

There are also example Custom Functions in the directory Mycodo/mycodo/functions/examples

Additionally, I have another github repository devoted to Custom Modules that are not included in the built-in set, at kizniche/Mycodo-custom.

For Functions that require new measurements/units, they can be added on the [Gear Icon] -> Configure -> Measurements page.

PID Controller~

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

PID settings may be changed while the PID is activated and the new settings will take effect immediately. If settings are changed while the controller is paused, the values will be used once the controller resumes operation.

PID Controller Options~

Setting Description
Activate/Deactivate Turn a particular PID controller on or off.
Pause When paused, the control variable will not be updated and the PID will not turn on the associated outputs. Settings can be changed without losing current PID output values.
Hold When held, the control variable will not be updated but the PID will turn on the associated outputs, Settings can be changed without losing current PID output values.
Resume Resume a PID controller from being held or paused.
Direction This is the direction that you wish to regulate. For example, if you only require the temperature to be raised, set this to "Up," but if you require regulation up and down, set this to "Both."
Period This is the duration between when the PID acquires a measurement, the PID is updated, and the output is modulated.
Start Offset (seconds) Wait this duration before attempting the first calculation/measurement.
Max Age The time (in seconds) that the sensor measurement age is required to be less than. If the measurement is not younger than this age, the measurement is thrown out and the PID will not actuate the output. This is a safety measure to ensure the PID is only using recent measurements.
Setpoint This is the specific point you would like the environment to be regulated at. For example, if you would like the humidity regulated to 60%, enter 60.
Band (+/- Setpoint) Hysteresis option. If set to a non-0 value, the setpoint will become a band, which will be between the band_max=setpoint+band and band_min=setpoint-band. If Raising, the PID will raise above band_max, then wait until the condition falls below band_min to resume regulation. If Lowering, the PID will lower below band_min, then wait until the condition rises above band_max to resume regulating. If set to Both, regulation will only occur to the outside min and max of the band, and cease when within the band. Set to 0 to disable Hysteresis.
Store Lower as Negative Checking this will store all output variables (PID and output duration/duty cycle) as a negative values in the measurement database. This is useful for displaying graphs that indicate whether the PID is currently lowering or raising. Disable this if you desire all positive values to be stored in the measurement database.
KP Gain Proportional coefficient (non-negative). Accounts for present values of the error. For example, if the error is large and positive, the control output will also be large and positive.
KI Gain Integral coefficient (non-negative). Accounts for past values of the error. For example, if the current output is not sufficiently strong, the integral of the error will accumulate over time, and the controller will respond by applying a stronger action.
KD Gain Derivative coefficient (non-negative). Accounts for predicted future values of the error, based on its current rate of change.
Integrator Min The minimum allowed integrator value, for calculating Ki_total: (Ki_total = Ki * integrator; and PID output = Kp_total + Ki_total + Kd_total)
Integrator Max The maximum allowed integrator value, for calculating Ki_total: (Ki_total = Ki * integrator; and PID output = Kp_total + Ki_total + Kd_total)
Output (Raise/Lower) This is the output that will cause the particular environmental condition to rise or lower. In the case of raising the temperature, this may be a heating pad or coil.
Min On Duration, Duty Cycle, or Amount (Raise/Lower) This is the minimum value that the PID output must be before Output (Lower) turns on. If the PID output is less than this value, Duration Outputs will not turn on, and PWM Outputs will be turned off unless Always Min is enabled.
Max On Duration, Duty Cycle, or Amount (Raise/Lower) This is the maximum duration, volume, or duty cycle the Output (Raise) can be set to. If the PID output is greater than this value, the Max value set here will be used.
Min Off Duration (Raise/Lower) For On/Off (Duration) Outputs, this is the minimum amount of time the Output must have been off for before it is allowed to turn back on. Ths is useful for devices that can be damaged by rapid power cycling (e.g. fridges).
Always Min (Raise/Lower) For PWM Outputs only. If enabled, the duty cycle will never be set below the Min value.
Setpoint Tracking Method Set a method to change the setpoint over time.

PID Output Calculation~

PID Controllers can control a number of different output types (e.g. duration, volume, or PWM duty cycle). For most output types, the PID output (Control Variable) will be proportional (i.e. Output Duration = PID Control Variable). However, when outputting a duty cycle, it will be calculated as Duty Cycle = (Control Variable / Period) * 100.

Note

Control Variable = P Output + I Output + D Output. Duty cycle is limited within the 0 - 100 % range and the set Min Duty Cycle and Max Duty Cycle. An output duration is limited by the set Min On Duration and Max On Duration, and output volume similarly.

PID Tuning~

PID tuning can be a complex process, depending on the output device(s) used and the environment or system under control. A system with large perturbations will be more difficult to control than one that is stable. Similarly, output devices that are unsuitable may make PID tuning difficult or impossible. Learning how PID controllers operate and the theory behind their tuning will not only better prepare you to operate a PID controller, but also in the development of your system and selection and implementation of the output devices used to regulate your system.

PID Tuning Resources~

PID Control Theory~

The PID controller is the most common regulatory controller found in industrial settings, for it"s ability to handle both simple and complex regulation. The PID controller has three paths, the proportional, integral, and derivative.

The Proportional takes the error and multiplies it by the constant KP, to yield an output value. When the error is large, there will be a large proportional output.

The Integral takes the error and multiplies it by KI, then integrates it (KI · 1/s). As the error changes over time, the integral will continually sum it and multiply it by the constant KI. The integral is used to remove perpetual error in the control system. If using KP alone produces an output that produces a perpetual error (i.e. if the sensor measurement never reaches the Set Point), the integral will increase the output until the error decreases and the Set Point is reached.

The Derivative multiplies the error by KD, then differentiates it (KD · s). When the error rate changes over time, the output signal will change. The faster the change in error, the larger the derivative path becomes, decreasing the output rate of change. This has the effect of dampening overshoot and undershoot (oscillation) of the Set Point.

PID Animation

The KP, KI, and KD gains determine how much each of the P, I, and D variables influence the final PID output value. For instance, the greater the value of the gain, the more influence that variable has on the output.

PID Equation

The output from the PID controller can be used in a number of ways. A simple use is to use this value as the number of seconds an output is turned on during a periodic interval (Period). For instance, if the Period is set to 30 seconds, the PID equation has the desired measurement and the actual measurement used to calculate the PID output every 30 seconds. The more the output is on during this period, the more it will affect the system. For example, an output on for 15 seconds every 30 seconds is at a 50 % duty cycle, and would affect the system roughly half as much as when the output is on for 30 seconds every 30 seconds, or at at 100 % duty cycle. The PID controller will calculate the output based on the amount of error (how far the actual measurement is from the desired measurement). If the error increases or persists, the output increases, causing the output to turn on for a longer duration within the Period, which usually in term causes the measured condition to change and the error to reduce. When the error reduces, the control variable decreases, meaning the output is turned on for a shorter duration of time. The ultimate goal of a well-tuned PID controller is to bring the actual measurement to the desired measurement quickly, with little overshoot, and maintain the setpoint with minimal oscillation.


Using temperature as an example, the Process Variable (PV) is the measured temperature, the Setpoint (SP) is the desired temperature, and the Error (e) is the distance between the measured temperature and the desired temperature (indicating if the actual temperature is too hot or too cold and to what degree). The error is manipulated by each of the three PID components, producing an output, called the Manipulated Variable (MV) or Control Variable (CV). To allow control of how much each path contributes to the output value, each path is multiplied by a gain (represented by KP, KI, and KD). By adjusting the gains, the sensitivity of the system to each path is affected. When all three paths are summed, the PID output is produced. If a gain is set to 0, that path does not contribute to the output and that path is essentially turned off.

The output can be used a number of ways, however this controller was designed to use the output to affect the measured value (PV). This feedback loop, with a properly tuned PID controller, can achieve a set point in a short period of time, maintain regulation with little oscillation, and respond quickly to disturbance.

Therefor, if one would be regulating temperature, the sensor would be a temperature sensor and the feedback device(s) would be able to heat and cool. If the temperature is lower than the Set Point, the output value would be positive and a heater would activate. The temperature would rise toward the desired temperature, causing the error to decrease and a lower output to be produced. This feedback loop would continue until the error reaches 0 (at which point the output would be 0). If the temperature continues to rise past the Set Point (this is may be acceptable, depending on the degree), the PID would produce a negative output, which could be used by the cooling device to bring the temperature back down, to reduce the error. If the temperature would normally lower without the aid of a cooling device, then the system can be simplified by omitting a cooler and allowing it to lower on its own.

Implementing a controller that effectively utilizes KP, KI, and KD can be challenging. Furthermore, it is often unnecessary. For instance, the KI and KD can be set to 0, effectively turning them off and producing the very popular and simple P controller. Also popular is the PI controller. It is recommended to start with only KP activated, then experiment with KP and KI, before finally using all three. Because systems will vary (e.g. airspace volume, degree of insulation, and the degree of impact from the connected device, etc.), each path will need to be adjusted through experimentation to produce an effective output.

Quick Setup Examples~

These example setups are meant to illustrate how to configure regulation in particular directions, and not to achieve ideal values to configure your KP, KI, and KD gains. There are a number of online resources that discuss techniques and methods that have been developed to determine ideal PID values (such as here, here, here, here, and here) and since there are no universal values that will work for every system, it is recommended to conduct your own research to understand the variables and essential to conduct your own experiments to effectively implement them.

Provided merely as an example of the variance of PID values, one of my setups had temperature PID values (up regulation) of KP = 30, KI = 1.0, and KD = 0.5, and humidity PID values (up regulation) of KP = 1.0, KI = 0.2, and KD = 0.5. Furthermore, these values may not have been optimal but they worked well for the conditions of my environmental chamber.

Exact Temperature Regulation~

This will set up the system to raise and lower the temperature to a certain level with two regulatory devices (one that heats and one that cools).

Add a sensor, then save the proper device and pin/address for each sensor and activate the sensor.

Add two outputs, then save each GPIO and On Trigger state.

Add a PID, then select the newly-created sensor. Change Setpoint to the desired temperature, Regulate Direction to "Both". Set Raise Output to the relay attached to the heating device and the Lower Relay to the relay attached to the cooling device.

Set KP = 1, KI = 0, and KD = 0, then activate the PID.

If the temperature is lower than the Set Point, the heater should activate at some interval determined by the PID controller until the temperature rises to the set point. If the temperature goes higher than the Set Point (or Set Point + Buffer), the cooling device will activate until the temperature returns to the set point. If the temperature is not reaching the Set Point after a reasonable amount of time, increase the KP value and see how that affects the system. Experiment with different configurations involving only Read Interval and KP to achieve a good regulation. Avoid changing the KI and KD from 0 until a working regulation is achieved with KP alone.

View graphs in the 6 to 12 hour time span to identify how well the temperature is regulated to the Setpoint. What is meant by well-regulated will vary, depending on your specific application and tolerances. Most applications of a PID controller would like to see the proper temperature attained within a reasonable amount of time and with little oscillation around the Setpoint.

Once regulation is achieved, experiment by reducing KP slightly (~25%) and increasing KI by a low amount to start, such as 0.1 (or lower, 0.01), then start the PID and observe how well the controller regulates. Slowly increase KI until regulation becomes both quick and with little oscillation. At this point, you should be fairly familiar with experimenting with the system and the KD value can be experimented with once both KP and KI have been tuned.

High Temperature Regulation~

Often the system can be simplified if two-way regulation is not needed. For instance, if cooling is unnecessary, this can be removed from the system and only up-regulation can be used.

Use the same configuration as the Exact Temperature Regulation example, except change Regulate Direction to "Raise" and do not touch the "Down Relay" section.

PID Autotune~

Warning

This is an experimental feature. It is best not used until you are familiar with the theory, operation, and tuning of a PID.

The Autotune function is a standalone controller that is useful for determining appropriate Kp, Ki, and Kd gains for use in the a PID controller. The autotuner will manipulate an output and analyze the measured response in a particular environment/system. It will take several cycles of perturbing the system with the chosen output before enough data is available to calculate the PID gains. In order to use this feature, select a Measurement and an Output that can module the specific condition being measured. Then, configure the Noise Band and Outstep and activate the function. Log lines of the autotuner will appear in the daemon log ([Gear Icon] -> Mycodo Logs -> Daemon Log). While the autotune is being performed, it is recommended to create a dashboard graph that includes the Measurement and Output in order to see what the PID Autotuner is doing and to notice any potential issues with the autotune settings that have been configured. If the autotune is taking a long time to complete, there may not be enough stability in the system being manipulated to calculate a reliable set of PID gains. This may be because there are too many perturbations to the system, or conditions are changing too rapidly to acquire consistent measurement oscillations. If this is the case, try modifying your system to increase stability and yield consistent measurement oscillations. Once the autotune successfully completes, perturbations may be reintroduced in order to further tune the PID controller to handle them.

Setting Description
Measurement This is the Input or Function measurement that is measuring the specific condition that the Output will affect. For instance, this could be a temperature measurement and the output could be a heater.
Output This is the Output that will affect the measurement when it's activated. The autotune function will periodically turn this output on in order to raise the measurement beyond the setpoint.
Period This is the period of time between the Output being turned on. This should be set to the same Period you wish to use for your PID controller. A different Period can significantly affect the PID gains that the autotune produces.
Setpoint This is the desired measurement condition value. For instance, if temperature is being measured, this should be set a several degrees higher than the current temperature so the output, when activated, will cause the temperature to rise beyond the setpoint.
Noise Band This is the amount above the setpoint the measured condition must reach before the output turns off. This is also how much below the setpoint the measured condition must fall before the output turns back on.
Outstep This is how many seconds the output will turn on every PID Period. For instance, to autotune with 50% power, ensure the Outstep is half the value of the PID Period.
Direction This is the direction for which the Output will push the Measurement. For instance, a heater will raise temperature, whereas a cooler will lower temperature.

Typical graph output will look like this:

PID Autotune Output

And typical Daemon Log output will look like this:

2018-08-04 23:32:20,876 - mycodo.pid_3b533dff - INFO - Activated in 187.2 ms
 2018-08-04 23:32:20,877 - mycodo.pid_autotune - INFO - PID Autotune started
 2018-08-04 23:33:50,823 - mycodo.pid_autotune - INFO -
 2018-08-04 23:33:50,830 - mycodo.pid_autotune - INFO - Cycle: 19
@@ -217,4 +217,4 @@
     self.logging.error("Warning, measurement was {}".format(measurement))
     self.message += "Measurement was {}".format(measurement)
     self.run_action("uiop5678}", message=self.message)
-

Before activating any conditionals, it's advised to thoroughly explore all possible scenarios and plan a configuration that eliminates conflicts. Some devices or outputs may respond atypically or fail when switched on and off in rapid succession. Therefore, trial run your configuration before connecting devices to any outputs.

Trigger~

A Trigger Controller will execute actions when events are triggered, such as an output turning on or off, a GPIO pin changing it's voltage state (Edge detection, rising or falling), timed events that include various timers (duration, time period, time point, etc), or the sunrise/sunset time at a specific latitude and longitude. Once the trigger is configured, add any number of Actions to be executed when that event is triggered.

Output (On/Off) Options~

Monitor the state of an output.

Setting Description
If Output The Output to monitor for a change of state.
If State If the state of the output changes to On or Off the conditional will trigger. If "On (any duration) is selected, th trigger will occur no matter how long the output turns on for, whereas if only "On" is selected, the conditional will trigger only when the output turns on for a duration of time equal to the set "Duration (seconds)".
If Duration (seconds) If "On" is selected, an optional duration (seconds) may be set that will trigger the conditional only if the Output is turned on for this specific duration.

Output (PWM) Options~

Monitor the state of a PWM output.

Setting Description
If Output The Output to monitor for a change of state.
If State If the duty cycle of the output is greater than,less than, or equal to the set value, trigger the Conditional Actions.
If Duty Cycle (%) The duty cycle for the Output to be checked against.

Edge Options~

Monitor the state of a pin for a rising and/or falling edge.

Setting Description
If Edge Detected The conditional will be triggered if a change in state is detected, either Rising when the state changes from LOW (0 volts) to HIGH (3.5 volts) or Falling when the state changes from HIGH (3.3 volts) to LOW (0 volts), or Both (Rising and Falling).

Run PWM Method Options~

Select a Duration Method and this will set the selected PWM Output to the duty cycle specified by the method.

Setting Description
Duration Method Select which Method to use.
PWM Output Select which PWM Output to use.
Period (seconds) Select the interval of time to calculate the duty cycle, then apply to the PWM Output.
Trigger Every Period Trigger Conditional Actions every period.
Trigger when Activated Trigger Conditional Actions when the Conditional is activated.

Sunrise/Sunset Options~

Trigger events at sunrise or sunset (or a time offset of those), based on latitude and longitude.

Setting Description
Rise or Set Select which to trigger the conditional, at sunrise or sunset.
Latitude (decimal) Latitude of the sunrise/sunset, using decimal format.
Longitude (decimal) Longitude of the sunrise/sunset, using decimal format.
Zenith The Zenith angle of the sun.
Date Offset (days) Set a sunrise/sunset offset in days (positive or negative).
Time Offset (minutes) Set a sunrise/sunset offset in minutes (positive or negative).

Timer (Duration) Options~

Run a timer that triggers Conditional Actions every period.

Setting Description
Period (seconds) The period of time between triggering Conditional Actions.
Start Offset (seconds) Set this to start the first trigger a number of seconds after the Conditional is activated.

Timer (Daily Time Point) Options~

Run a timer that triggers Conditional Actions at a specific time every day.

Setting Description
Start Time (HH:MM) Set the time to trigger Conditional Actions, in the format "HH:MM", with HH denoting hours, and MM denoting minutes. Time is in 24-hour format.

Timer (Daily Time Span) Options~

Run a timer that triggers Conditional Actions at a specific period if it's between the set start and end times. For example, if the Start Time is set to 10:00 and End Time set to 11:00 and Period set to 120 seconds, the Conditional Actions will trigger every 120 seconds when the time is between 10 AM and 11 AM.

This may be useful, for instance, if you desire an Output to remain on during a particular time period and you want to prevent power outages from interrupting the cycle (which a simple Time Point Timer could not prevent against because it only triggers once at the Start Time). By setting an Output to turn the lights on every few minutes during the Start -> End period, it ensured the Output remains on during this period.

Setting Description
Start Time (HH:MM) Set the start time to trigger Conditional Actions, in the format "HH:MM", with HH denoting hours, and MM denoting minutes. Time is in 24-hour format.
End Time (HH:MM) Set the end time to trigger Conditional Actions, in the format "HH:MM", with HH denoting hours, and MM denoting minutes. Time is in 24-hour format.
Period (seconds) The period of time between triggering Conditional Actions.
\ No newline at end of file +

Before activating any conditionals, it's advised to thoroughly explore all possible scenarios and plan a configuration that eliminates conflicts. Some devices or outputs may respond atypically or fail when switched on and off in rapid succession. Therefore, trial run your configuration before connecting devices to any outputs.

Trigger~

A Trigger Controller will execute actions when events are triggered, such as an output turning on or off, a GPIO pin changing it's voltage state (Edge detection, rising or falling), timed events that include various timers (duration, time period, time point, etc), or the sunrise/sunset time at a specific latitude and longitude. Once the trigger is configured, add any number of Actions to be executed when that event is triggered.

Output (On/Off) Options~

Monitor the state of an output.

Setting Description
If Output The Output to monitor for a change of state.
If State If the state of the output changes to On or Off the conditional will trigger. If "On (any duration) is selected, th trigger will occur no matter how long the output turns on for, whereas if only "On" is selected, the conditional will trigger only when the output turns on for a duration of time equal to the set "Duration (seconds)".
If Duration (seconds) If "On" is selected, an optional duration (seconds) may be set that will trigger the conditional only if the Output is turned on for this specific duration.

Output (PWM) Options~

Monitor the state of a PWM output.

Setting Description
If Output The Output to monitor for a change of state.
If State If the duty cycle of the output is greater than,less than, or equal to the set value, trigger the Conditional Actions.
If Duty Cycle (%) The duty cycle for the Output to be checked against.

Edge Options~

Monitor the state of a pin for a rising and/or falling edge.

Setting Description
If Edge Detected The conditional will be triggered if a change in state is detected, either Rising when the state changes from LOW (0 volts) to HIGH (3.5 volts) or Falling when the state changes from HIGH (3.3 volts) to LOW (0 volts), or Both (Rising and Falling).

Run PWM Method Options~

Select a Duration Method and this will set the selected PWM Output to the duty cycle specified by the method.

Setting Description
Duration Method Select which Method to use.
PWM Output Select which PWM Output to use.
Period (seconds) Select the interval of time to calculate the duty cycle, then apply to the PWM Output.
Trigger Every Period Trigger Conditional Actions every period.
Trigger when Activated Trigger Conditional Actions when the Conditional is activated.

Sunrise/Sunset Options~

Trigger events at sunrise or sunset (or a time offset of those), based on latitude and longitude.

Setting Description
Rise or Set Select which to trigger the conditional, at sunrise or sunset.
Latitude (decimal) Latitude of the sunrise/sunset, using decimal format.
Longitude (decimal) Longitude of the sunrise/sunset, using decimal format.
Zenith The Zenith angle of the sun.
Date Offset (days) Set a sunrise/sunset offset in days (positive or negative).
Time Offset (minutes) Set a sunrise/sunset offset in minutes (positive or negative).

Timer (Duration) Options~

Run a timer that triggers Conditional Actions every period.

Setting Description
Period (seconds) The period of time between triggering Conditional Actions.
Start Offset (seconds) Set this to start the first trigger a number of seconds after the Conditional is activated.

Timer (Daily Time Point) Options~

Run a timer that triggers Conditional Actions at a specific time every day.

Setting Description
Start Time (HH:MM) Set the time to trigger Conditional Actions, in the format "HH:MM", with HH denoting hours, and MM denoting minutes. Time is in 24-hour format.

Timer (Daily Time Span) Options~

Run a timer that triggers Conditional Actions at a specific period if it's between the set start and end times. For example, if the Start Time is set to 10:00 and End Time set to 11:00 and Period set to 120 seconds, the Conditional Actions will trigger every 120 seconds when the time is between 10 AM and 11 AM.

This may be useful, for instance, if you desire an Output to remain on during a particular time period and you want to prevent power outages from interrupting the cycle (which a simple Time Point Timer could not prevent against because it only triggers once at the Start Time). By setting an Output to turn the lights on every few minutes during the Start -> End period, it ensured the Output remains on during this period.

Setting Description
Start Time (HH:MM) Set the start time to trigger Conditional Actions, in the format "HH:MM", with HH denoting hours, and MM denoting minutes. Time is in 24-hour format.
End Time (HH:MM) Set the end time to trigger Conditional Actions, in the format "HH:MM", with HH denoting hours, and MM denoting minutes. Time is in 24-hour format.
Period (seconds) The period of time between triggering Conditional Actions.
\ No newline at end of file diff --git a/I2C-Multiplexers/index.html b/I2C-Multiplexers/index.html index 52c3b97e5..5bfd0d90f 100644 --- a/I2C-Multiplexers/index.html +++ b/I2C-Multiplexers/index.html @@ -1 +1 @@ - I2C Multiplexers - Mycodo

I2C Multiplexers

All devices that connected to the Raspberry Pi by the I2C bus need to have a unique address in order to communicate. Some inputs may have the same address (such as the AM2315), which prevents more than one from being connected at the same time. Others may provide the ability to change the address, however the address range may be limited, which limits by how many you can use at the same time. I2C multiplexers are extremely clever and useful in these scenarios because they allow multiple sensors with the same I2C address to be connected.

For instance, the TCA9548A/PCA9548A: I2C Multiplexer has 8 selectable addresses, so 8 multiplexers can be connected to one Raspberry Pi. Each multiplexer has 8 channels, allowing up to 8 devices/sensors with the same address to be connected to each multiplexer. 8 multiplexers x 8 channels = 64 devices/sensors with the same I2C address.

  • TCA9548A/PCA9548A: I2C Multiplexer link (I2C): 8 selectable addresses, 8 channels
  • To load the kernel driver for the TCA9548A/PCA9548A that ships with raspbian add dtoverlay=i2c-mux,pca9548,addr=0x70 to /boot/config.txt where 0x70 is the i2c address of the multiplexer. If successfully set up, there will be 8 new I2C buses on the [Gear Icon] -> System Information page.

  • TCA9545A: I2C Bus Multiplexer link (I2C): The linked Grove board creates 4 new I2C buses, each with their own selectable voltage, either 3.3 or 5.0 volts.

  • To load the kernel driver for the TCA9545A add dtoverlay=i2c-mux,pca9545,addr=0x70 to /boot/config.txt where 0x70 is the i2c address of the multiplexer. If successfully set up, there will be 4 new I2C buses on the [Gear Icon] -> System Information page.
\ No newline at end of file + I2C Multiplexers - Mycodo

I2C Multiplexers

All devices that connected to the Raspberry Pi by the I2C bus need to have a unique address in order to communicate. Some inputs may have the same address (such as the AM2315), which prevents more than one from being connected at the same time. Others may provide the ability to change the address, however the address range may be limited, which limits by how many you can use at the same time. I2C multiplexers are extremely clever and useful in these scenarios because they allow multiple sensors with the same I2C address to be connected.

For instance, the TCA9548A/PCA9548A: I2C Multiplexer has 8 selectable addresses, so 8 multiplexers can be connected to one Raspberry Pi. Each multiplexer has 8 channels, allowing up to 8 devices/sensors with the same address to be connected to each multiplexer. 8 multiplexers x 8 channels = 64 devices/sensors with the same I2C address.

  • TCA9548A/PCA9548A: I2C Multiplexer link (I2C): 8 selectable addresses, 8 channels
  • To load the kernel driver for the TCA9548A/PCA9548A that ships with raspbian add dtoverlay=i2c-mux,pca9548,addr=0x70 to /boot/config.txt where 0x70 is the i2c address of the multiplexer. If successfully set up, there will be 8 new I2C buses on the [Gear Icon] -> System Information page.

  • TCA9545A: I2C Bus Multiplexer link (I2C): The linked Grove board creates 4 new I2C buses, each with their own selectable voltage, either 3.3 or 5.0 volts.

  • To load the kernel driver for the TCA9545A add dtoverlay=i2c-mux,pca9545,addr=0x70 to /boot/config.txt where 0x70 is the i2c address of the multiplexer. If successfully set up, there will be 4 new I2C buses on the [Gear Icon] -> System Information page.
\ No newline at end of file diff --git a/Inputs/index.html b/Inputs/index.html index 8870fa0d6..3c355c45b 100644 --- a/Inputs/index.html +++ b/Inputs/index.html @@ -1,4 +1,4 @@ - Inputs - Mycodo
Skip to content

Inputs

Page: Setup -> Input

For a full list of supported Inputs, see Supported Input Devices.

Inputs, such as sensors, ADC signals, or even a response from a command, enable measuring conditions in the environment or elsewhere, which will be stored in a time-series database (InfluxDB). This database will provide measurements for Dashboard Widgets, Functions, and other parts of Mycodo to operate from. Add, configure, and activate inputs to begin recording measurements to the database and allow them to be used throughout Mycodo.

Custom Inputs~

See Building a Custom Input Module Wiki page.

There is a Custom Input import system in Mycodo that allows user-created Inputs to be created an used in the Mycodo system. Custom Inputs can be uploaded and imported from the [Gear Icon] -> Configure -> Custom Inputs page. After import, they will be available to use on the Setup -> Input page.

If you develop a working Input module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/inputs for examples of the proper formatting.

There are also example Custom Inputs in the directory Mycodo/mycodo/inputs/examples

Additionally, I have another github repository devoted to Custom Modules that are not included in the built-in set, at kizniche/Mycodo-custom.

Input Commands~

Input Commands are functions within the Input module that can be executed from the Web UI. This is useful for things such as calibration or other functionality specific to the input. By default, there is at least one action, Acquire Measurements Now, which will cause the input to acquire measurements rather than waiting until the next Period has elapsed.

Note

Actions can only be executed while the Input is active.

Input Actions~

Every Period the Input will acquire measurements and store then in the time-series database. Following measurement acquisition, one or more Actions can be executed to enhance the functionality of Inputs. For example, the MQTT Publish Action can be used to publish measurements to an MQTT server.

Input Options~

Setting Description
Activate After the sensor has been properly configured, activation begins acquiring measurements from the sensor. Any activated Conditional Functions will now being operating.
Deactivate Deactivation stops measurements from being acquired from the sensor. All associated Conditional Functions will cease to operate.
Save Save the current configuration entered into the input boxes for a particular sensor.
Delete Delete a particular sensor.
Acquire Measurements Now Force the input to conduct measurements and them in the database.
Up/Down Move a particular sensor up or down in the order displayed.
Power Output Select a output that powers the sensor. This enables powering cycling (turn off then on) when the sensor returns 3 consecutive errors to attempt to fix the issue. Transistors may also be used instead of a relay (note: NPN transistors are preferred over PNP for powering sensors).
Location Depending on what sensor is being used, you will need to either select a serial number (DS18B20 temperature sensor), a GPIO pin (in the case of sensors read by a GPIO), or an I2C address. or other.
I2C Bus The bus to be used to communicate with the I2C address.
Period (seconds) After the sensor is successfully read and a database entry is made, this is the duration of time waited until the sensor is measured again.
Measurement Unit Select the unit to save the measurement as (only available for select measurements).
Pre Output If you require a output to be activated before a measurement is made (for instance, if you have a pump that extracts air to a chamber where the sensor resides), this is the output number that will be activated. The output will be activated for a duration defined by the Pre Duration, then once the output turns off, a measurement by the sensor is made.
Pre Output Duration (seconds) This is the duration of time that the Pre Output runs for before the sensor measurement is obtained.
Pre Output During Measurement If enabled, the Pre Output stays on during the acquisition of a measurement. If disabled, the Pre Output is turned off directly before acquiring a measurement.
Command A linux command (executed as the user 'root') that the return value becomes the measurement
Command Measurement The measured condition (e.g. temperature, humidity, etc.) from the linux command
Command Units The units of the measurement condition from the linux command
Edge Edge sensors only: Select whether the Rising or Falling (or both) edges of a changing voltage are detected. A number of devices to do this when in-line with a circuit supplying a 3.3-volt input signal to a GPIO, such as simple mechanical switch, a button, a magnet (reed/hall) sensor, a PIR motion detector, and more.
Bounce Time (ms) Edge sensors only: This is the number of milliseconds to bounce the input signal. This is commonly called debouncing a signal [1] and may be necessary if using a mechanical circuit.
Reset Period (seconds) Edge sensors only: This is the period of time after an edge detection that another edge will not be recorded. This enables devices such as PIR motion sensors that may stay activated for longer periods of time.
Measurement Analog-to-digital converter only: The type of measurement being acquired by the ADC. For instance, if the resistance of a photocell is being measured through a voltage divider, this measurement would be "light".
Units Analog-to-digital converter only: This is the unit of the measurement. With the above example of "light" as the measurement, the unit may be "lux" or "intensity".
BT Adapter The Bluetooth adapter to communicate with the input.
Clock Pin The GPIO (using BCM numbering) connected to the Clock pin of the ADC
CS Pin The GPIO (using BCM numbering) connected to the CS pin of the ADC
MISO Pin The GPIO (using BCM numbering) connected to the MISO pin of the ADC
MOSI Pin The GPIO (using BCM numbering) connected to the MOSI pin of the ADC
RTD Probe Type Select to measure from a PT100 or PT1000 probe.
Resistor Reference (Ohm) If your reference resistor is not the default (400 Ohm for PT100, 4000 Ohm for PT1000), you can manually set this value. Several manufacturers now use 430 Ohm resistors on their circuit boards, therefore it's recommended to verify the accuracy of your measurements and adjust this value if necessary.
Channel Analog-to-digital converter only: This is the channel to obtain the voltage measurement from the ADC.
Gain Analog-to-digital converter only: set the gain when acquiring the measurement.
Sample Speed Analog-to-digital converter only: set the sample speed (typically samples per second).
Volts Min Analog-to-digital converter only: What is the minimum voltage to use when scaling to produce the unit value for the database. For instance, if your ADC is not expected to measure below 0.2 volts for your particular circuit, set this to "0.2".
Volts Max Analog-to-digital converter only: This is similar to the Min option above, however it is setting the ceiling to the voltage range. Units Min Analog-to-digital converter only: This value will be the lower value of a range that will use the Min and Max Voltages, above, to produce a unit output. For instance, if your voltage range is 0.0 -1.0 volts, and the unit range is 1 -60, and a voltage of 0.5 is measured, in addition to 0.5 being stored in the database, 30 will be stored as well. This enables creating calibrated scales to use with your particular circuit.
Units Max Analog-to-digital converter only: This is similar to the Min option above, however it is setting the ceiling to the unit range.
Weighting The This is a number between 0 and 1 and indicates how much the old reading affects the new reading. It defaults to 0 which means the old reading has no effect. This may be used to smooth the data.
Pulses Per Rev The number of pulses for a complete revolution.
Port The server port to be queried (Server Port Open input).
Times to Check The number of times to attempt to ping a server (Server Ping input).
Deadline (seconds) The maximum amount of time to wait for each ping attempt, after which 0 (offline) will be returned (Server Ping input).
Number of Measurement The number of unique measurements to store data for this input.
Application ID The Application ID on The Things Network.
App API Key The Application API Key on The Things Network.
Device ID The Device ID of the Application on The Things Network.
  1. Debouncing a signal

The Things Network~

The Things Network (TTN, v2 and v3) Input module enables downloading of data from TTN if the Data Storage Integration is enabled in your TTN Application. The Data Storage Integration will store data for up to 7 days. Mycodo will download this data periodically and store the measurements locally.

The payload on TTN must be properly decoded to variables that correspond to the "Variable Name" option under "Channel Options", in the lower section of the Input options. For instance, in your TTN Application, if a custom Payload Format is selected, the decoder code may look like this:

function Decoder(bytes, port) {
+ Inputs - Mycodo      

Inputs

Page: Setup -> Input

For a full list of supported Inputs, see Supported Input Devices.

Inputs, such as sensors, ADC signals, or even a response from a command, enable measuring conditions in the environment or elsewhere, which will be stored in a time-series database (InfluxDB). This database will provide measurements for Dashboard Widgets, Functions, and other parts of Mycodo to operate from. Add, configure, and activate inputs to begin recording measurements to the database and allow them to be used throughout Mycodo.

Custom Inputs~

See Building a Custom Input Module Wiki page.

There is a Custom Input import system in Mycodo that allows user-created Inputs to be created an used in the Mycodo system. Custom Inputs can be uploaded and imported from the [Gear Icon] -> Configure -> Custom Inputs page. After import, they will be available to use on the Setup -> Input page.

If you develop a working Input module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/inputs for examples of the proper formatting.

There are also example Custom Inputs in the directory Mycodo/mycodo/inputs/examples

Additionally, I have another github repository devoted to Custom Modules that are not included in the built-in set, at kizniche/Mycodo-custom.

Input Commands~

Input Commands are functions within the Input module that can be executed from the Web UI. This is useful for things such as calibration or other functionality specific to the input. By default, there is at least one action, Acquire Measurements Now, which will cause the input to acquire measurements rather than waiting until the next Period has elapsed.

Note

Actions can only be executed while the Input is active.

Input Actions~

Every Period the Input will acquire measurements and store then in the time-series database. Following measurement acquisition, one or more Actions can be executed to enhance the functionality of Inputs. For example, the MQTT Publish Action can be used to publish measurements to an MQTT server.

Input Options~

Setting Description
Activate After the sensor has been properly configured, activation begins acquiring measurements from the sensor. Any activated Conditional Functions will now being operating.
Deactivate Deactivation stops measurements from being acquired from the sensor. All associated Conditional Functions will cease to operate.
Save Save the current configuration entered into the input boxes for a particular sensor.
Delete Delete a particular sensor.
Acquire Measurements Now Force the input to conduct measurements and them in the database.
Up/Down Move a particular sensor up or down in the order displayed.
Power Output Select a output that powers the sensor. This enables powering cycling (turn off then on) when the sensor returns 3 consecutive errors to attempt to fix the issue. Transistors may also be used instead of a relay (note: NPN transistors are preferred over PNP for powering sensors).
Location Depending on what sensor is being used, you will need to either select a serial number (DS18B20 temperature sensor), a GPIO pin (in the case of sensors read by a GPIO), or an I2C address. or other.
I2C Bus The bus to be used to communicate with the I2C address.
Period (seconds) After the sensor is successfully read and a database entry is made, this is the duration of time waited until the sensor is measured again.
Measurement Unit Select the unit to save the measurement as (only available for select measurements).
Pre Output If you require a output to be activated before a measurement is made (for instance, if you have a pump that extracts air to a chamber where the sensor resides), this is the output number that will be activated. The output will be activated for a duration defined by the Pre Duration, then once the output turns off, a measurement by the sensor is made.
Pre Output Duration (seconds) This is the duration of time that the Pre Output runs for before the sensor measurement is obtained.
Pre Output During Measurement If enabled, the Pre Output stays on during the acquisition of a measurement. If disabled, the Pre Output is turned off directly before acquiring a measurement.
Command A linux command (executed as the user 'root') that the return value becomes the measurement
Command Measurement The measured condition (e.g. temperature, humidity, etc.) from the linux command
Command Units The units of the measurement condition from the linux command
Edge Edge sensors only: Select whether the Rising or Falling (or both) edges of a changing voltage are detected. A number of devices to do this when in-line with a circuit supplying a 3.3-volt input signal to a GPIO, such as simple mechanical switch, a button, a magnet (reed/hall) sensor, a PIR motion detector, and more.
Bounce Time (ms) Edge sensors only: This is the number of milliseconds to bounce the input signal. This is commonly called debouncing a signal [1] and may be necessary if using a mechanical circuit.
Reset Period (seconds) Edge sensors only: This is the period of time after an edge detection that another edge will not be recorded. This enables devices such as PIR motion sensors that may stay activated for longer periods of time.
Measurement Analog-to-digital converter only: The type of measurement being acquired by the ADC. For instance, if the resistance of a photocell is being measured through a voltage divider, this measurement would be "light".
Units Analog-to-digital converter only: This is the unit of the measurement. With the above example of "light" as the measurement, the unit may be "lux" or "intensity".
BT Adapter The Bluetooth adapter to communicate with the input.
Clock Pin The GPIO (using BCM numbering) connected to the Clock pin of the ADC
CS Pin The GPIO (using BCM numbering) connected to the CS pin of the ADC
MISO Pin The GPIO (using BCM numbering) connected to the MISO pin of the ADC
MOSI Pin The GPIO (using BCM numbering) connected to the MOSI pin of the ADC
RTD Probe Type Select to measure from a PT100 or PT1000 probe.
Resistor Reference (Ohm) If your reference resistor is not the default (400 Ohm for PT100, 4000 Ohm for PT1000), you can manually set this value. Several manufacturers now use 430 Ohm resistors on their circuit boards, therefore it's recommended to verify the accuracy of your measurements and adjust this value if necessary.
Channel Analog-to-digital converter only: This is the channel to obtain the voltage measurement from the ADC.
Gain Analog-to-digital converter only: set the gain when acquiring the measurement.
Sample Speed Analog-to-digital converter only: set the sample speed (typically samples per second).
Volts Min Analog-to-digital converter only: What is the minimum voltage to use when scaling to produce the unit value for the database. For instance, if your ADC is not expected to measure below 0.2 volts for your particular circuit, set this to "0.2".
Volts Max Analog-to-digital converter only: This is similar to the Min option above, however it is setting the ceiling to the voltage range. Units Min Analog-to-digital converter only: This value will be the lower value of a range that will use the Min and Max Voltages, above, to produce a unit output. For instance, if your voltage range is 0.0 -1.0 volts, and the unit range is 1 -60, and a voltage of 0.5 is measured, in addition to 0.5 being stored in the database, 30 will be stored as well. This enables creating calibrated scales to use with your particular circuit.
Units Max Analog-to-digital converter only: This is similar to the Min option above, however it is setting the ceiling to the unit range.
Weighting The This is a number between 0 and 1 and indicates how much the old reading affects the new reading. It defaults to 0 which means the old reading has no effect. This may be used to smooth the data.
Pulses Per Rev The number of pulses for a complete revolution.
Port The server port to be queried (Server Port Open input).
Times to Check The number of times to attempt to ping a server (Server Ping input).
Deadline (seconds) The maximum amount of time to wait for each ping attempt, after which 0 (offline) will be returned (Server Ping input).
Number of Measurement The number of unique measurements to store data for this input.
Application ID The Application ID on The Things Network.
App API Key The Application API Key on The Things Network.
Device ID The Device ID of the Application on The Things Network.
  1. Debouncing a signal

The Things Network~

The Things Network (TTN, v2 and v3) Input module enables downloading of data from TTN if the Data Storage Integration is enabled in your TTN Application. The Data Storage Integration will store data for up to 7 days. Mycodo will download this data periodically and store the measurements locally.

The payload on TTN must be properly decoded to variables that correspond to the "Variable Name" option under "Channel Options", in the lower section of the Input options. For instance, in your TTN Application, if a custom Payload Format is selected, the decoder code may look like this:

function Decoder(bytes, port) {
     var decoded = {};
     var rawTemp = bytes[0] + bytes[1] * 256;
     decoded.temperature = sflt162f(rawTemp) * 100;
@@ -20,4 +20,4 @@
     return_dict[0]['value'])
 self.serial_send = self.serial.Serial(self.serial_device, 9600)
 self.serial_send.write(string_send.encode())
-

This is useful if multiple data strings are to be sent to the same serial device (e.g. if both bme280_ttn.py and k30_ttn.py are being used at the same time), allowing the serial device to distinguish what data is being received.

The full code used to decode both bme280_ttn.py and k30_ttn.py, with informative comments, is located at /opt/Mycodo/mycodo/inputs/examples/ttn_data_storage_decoder_example.js.

These example Input modules may be modified to suit your needs and imported into Mycodo through the [Gear Icon] -> Configure -> Custom Inputs page. After import, they will be available to use on the Setup -> Input page.

\ No newline at end of file +

This is useful if multiple data strings are to be sent to the same serial device (e.g. if both bme280_ttn.py and k30_ttn.py are being used at the same time), allowing the serial device to distinguish what data is being received.

The full code used to decode both bme280_ttn.py and k30_ttn.py, with informative comments, is located at /opt/Mycodo/mycodo/inputs/examples/ttn_data_storage_decoder_example.js.

These example Input modules may be modified to suit your needs and imported into Mycodo through the [Gear Icon] -> Configure -> Custom Inputs page. After import, they will be available to use on the Setup -> Input page.

\ No newline at end of file diff --git a/Interfaces/index.html b/Interfaces/index.html index a089b6ada..0923844d4 100644 --- a/Interfaces/index.html +++ b/Interfaces/index.html @@ -1 +1 @@ - Interfaces - Mycodo
Skip to content

Interfaces

I2C Information~

The I2C interface should be enabled with raspi-config or from the [Gear Icon] -> Configure -> Raspberry Pi page.

1-Wire Information~

The 1-Wire interface should be enabled with raspi-config or from the [Gear Icon] -> Configure -> Raspberry Pi page.

UART Information~

This documentation provides specific installation procedures for configuring UART with the Raspberry Pi version 1 or 2.

Because the UART is handled differently higher after the Raspberry Pi 2 (due to the addition of bluetooth), there are a different set of instructions. If installing Mycodo on a Raspberry Pi 3 or above, you only need to perform these steps to configure UART:

Run raspi-config

sudo raspi-config

Go to Advanced Options -> Serial and disable. Then edit /boot/config.txt

sudo nano /boot/config.txt

Find the line "enable_uart=0" and change it to "enable_uart=1", then reboot.

\ No newline at end of file + Interfaces - Mycodo
Skip to content

Interfaces

I2C Information~

The I2C interface should be enabled with raspi-config or from the [Gear Icon] -> Configure -> Raspberry Pi page.

1-Wire Information~

The 1-Wire interface should be enabled with raspi-config or from the [Gear Icon] -> Configure -> Raspberry Pi page.

UART Information~

This documentation provides specific installation procedures for configuring UART with the Raspberry Pi version 1 or 2.

Because the UART is handled differently higher after the Raspberry Pi 2 (due to the addition of bluetooth), there are a different set of instructions. If installing Mycodo on a Raspberry Pi 3 or above, you only need to perform these steps to configure UART:

Run raspi-config

sudo raspi-config

Go to Advanced Options -> Serial and disable. Then edit /boot/config.txt

sudo nano /boot/config.txt

Find the line "enable_uart=0" and change it to "enable_uart=1", then reboot.

\ No newline at end of file diff --git a/Methods/index.html b/Methods/index.html index a25565b8f..5fb85a007 100644 --- a/Methods/index.html +++ b/Methods/index.html @@ -1 +1 @@ - Methods - Mycodo
Skip to content

Methods

Page: Setup -> Method

Methods enable Setpoint Tracking in PIDs and time-based duty cycle changes in timers. Normally, a PID controller will regulate an environmental condition to a specific setpoint. If you would like the setpoint to change over time, this is called setpoint tracking. Setpoint Tracking is useful for applications such as reflow ovens, thermal cyclers (DNA replication), mimicking natural daily cycles, and more. Methods may also be used to change a duty cycle over time when used with a Run PWM Method Conditional.

Method Options~

These options are shared with several method types.

Setting Description
Start Time/Date This is the start time of a range of time.
End Time/Date This is the end time of a range of time.
Start Setpoint This is the start setpoint of a range of setpoints.
End Setpoint This is the end setpoint of a range of setpoints.

Time/Date Method~

A time/date method allows a specific time/date span to dictate the setpoint. This is useful for long-running methods, that may take place over the period of days, weeks, or months.

Duration Method~

A Duration Method allows a Setpoint (for PIDs) or Duty Cycle (for Conditional) to be set after specific durations of time. Each new duration added will stack, meaning it will come after the previous duration, meaning a newly-added Start Setpoint will begin after the previous entry's End Setpoint.

If the "Repeat Method" option is used, this will cause the method to repeat once it has reached the end. If this option is used, no more durations may be added to the method. If the repeat option is deleted then more durations may be added. For instance, if your method is 200 seconds total, if the Repeat Duration is set to 600 seconds, the method will repeat 3 times and then automatically turn off the PID or Conditional.

Daily (Time-Based) Method~

The daily time-based method is similar to the time/date method, however it will repeat every day. Therefore, it is essential that only the span of one day be set in this method. Begin with the start time at 00:00:00 and end at 23:59:59 (or 00:00:00, which would be 24 hours from the start). The start time must be equal or greater than the previous end time.

Daily (Sine Wave) Method~

The daily sine wave method defines the setpoint over the day based on a sinusoidal wave. The sine wave is defined by y = [A * sin(B * x + C)] + D, where A is amplitude, B is frequency, C is the angle shift, and D is the y-axis shift. This method will repeat daily.

Daily (Bezier Curve) Method~

A daily Bezier curve method define the setpoint over the day based on a cubic Bezier curve. If unfamiliar with a Bezier curve, it is recommended you use the graphical Bezier curve generator and use the 8 variables it creates for 4 points (each a set of x and y). The x-axis start (x3) and end (x0) will be automatically stretched or skewed to fit within a 24-hour period and this method will repeat daily.

Cascade Method~

This method combines multiple methods and outputs the average of the methods. For examples, let's combine a Duration method set to 100 for 60 seconds and 0 for 60 seconds (and set to repeat forever) with a Daily Method that rises from 0 at 00:00:00 to 50 at 12:00:00, and falls back to 0 at 23:59:59. At 00:00:00, the combined methods would produce an output that oscillates from 0 ((0 / 100) * (0 / 100) = 0) to 0 ((100 / 100) * (0 / 100) = 0) every 60 seconds, and gradually increase until at 12:00:00 the output would be oscillating from 0 ((0 / 100) * (50 / 100)) to 50 ((100 / 100) * (50 / 100)) every 60 seconds. This is a simple example, but combinations can become very complex.

\ No newline at end of file + Methods - Mycodo
Skip to content

Methods

Page: Setup -> Method

Methods enable Setpoint Tracking in PIDs and time-based duty cycle changes in timers. Normally, a PID controller will regulate an environmental condition to a specific setpoint. If you would like the setpoint to change over time, this is called setpoint tracking. Setpoint Tracking is useful for applications such as reflow ovens, thermal cyclers (DNA replication), mimicking natural daily cycles, and more. Methods may also be used to change a duty cycle over time when used with a Run PWM Method Conditional.

Method Options~

These options are shared with several method types.

Setting Description
Start Time/Date This is the start time of a range of time.
End Time/Date This is the end time of a range of time.
Start Setpoint This is the start setpoint of a range of setpoints.
End Setpoint This is the end setpoint of a range of setpoints.

Time/Date Method~

A time/date method allows a specific time/date span to dictate the setpoint. This is useful for long-running methods, that may take place over the period of days, weeks, or months.

Duration Method~

A Duration Method allows a Setpoint (for PIDs) or Duty Cycle (for Conditional) to be set after specific durations of time. Each new duration added will stack, meaning it will come after the previous duration, meaning a newly-added Start Setpoint will begin after the previous entry's End Setpoint.

If the "Repeat Method" option is used, this will cause the method to repeat once it has reached the end. If this option is used, no more durations may be added to the method. If the repeat option is deleted then more durations may be added. For instance, if your method is 200 seconds total, if the Repeat Duration is set to 600 seconds, the method will repeat 3 times and then automatically turn off the PID or Conditional.

Daily (Time-Based) Method~

The daily time-based method is similar to the time/date method, however it will repeat every day. Therefore, it is essential that only the span of one day be set in this method. Begin with the start time at 00:00:00 and end at 23:59:59 (or 00:00:00, which would be 24 hours from the start). The start time must be equal or greater than the previous end time.

Daily (Sine Wave) Method~

The daily sine wave method defines the setpoint over the day based on a sinusoidal wave. The sine wave is defined by y = [A * sin(B * x + C)] + D, where A is amplitude, B is frequency, C is the angle shift, and D is the y-axis shift. This method will repeat daily.

Daily (Bezier Curve) Method~

A daily Bezier curve method define the setpoint over the day based on a cubic Bezier curve. If unfamiliar with a Bezier curve, it is recommended you use the graphical Bezier curve generator and use the 8 variables it creates for 4 points (each a set of x and y). The x-axis start (x3) and end (x0) will be automatically stretched or skewed to fit within a 24-hour period and this method will repeat daily.

Cascade Method~

This method combines multiple methods and outputs the average of the methods. For examples, let's combine a Duration method set to 100 for 60 seconds and 0 for 60 seconds (and set to repeat forever) with a Daily Method that rises from 0 at 00:00:00 to 50 at 12:00:00, and falls back to 0 at 23:59:59. At 00:00:00, the combined methods would produce an output that oscillates from 0 ((0 / 100) * (0 / 100) = 0) to 0 ((100 / 100) * (0 / 100) = 0) every 60 seconds, and gradually increase until at 12:00:00 the output would be oscillating from 0 ((0 / 100) * (50 / 100)) to 50 ((100 / 100) * (50 / 100)) every 60 seconds. This is a simple example, but combinations can become very complex.

\ No newline at end of file diff --git a/Mycodo-Client/index.html b/Mycodo-Client/index.html index ba584810b..be27002e2 100644 --- a/Mycodo-Client/index.html +++ b/Mycodo-Client/index.html @@ -1,4 +1,4 @@ - Mycodo Client - Mycodo

Mycodo Client

The Mycodo client is a command-line tool used to communicate with the daemon.

pi@raspberry:~ $ mycodo-client --help
+ Mycodo Client - Mycodo     

Mycodo Client

The Mycodo client is a command-line tool used to communicate with the daemon.

pi@raspberry:~ $ mycodo-client --help
 usage: mycodo-client [-h] [-c] [--activatecontroller CONTROLLER ID]
                      [--deactivatecontroller CONTROLLER ID] [--ramuse] [-t]
                      [--trigger_action ACTIONID]
@@ -77,4 +77,4 @@
   --pid_set_kp ID KP    Set the Kp gain of the PID controller.
   --pid_set_ki ID KI    Set the Ki gain of the PID controller.
   --pid_set_kd ID KD    Set the Kd gain of the PID controller.
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Notes/index.html b/Notes/index.html index 0e7118591..d6d372369 100644 --- a/Notes/index.html +++ b/Notes/index.html @@ -1 +1 @@ - Notes - Mycodo
Skip to content

Notes

Page: More -> Notes

Notes may be created that can then be displayed on graphs or referenced at a later time. All notes are timestamped with the date/time of creation or may be created with a custom date/time. Each note must have at least one tag selected. Tags are what are selected to be displayed on a graph and all notes with that tag will appear in the time frame selected on the graph.

Tag Options~

Setting Description
Name A name for the tag. Must not contain spaces.
Rename Rename the tag.

Note Options~

Setting Description
Name A name for the note.
Use Custom Date/Time Check to enter a custom date/time for the note.
Custom Date/Time Store the note with this custom date/time.
Attached Files Attach one or more files to the note.
Tags Associate the note with at least one tag.
Note The text body of the note. The text will appear monospaced, so code will format properly.
\ No newline at end of file + Notes - Mycodo
Skip to content

Notes

Page: More -> Notes

Notes may be created that can then be displayed on graphs or referenced at a later time. All notes are timestamped with the date/time of creation or may be created with a custom date/time. Each note must have at least one tag selected. Tags are what are selected to be displayed on a graph and all notes with that tag will appear in the time frame selected on the graph.

Tag Options~

Setting Description
Name A name for the tag. Must not contain spaces.
Rename Rename the tag.

Note Options~

Setting Description
Name A name for the note.
Use Custom Date/Time Check to enter a custom date/time for the note.
Custom Date/Time Store the note with this custom date/time.
Attached Files Attach one or more files to the note.
Tags Associate the note with at least one tag.
Note The text body of the note. The text will appear monospaced, so code will format properly.
\ No newline at end of file diff --git a/Outputs/index.html b/Outputs/index.html index df522660b..b3711e4a0 100644 --- a/Outputs/index.html +++ b/Outputs/index.html @@ -1,2 +1,2 @@ - Outputs - Mycodo
Skip to content

Outputs

Page: Setup -> Output

For a full list of supported Outputs, see Supported Outputs Devices.

Outputs are various signals that can be generated that operate devices. An output can be a HIGH/LOW signal on a GPIO pin, a pulse-width modulated (PWM) signal, a 315/433 MHz signal to switch a radio frequency-operated relay, driving of pumps and motors, or an execution of a linux or Python command, to name a few.

Custom Outputs~

There is a Custom Output import system in Mycodo that allows user-created Outputs to be created an used in the Mycodo system. Custom Outputs can be uploaded and imported from the [Gear Icon] -> Configure -> Custom Outputs page. After import, they will be available to use on the Setup -> Output page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/outputs for examples of the proper formatting. There are also example Custom Outputs in the directory Mycodo/mycodo/outputs/examples

For Outputs that require new measurements/units, they can be added on the [Gear Icon] -> Configure -> Measurements page.

Output Options~

Setting Description
Pin (GPIO) This is the GPIO that will be the signal to the output, using BCM numbering.
WiringPi Pin This is the GPIO that will be the signal to the output, using WiringPi numbering.
On State This is the state of the GPIO to signal the output to turn the device on. HIGH will send a 3.3-volt signal and LOW will send a 0-volt signal. If you output completes the circuit (and the device powers on) when a 3.3-volt signal is sent, then set this to HIGH. If the device powers when a 0-volt signal is sent, set this to LOW.
Protocol This is the protocol to use to transmit via 315/433 MHz. Default is 1, but if this doesn't work, increment the number.
UART Device The UART device connected to the device.
Baud Rate The baud rate of the UART device.
I2C Address The I2C address of the device.
I2C Bus The I2C bus the device is connected to.
Output Mode The Output mode, if supported.
Flow Rate The flow rate to dispense the volume (ml/min).
Pulse Length This is the pulse length to transmit via 315/433 MHz. Default is 189 ms.
Bit Length This is the bit length to transmit via 315/433 MHz. Default is 24-bit.
Execute as User Select which user executes Linux Commands.
On Command This is the command used to turn the output on. For wireless relays, this is the numerical command to be transmitted, and for command outputs this is the command to be executed. Commands may be for the linux terminal or Python 3 (depending on which output type selected).
Off Command This is the command used to turn the output off. For wireless relays, this is the numerical command to be transmitted, and for command outputs this is the command to be executed. Commands may be for the linux terminal or Python 3 (depending on which output type selected).
Force Command If an Output is already on, enabling this option will allow the On command to be executed rather than returning "Output is already On".
PWM Command This is the command used to set the duty cycle. The string "((duty_cycle))" in the command will be replaced with the actual duty cycle before the command is executed. Ensure "((duty_cycle))" is included in your command for this feature to work correctly. Commands may be for the linux terminal or Python 3 (depending on which output type selected).
Current Draw (amps) The is the amount of current the device powered by the output draws. Note: this value should be calculated based on the voltage set in the Energy Usage Settings.
Startup State This specifies whether the output should be ON or OFF when mycodo initially starts. Some outputs have an additional options.
Startup Value If the Startup State is set to User Set Value (such as for PWM Outputs), then this value will be set when Mycodo starts up.
Shutdown State This specifies whether the output should be ON or OFF when mycodo initially shuts down. Some outputs have an additional options.
Shutdown Value If the Shutdown State is set to User Set Value (such as for PWM Outputs), then this value will be set when Mycodo shuts down.
Trigger at Startup Select to enable triggering Functions (such as Output Triggers) when Mycodo starts and if Start State is set to ON.
Seconds to turn On This is a way to turn a output on for a specific duration of time. This can be useful for testing the outputs and powered devices or the measured effects a device may have on an environmental condition.

On/Off (GPIO)~

The On/Off (GPIO) output merely turns a GPIO pin High (3.3 volts) or Low (0 volts). This is useful for controlling things like electromechanical switches, such as relays, to turn electrical devices on and off.

Relays are electromechanical or solid-state devices that enable a small voltage signal (such as from a microprocessor) to activate a much larger voltage, without exposing the low-voltage system to the dangers of the higher voltage.

Add and configure outputs in the Output tab. Outputs must be properly set up before they can be used in the rest of the system.

To set up a wired relay, set the "GPIO Pin" (using BCM numbering) to the pin you would like to switch High (5 volts) and Low (0 volts), which can be used to activate relays and other devices. On Trigger should be set to the signal state (High or Low) that induces the device to turn on. For example, if your relay activates when the potential across the coil is 0-volts, set On Trigger to "Low", otherwise if your relay activates when the potential across the coil is 5 volts, set it to "High".

Pulse-Width Modulation (PWM)~

Pulse-width modulation (PWM) is a modulation technique used to encode a message into a pulsing signal, at a specific frequency in Hertz (Hz). The average value of voltage (and current) fed to the load is controlled by turning the switch between supply and load on and off at a fast rate. The longer the switch is on compared to the off periods, the higher the total power supplied to the load.

The PWM switching frequency has to be much higher than what would affect the load (the device that uses the power), which is to say that the resultant waveform perceived by the load must be as smooth as possible. The rate (or frequency) at which the power supply must switch can vary greatly depending on load and application, for example

Quote

Switching has to be done several times a minute in an electric stove; 120 Hz in a lamp dimmer; between a few kilohertz (kHz) to tens of kHz for a motor drive; and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies.

The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, with 0% being always off, 50% being off for half of the time and on for half of the time, and 100% being always on.

Pulse-Width Modulation (PWM) Options~

Setting Description
Library Select the method for producing the PWM signal. Hardware pins can produce up to a 30 MHz PWM signal, while any other (non-hardware PWM) pin can produce up to a 40 kHz PWM signal. See the table, below, for the hardware pins on various Pi boards.
Pin (GPIO) This is the GPIO pin that will output the PWM signal, using BCM numbering.
Frequency (Hertz) This is frequency of the PWM signal.
Invert Signal Send an inverted duty cycle to the output controller.
Duty Cycle This is the proportion of the time on to the time off, expressed in percent (0 -100).

Non-hardware PWM Pins~

When using non-hardware PWM pins, there are only certain frequencies that can be used. These frequencies in Hertz are 40000, 20000, 10000, 8000, 5000, 4000, 2500, 2000, 1600, 1250, 1000, 800, 500, 400, 250, 200, 100, and 50 Hz. If you attempt to set a frequency that is not listed here, the nearest frequency from this list will be used.

Hardware PWM Pins~

The exact frequency may be set when using hardware PWM pins. The same PWM channel is available on multiple GPIO. The latest frequency and duty cycle setting will be used by all GPIO pins which share a PWM channel.

BCM Pin PWM Channel Raspberry Pi Version
12 0 All models except A and B
13 1 All models except A and B
18 0 All models
19 1 All models except A and B
40 0 Compute module only
41 1 Compute module only
45 1 Compute module only
52 0 Compute module only
53 1 Compute module only

Schematics for DC Fan Control~

Below are hardware schematics that enable controlling direct current (DC) fans from the PWM output from Mycodo.

PWM output controlling a 12-volt DC fan (such as a PC fan)

Schematic: PWM output modulating alternating current (AC) at 1% duty cycle (1of2)

Schematics for AC Modulation~

Below are hardware schematics that enable the modulation of alternating current (AC) from the PWM output from Mycodo.

PWM output modulating alternating current (AC) at 1% duty cycle

Schematic: PWM output modulating alternating current (AC) at 1% duty cycle (2of2)

PWM output modulating alternating current (AC) at 50% duty cycle

Schematic: PWM output modulating alternating current (AC) at 50% duty cycle

PWM output modulating alternating current (AC) at 99% duty cycle

Schematic: PWM output modulating alternating current (AC) at 99% duty cycle

Peristaltic Pump~

There are two peristaltic pump Output modules that Mycodo supports, a generic peristaltic pump Output, and the Atlas Scientific EZO-PMP peristaltic pump.

Generic Peristaltic Pump~

Any peristaltic pump can be used with the Generic Peristaltic Pump Output to dispense liquids. The most basic dispensing abilities are to start dispensing, stop dispensing, or dispense for a duration of time. If the pump rate has been measured, this value can be entered into the Fastest Rate (ml/min) setting and the Output controller will then be able to dispense specific volumes rather than merely for durations of time. In oder to dispense specific volumes, the Output Mode will also need to be set in addition to the Desired Flow Rate (ml/min), if the Output Mode has been set to Specify Flow Rate.

To determine your pump's flow rate, first purge all air from your pump's hose. Next, instruct the pump to dispense for 60 seconds and collect the liquid it dispenses. Once finished, measure the amount of liquid and enter this value, in milliliters into the Fastest Rate (ml/min) setting. Once your pump's flow rate is set, you can now start dispensing specific volumes rather than durations.

This Output module relies on switching a GPIO pin High and Low to switch the peristaltic pump on and off. This is most easily accomplished with the use of a relay in-line with your pump's power supply or using the GPIO as an input signal directly to the pump (if supported). When using a relay, it's important to develop your circuit to provide the fastest possible switching of the pump. Since the volume dispensed by the pump is dependent on time, the faster the pump switching can occur, the more accurate the dispensing will be. Many peristaltic pumps operate on DC voltage and require an AC-DC converter. These converters can take a significant amount of time to energize once power is applied as well as de-energize once power is removed, causing significant delays that can impact dispensing accuracy. To alleviate this issue, the DC power should be switched, rather than the AC power, which will remove this potential delay.

Atlas Scientific Peristaltic Pump~

The Atlas Scientific peristaltic pump is a peristaltic pump and microcontroller combined that allows it to be communicated with via I2C or Serial and can accurately dispense specific volumes of fluid. There are several commands the pump can accept, including commands to calibrate, turn on, turn off, and dispense at a specific rate, among others. Atlas Scientific peristaltic pumps are good options, but are more expensive than generic peristaltic pumps.

Peristaltic Pump Options~

Setting Description
Output Mode "Fastest low Rate" will pump liquid at the fastest rate the pump can perform. "Specify Flow Rate" will pump liquid at the rate set by the "Flow Rate (ml/min)" option.
Flow Rate (ml/min) This is how fast liquid will be pumped if the "Specify Flow Rate" option is selected for the Output Mode option.
Fastest Rate (ml/min) This is the rate at which the pump dispenses liquid, in ml/min.
Minimum On (sec/min) This is the minimum duration (seconds) the pump should be turned on for every 60 second period of pumping. This option is only used when Specify Flow Rate is selected as the output Mode.

Wireless 315/433 MHz~

Certain 315/433 MHz wireless relays may be used, however you will need to set the pin of the transmitter (using BCM numbering), pulse length, bit length, protocol, on command, and off command. To determine your On and Off commands, connect a 315/433 MHz receiver to your Pi, then run the receiver script, below, replacing 17 with the pin your receiver is connected to (using BCM numbering), and press one of the buttons on your remote (either on or off) to detect the numeric code associated with that button.

sudo /opt/Mycodo/env/bin/python /opt/Mycodo/mycodo/devices/wireless_rpi_rf.py -d 2 -g 17
-

433 MHz wireless relays have been successfully tested with SMAKN 433MHz RF Transmitters/Receivers and Etekcity Wireless Remote Control Electrical Outlets (see Issue 88 for more information). If you have a 315/433 MHz transmitter/receiver and a wireless relay that does not work with the current code, submit a new issue with details of your hardware.

Linux Command~

Another option for output control is to execute a terminal command when the output is turned on, off, or a duty cycle is set. Commands will be executed as the user 'root'. When a Linux Command output is created, example code is provided to demonstrate how to use the output.

Python Command~

The Python Command output operates similarly to the Linux Command output, however Python 3 code is being executed. When a Python Command output is created, example code is provided to demonstrate how to use the output.

Output Notes~

Wireless and Command (Linux/Python) Outputs: Since the wireless protocol only allows 1-way communication to 315/433 MHz devices, wireless relays are assumed to be off until they are turned on, and therefore will appear red (off) when added. If a wireless relay is turned off or on outside Mycodo (by a remote, for instance), Mycodo will *not* be able to determine the state of the relay and will indicate whichever state the relay was last. This is, if Mycodo turns the wireless relay on, and a remote is used to turn the relay off, Mycodo will still assume the relay is on.

\ No newline at end of file + Outputs - Mycodo
Skip to content

Outputs

Page: Setup -> Output

For a full list of supported Outputs, see Supported Outputs Devices.

Outputs are various signals that can be generated that operate devices. An output can be a HIGH/LOW signal on a GPIO pin, a pulse-width modulated (PWM) signal, a 315/433 MHz signal to switch a radio frequency-operated relay, driving of pumps and motors, or an execution of a linux or Python command, to name a few.

Custom Outputs~

There is a Custom Output import system in Mycodo that allows user-created Outputs to be created an used in the Mycodo system. Custom Outputs can be uploaded and imported from the [Gear Icon] -> Configure -> Custom Outputs page. After import, they will be available to use on the Setup -> Output page.

If you develop a working module, please consider creating a new GitHub issue or pull request, and it may be included in the built-in set.

Open any of the built-in modules located in the directory Mycodo/mycodo/outputs for examples of the proper formatting. There are also example Custom Outputs in the directory Mycodo/mycodo/outputs/examples

For Outputs that require new measurements/units, they can be added on the [Gear Icon] -> Configure -> Measurements page.

Output Options~

Setting Description
Pin (GPIO) This is the GPIO that will be the signal to the output, using BCM numbering.
WiringPi Pin This is the GPIO that will be the signal to the output, using WiringPi numbering.
On State This is the state of the GPIO to signal the output to turn the device on. HIGH will send a 3.3-volt signal and LOW will send a 0-volt signal. If you output completes the circuit (and the device powers on) when a 3.3-volt signal is sent, then set this to HIGH. If the device powers when a 0-volt signal is sent, set this to LOW.
Protocol This is the protocol to use to transmit via 315/433 MHz. Default is 1, but if this doesn't work, increment the number.
UART Device The UART device connected to the device.
Baud Rate The baud rate of the UART device.
I2C Address The I2C address of the device.
I2C Bus The I2C bus the device is connected to.
Output Mode The Output mode, if supported.
Flow Rate The flow rate to dispense the volume (ml/min).
Pulse Length This is the pulse length to transmit via 315/433 MHz. Default is 189 ms.
Bit Length This is the bit length to transmit via 315/433 MHz. Default is 24-bit.
Execute as User Select which user executes Linux Commands.
On Command This is the command used to turn the output on. For wireless relays, this is the numerical command to be transmitted, and for command outputs this is the command to be executed. Commands may be for the linux terminal or Python 3 (depending on which output type selected).
Off Command This is the command used to turn the output off. For wireless relays, this is the numerical command to be transmitted, and for command outputs this is the command to be executed. Commands may be for the linux terminal or Python 3 (depending on which output type selected).
Force Command If an Output is already on, enabling this option will allow the On command to be executed rather than returning "Output is already On".
PWM Command This is the command used to set the duty cycle. The string "((duty_cycle))" in the command will be replaced with the actual duty cycle before the command is executed. Ensure "((duty_cycle))" is included in your command for this feature to work correctly. Commands may be for the linux terminal or Python 3 (depending on which output type selected).
Current Draw (amps) The is the amount of current the device powered by the output draws. Note: this value should be calculated based on the voltage set in the Energy Usage Settings.
Startup State This specifies whether the output should be ON or OFF when mycodo initially starts. Some outputs have an additional options.
Startup Value If the Startup State is set to User Set Value (such as for PWM Outputs), then this value will be set when Mycodo starts up.
Shutdown State This specifies whether the output should be ON or OFF when mycodo initially shuts down. Some outputs have an additional options.
Shutdown Value If the Shutdown State is set to User Set Value (such as for PWM Outputs), then this value will be set when Mycodo shuts down.
Trigger at Startup Select to enable triggering Functions (such as Output Triggers) when Mycodo starts and if Start State is set to ON.
Seconds to turn On This is a way to turn a output on for a specific duration of time. This can be useful for testing the outputs and powered devices or the measured effects a device may have on an environmental condition.

On/Off (GPIO)~

The On/Off (GPIO) output merely turns a GPIO pin High (3.3 volts) or Low (0 volts). This is useful for controlling things like electromechanical switches, such as relays, to turn electrical devices on and off.

Relays are electromechanical or solid-state devices that enable a small voltage signal (such as from a microprocessor) to activate a much larger voltage, without exposing the low-voltage system to the dangers of the higher voltage.

Add and configure outputs in the Output tab. Outputs must be properly set up before they can be used in the rest of the system.

To set up a wired relay, set the "GPIO Pin" (using BCM numbering) to the pin you would like to switch High (5 volts) and Low (0 volts), which can be used to activate relays and other devices. On Trigger should be set to the signal state (High or Low) that induces the device to turn on. For example, if your relay activates when the potential across the coil is 0-volts, set On Trigger to "Low", otherwise if your relay activates when the potential across the coil is 5 volts, set it to "High".

Pulse-Width Modulation (PWM)~

Pulse-width modulation (PWM) is a modulation technique used to encode a message into a pulsing signal, at a specific frequency in Hertz (Hz). The average value of voltage (and current) fed to the load is controlled by turning the switch between supply and load on and off at a fast rate. The longer the switch is on compared to the off periods, the higher the total power supplied to the load.

The PWM switching frequency has to be much higher than what would affect the load (the device that uses the power), which is to say that the resultant waveform perceived by the load must be as smooth as possible. The rate (or frequency) at which the power supply must switch can vary greatly depending on load and application, for example

Quote

Switching has to be done several times a minute in an electric stove; 120 Hz in a lamp dimmer; between a few kilohertz (kHz) to tens of kHz for a motor drive; and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies.

The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, with 0% being always off, 50% being off for half of the time and on for half of the time, and 100% being always on.

Pulse-Width Modulation (PWM) Options~

Setting Description
Library Select the method for producing the PWM signal. Hardware pins can produce up to a 30 MHz PWM signal, while any other (non-hardware PWM) pin can produce up to a 40 kHz PWM signal. See the table, below, for the hardware pins on various Pi boards.
Pin (GPIO) This is the GPIO pin that will output the PWM signal, using BCM numbering.
Frequency (Hertz) This is frequency of the PWM signal.
Invert Signal Send an inverted duty cycle to the output controller.
Duty Cycle This is the proportion of the time on to the time off, expressed in percent (0 -100).

Non-hardware PWM Pins~

When using non-hardware PWM pins, there are only certain frequencies that can be used. These frequencies in Hertz are 40000, 20000, 10000, 8000, 5000, 4000, 2500, 2000, 1600, 1250, 1000, 800, 500, 400, 250, 200, 100, and 50 Hz. If you attempt to set a frequency that is not listed here, the nearest frequency from this list will be used.

Hardware PWM Pins~

The exact frequency may be set when using hardware PWM pins. The same PWM channel is available on multiple GPIO. The latest frequency and duty cycle setting will be used by all GPIO pins which share a PWM channel.

BCM Pin PWM Channel Raspberry Pi Version
12 0 All models except A and B
13 1 All models except A and B
18 0 All models
19 1 All models except A and B
40 0 Compute module only
41 1 Compute module only
45 1 Compute module only
52 0 Compute module only
53 1 Compute module only

Schematics for DC Fan Control~

Below are hardware schematics that enable controlling direct current (DC) fans from the PWM output from Mycodo.

PWM output controlling a 12-volt DC fan (such as a PC fan)

Schematic: PWM output modulating alternating current (AC) at 1% duty cycle (1of2)

Schematics for AC Modulation~

Below are hardware schematics that enable the modulation of alternating current (AC) from the PWM output from Mycodo.

PWM output modulating alternating current (AC) at 1% duty cycle

Schematic: PWM output modulating alternating current (AC) at 1% duty cycle (2of2)

PWM output modulating alternating current (AC) at 50% duty cycle

Schematic: PWM output modulating alternating current (AC) at 50% duty cycle

PWM output modulating alternating current (AC) at 99% duty cycle

Schematic: PWM output modulating alternating current (AC) at 99% duty cycle

Peristaltic Pump~

There are two peristaltic pump Output modules that Mycodo supports, a generic peristaltic pump Output, and the Atlas Scientific EZO-PMP peristaltic pump.

Generic Peristaltic Pump~

Any peristaltic pump can be used with the Generic Peristaltic Pump Output to dispense liquids. The most basic dispensing abilities are to start dispensing, stop dispensing, or dispense for a duration of time. If the pump rate has been measured, this value can be entered into the Fastest Rate (ml/min) setting and the Output controller will then be able to dispense specific volumes rather than merely for durations of time. In oder to dispense specific volumes, the Output Mode will also need to be set in addition to the Desired Flow Rate (ml/min), if the Output Mode has been set to Specify Flow Rate.

To determine your pump's flow rate, first purge all air from your pump's hose. Next, instruct the pump to dispense for 60 seconds and collect the liquid it dispenses. Once finished, measure the amount of liquid and enter this value, in milliliters into the Fastest Rate (ml/min) setting. Once your pump's flow rate is set, you can now start dispensing specific volumes rather than durations.

This Output module relies on switching a GPIO pin High and Low to switch the peristaltic pump on and off. This is most easily accomplished with the use of a relay in-line with your pump's power supply or using the GPIO as an input signal directly to the pump (if supported). When using a relay, it's important to develop your circuit to provide the fastest possible switching of the pump. Since the volume dispensed by the pump is dependent on time, the faster the pump switching can occur, the more accurate the dispensing will be. Many peristaltic pumps operate on DC voltage and require an AC-DC converter. These converters can take a significant amount of time to energize once power is applied as well as de-energize once power is removed, causing significant delays that can impact dispensing accuracy. To alleviate this issue, the DC power should be switched, rather than the AC power, which will remove this potential delay.

Atlas Scientific Peristaltic Pump~

The Atlas Scientific peristaltic pump is a peristaltic pump and microcontroller combined that allows it to be communicated with via I2C or Serial and can accurately dispense specific volumes of fluid. There are several commands the pump can accept, including commands to calibrate, turn on, turn off, and dispense at a specific rate, among others. Atlas Scientific peristaltic pumps are good options, but are more expensive than generic peristaltic pumps.

Peristaltic Pump Options~

Setting Description
Output Mode "Fastest low Rate" will pump liquid at the fastest rate the pump can perform. "Specify Flow Rate" will pump liquid at the rate set by the "Flow Rate (ml/min)" option.
Flow Rate (ml/min) This is how fast liquid will be pumped if the "Specify Flow Rate" option is selected for the Output Mode option.
Fastest Rate (ml/min) This is the rate at which the pump dispenses liquid, in ml/min.
Minimum On (sec/min) This is the minimum duration (seconds) the pump should be turned on for every 60 second period of pumping. This option is only used when Specify Flow Rate is selected as the output Mode.

Wireless 315/433 MHz~

Certain 315/433 MHz wireless relays may be used, however you will need to set the pin of the transmitter (using BCM numbering), pulse length, bit length, protocol, on command, and off command. To determine your On and Off commands, connect a 315/433 MHz receiver to your Pi, then run the receiver script, below, replacing 17 with the pin your receiver is connected to (using BCM numbering), and press one of the buttons on your remote (either on or off) to detect the numeric code associated with that button.

sudo /opt/Mycodo/env/bin/python /opt/Mycodo/mycodo/devices/wireless_rpi_rf.py -d 2 -g 17
+

433 MHz wireless relays have been successfully tested with SMAKN 433MHz RF Transmitters/Receivers and Etekcity Wireless Remote Control Electrical Outlets (see Issue 88 for more information). If you have a 315/433 MHz transmitter/receiver and a wireless relay that does not work with the current code, submit a new issue with details of your hardware.

Linux Command~

Another option for output control is to execute a terminal command when the output is turned on, off, or a duty cycle is set. Commands will be executed as the user 'root'. When a Linux Command output is created, example code is provided to demonstrate how to use the output.

Python Command~

The Python Command output operates similarly to the Linux Command output, however Python 3 code is being executed. When a Python Command output is created, example code is provided to demonstrate how to use the output.

Output Notes~

Wireless and Command (Linux/Python) Outputs: Since the wireless protocol only allows 1-way communication to 315/433 MHz devices, wireless relays are assumed to be off until they are turned on, and therefore will appear red (off) when added. If a wireless relay is turned off or on outside Mycodo (by a remote, for instance), Mycodo will *not* be able to determine the state of the relay and will indicate whichever state the relay was last. This is, if Mycodo turns the wireless relay on, and a remote is used to turn the relay off, Mycodo will still assume the relay is on.

\ No newline at end of file diff --git a/Python-Code/index.html b/Python-Code/index.html index c434d9b44..f878aed1d 100644 --- a/Python-Code/index.html +++ b/Python-Code/index.html @@ -1,4 +1,4 @@ - Python Code - Mycodo
Skip to content

Python Code

There are numerous places where Python 3 code can be used within Mycodo, including the Python Code Input, the Python Code Output, and Conditional Function.

Here are a few example that demonstrates some useful ways to interact with Mycodo with Python 3 code.

In all the Mycodo environments where your code will be executed, the DaemonControl() Class of mycodo/mycodo_client.py is available to communicate with the daemon using the object "control".

Outputs~

PWM Fan with a Minimum Duty Cycle to Spin~

Some PWM-controlled fans do not start spinning until a minimum duty cycle is set. Once the fan is spinning, the duty cycle can be set much lower and the fan will continue to spin. Because of this, there needs to be a "charging" step if the fan is turning on from a duty cycle of 0. This code detects if the requested duty cycle will need to execute the charging step prior to setting the duty cycle. For this, you will need A GPIO PWM Output and a Python Code PWM Output. The GPIO PWM Output will be configured for the fan, and the Python Code PWM Output will be configured with the following code:

import time
+ Python Code - Mycodo      

Python Code

There are numerous places where Python 3 code can be used within Mycodo, including the Python Code Input, the Python Code Output, and Conditional Function.

Here are a few example that demonstrates some useful ways to interact with Mycodo with Python 3 code.

In all the Mycodo environments where your code will be executed, the DaemonControl() Class of mycodo/mycodo_client.py is available to communicate with the daemon using the object "control".

Outputs~

PWM Fan with a Minimum Duty Cycle to Spin~

Some PWM-controlled fans do not start spinning until a minimum duty cycle is set. Once the fan is spinning, the duty cycle can be set much lower and the fan will continue to spin. Because of this, there needs to be a "charging" step if the fan is turning on from a duty cycle of 0. This code detects if the requested duty cycle will need to execute the charging step prior to setting the duty cycle. For this, you will need A GPIO PWM Output and a Python Code PWM Output. The GPIO PWM Output will be configured for the fan, and the Python Code PWM Output will be configured with the following code:

import time
 
 # Set the variables the first time the code is executed
 if not hasattr(self, "output_id_gpio_pwm"):
@@ -32,4 +32,4 @@
                   output_type='pwm',
                   amount=duty_cycle,
                   output_channel=0)
-
\ No newline at end of file +
\ No newline at end of file diff --git a/Supported-Actions/index.html b/Supported-Actions/index.html index bc250da2d..bf296f849 100644 --- a/Supported-Actions/index.html +++ b/Supported-Actions/index.html @@ -1 +1 @@ - Supported Actions - Mycodo
Skip to content

Supported Actions

Built-In Actions (System)~

Actions: Pause~

  • Manufacturer: Mycodo
  • Works with: Functions

Set a delay between executing Actions when self.run_all_actions() is used.

Usage: Executing self.run_action("ACTION_ID") will create a pause for the set duration. When self.run_all_actions() is executed, this will add a pause in the sequential execution of all actions.

Options~

Duration (seconds)~
  • Type: Decimal
  • Description: The duration to pause

Camera: Capture Photo~

  • Manufacturer: Mycodo
  • Works with: Functions

Capture a photo with the selected Camera.

Usage: Executing self.run_action("ACTION_ID") will capture a photo with the selected Camera. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will capture a photo with the Camera with the specified ID.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to take a photo

Camera: Time-lapse: Pause~

  • Manufacturer: Mycodo
  • Works with: Functions

Pause a camera time-lapse

Usage: Executing self.run_action("ACTION_ID") will pause the selected Camera time-lapse. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will pause the Camera time-lapse with the specified ID.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to pause the time-lapse

Camera: Time-lapse: Resume~

  • Manufacturer: Mycodo
  • Works with: Functions

Resume a camera time-lapse

Usage: Executing self.run_action("ACTION_ID") will resume the selected Camera time-lapse. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will resume the Camera time-lapse with the specified ID.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to resume the time-lapse

Controller: Activate~

  • Manufacturer: Mycodo
  • Works with: Functions

Activate a controller.

Usage: Executing self.run_action("ACTION_ID") will activate the selected Controller. Executing self.run_action("ACTION_ID", value={"controller_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will activate the controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the controller to activate

Controller: Deactivate~

  • Manufacturer: Mycodo
  • Works with: Functions

Deactivate a controller.

Usage: Executing self.run_action("ACTION_ID") will deactivate the selected Controller. Executing self.run_action("ACTION_ID", value={"controller_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will deactivate the controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the controller to deactivate

Create: Note~

  • Manufacturer: Mycodo
  • Works with: Functions

Create a note with the selected Tag.

Usage: Executing self.run_action("ACTION_ID") will create a note with the selected tag and note. Executing self.run_action("ACTION_ID", value={"tags": ["tag1", "tag2"], "name": "My Note", "note": "this is a message"}) will execute the action with the specified list of tag(s) and note. If using only one tag, make it the only element of the list (e.g. ["tag1"]). If note is not specified, then the action message will be used as the note.

Options~

Tags~
  • Description: Select one or more tags
Name~
  • Type: Text
  • Default Value: Name
  • Description: The name of the note
Note~
  • Type: Text
  • Default Value: Note
  • Description: The body of the note

Execute Command: Shell~

  • Manufacturer: Mycodo
  • Works with: Functions

Execute a Linux bash shell command.

Usage: Executing self.run_action("ACTION_ID") will execute the bash command.Executing self.run_action("ACTION_ID", value={"user": "mycodo", "command": "/home/pi/my_script.sh on"}) will execute the action with the specified command and user.

Options~

User~
  • Type: Text
  • Default Value: mycodo
  • Description: The user to execute the command
Command~
  • Type: Text
  • Default Value: /home/pi/my_script.sh on
  • Description: Command to execute

Flow Meter: Clear Total Volume~

  • Manufacturer: Mycodo
  • Works with: Functions

Clear the total volume saved for a flow meter Input. The Input must have the Clear Total Volume option.

Usage: Executing self.run_action("ACTION_ID") will clear the total volume for the selected flow meter Input. Executing self.run_action("ACTION_ID", value={"input_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will clear the total volume for the flow meter Input with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the flow meter Input

Input: Force Measurements~

  • Manufacturer: Mycodo
  • Works with: Functions

Force measurements to be conducted for an input

Usage: Executing self.run_action("ACTION_ID") will force acquiring measurements for the selected Input. Executing self.run_action("ACTION_ID", value={"input_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will force acquiring measurements for the Input with the specified ID.

Options~

Input~
  • Type: Select Device
  • Description: Select an Input

MQTT: Publish~

  • Manufacturer: Mycodo
  • Works with: Functions
  • Dependencies: paho-mqtt

Publish to an MQTT server.

Usage: Executing self.run_action("ACTION_ID") will publish the saved payload text options to the MQTT server. Executing self.run_action("ACTION_ID", value={"payload": 42}) will publish the specified payload (any type) to the MQTT server. You can also specify the topic (e.g. value={"topic": "my_topic", "payload": 42}). Warning: If using multiple MQTT Inputs or Functions, ensure the Client IDs are unique.

Options~

Hostname~
  • Type: Text
  • Default Value: localhost
  • Description: The hostname of the MQTT server
Port~
  • Type: Integer
  • Default Value: 1883
  • Description: The port of the MQTT server
Topic~
  • Type: Text
  • Default Value: paho/test/single
  • Description: The topic to publish with
Payload~
  • Type: Text
  • Description: The payload to publish
Keep Alive~
  • Type: Integer
  • Default Value: 60
  • Description: The keepalive timeout value for the client. Set to 0 to disable.
Client ID~
  • Type: Text
  • Default Value: client_796v1NR4
  • Description: Unique client ID for connecting to the MQTT server
Use Login~
  • Type: Boolean
  • Description: Send login credentials
Username~
  • Type: Text
  • Default Value: user
  • Description: Username for connecting to the server
Password~
  • Type: Text
  • Description: Password for connecting to the server

MQTT: Publish: Measurement~

  • Manufacturer: Mycodo
  • Works with: Inputs
  • Dependencies: paho-mqtt

Publish an Input measurement to an MQTT server.

Options~

Measurement~
  • Description: Select the measurement to send as the payload
Hostname~
  • Type: Text
  • Default Value: localhost
  • Description: The hostname of the MQTT server
Port~
  • Type: Integer
  • Default Value: 1883
  • Description: The port of the MQTT server
Topic~
  • Type: Text
  • Default Value: paho/test/single
  • Description: The topic to publish with
Keep Alive~
  • Type: Integer
  • Default Value: 60
  • Description: The keepalive timeout value for the client. Set to 0 to disable.
Client ID~
  • Type: Text
  • Default Value: client_YeURfmKy
  • Description: Unique client ID for connecting to the MQTT server
Use Login~
  • Type: Boolean
  • Description: Send login credentials
Username~
  • Type: Text
  • Default Value: user
  • Description: Username for connecting to the server
Password~
  • Type: Text
  • Description: Password for connecting to the server.

Output: Duty Cycle~

  • Manufacturer: Mycodo
  • Works with: Functions

Set a PWM Output to set a duty cycle.

Usage: Executing self.run_action("ACTION_ID") will set the PWM output duty cycle. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "duty_cycle": 42}) will set the duty cycle of the PWM output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Duty Cycle~
  • Type: Decimal
  • Description: Duty cycle for the PWM (percent, 0.0 - 100.0)

Output: On/Off/Duration~

  • Manufacturer: Mycodo
  • Works with: Functions

Turn an On/Off Output On, Off, or On for a duration.

Usage: Executing self.run_action("ACTION_ID") will actuate an output. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "state": "on", "duration": 300}) will set the state of the output with the specified ID and channel. If state is on and a duration is set, the output will turn off after the duration.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
State~
  • Type: Select
  • Description: Turn the output on or off
Duration (seconds)~
  • Type: Decimal
  • Description: If On, you can set a duration to turn the output on. 0 stays on.

Output: Ramp Duty Cycle~

  • Manufacturer: Mycodo
  • Works with: Functions

Ramp a PWM Output from one duty cycle to another duty cycle over a period of time.

Usage: Executing self.run_action("ACTION_ID") will ramp the PWM output duty cycle according to the settings. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "start": 42, "end": 62, "increment": 1.0, "duration": 600}) will ramp the duty cycle of the PWM output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Duty Cycle: Start~
  • Type: Decimal
  • Description: Duty cycle for the PWM (percent, 0.0 - 100.0)
Duty Cycle: End~
  • Type: Decimal
  • Default Value: 50.0
  • Description: Duty cycle for the PWM (percent, 0.0 - 100.0)
Increment (Duty Cycle)~
  • Type: Decimal
  • Default Value: 1.0
  • Description: How much to change the duty cycle every Duration
Duration (seconds)~
  • Type: Decimal
  • Description: How long to ramp from start to finish.

Output: Value~

  • Manufacturer: Mycodo
  • Works with: Functions

Send a value to the Output.

Usage: Executing self.run_action("ACTION_ID") will actuate a value output. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "value": 42}) will send a value to the output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Value~
  • Type: Decimal
  • Description: The value to send to the output

Output: Volume~

  • Manufacturer: Mycodo
  • Works with: Functions

Instruct the Output to dispense a volume.

Usage: Executing self.run_action("ACTION_ID") will actuate a volume output. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "volume": 42}) will send a volume to the output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Volume~
  • Type: Decimal
  • Description: The volume to send to the output

PID: Lower: Setpoint~

  • Manufacturer: Mycodo
  • Works with: Functions

Lower the Setpoint of a PID.

Usage: Executing self.run_action("ACTION_ID") will lower the setpoint of the selected PID Controller. Executing self.run_action("ACTION_ID", value={"pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "amount": 2}) will lower the setpoint of the PID with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to lower the setpoint of
Lower Setpoint~
  • Type: Decimal
  • Description: The amount to lower the PID setpoint by

PID: Pause~

  • Manufacturer: Mycodo
  • Works with: Functions

Pause a PID.

Usage: Executing self.run_action("ACTION_ID") will pause the selected PID Controller. Executing self.run_action("ACTION_ID", value="959019d1-c1fa-41fe-a554-7be3366a9c5b") will pause the PID Controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to pause

PID: Raise: Setpoint~

  • Manufacturer: Mycodo
  • Works with: Functions

Raise the Setpoint of a PID.

Usage: Executing self.run_action("ACTION_ID") will raise the setpoint of the selected PID Controller. Executing self.run_action("ACTION_ID", value={"pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "amount": 2}) will raise the setpoint of the PID with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to raise the setpoint of
Raise Setpoint~
  • Type: Decimal
  • Description: The amount to raise the PID setpoint by

PID: Resume~

  • Manufacturer: Mycodo
  • Works with: Functions

Resume a PID.

Usage: Executing self.run_action("ACTION_ID") will resume the selected PID Controller. Executing self.run_action("ACTION_ID", value="959019d1-c1fa-41fe-a554-7be3366a9c5b") will resume the PID Controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to resume

PID: Set Method~

  • Manufacturer: Mycodo
  • Works with: Functions

Select a method to set the PID to use.

Usage: Executing self.run_action("ACTION_ID") will pause the selected PID Controller. Executing self.run_action("ACTION_ID", value={"pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "method_id": "fe8b8f41-131b-448d-ba7b-00a044d24075"}) will set a method for the PID Controller with the specified IDs.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to apply the method
Method~
  • Type: Select Device
  • Description: Select the Method to apply to the PID

PID: Set: Setpoint~

  • Manufacturer: Mycodo
  • Works with: Functions

Set the Setpoint of a PID.

Usage: Executing self.run_action("ACTION_ID") will set the setpoint of the selected PID Controller. Executing self.run_action("ACTION_ID", value={"setpoint": 42}) will set the setpoint of the PID Controller (e.g. 42). You can also specify the PID ID (e.g. value={"setpoint": 42, "pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"})

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to pause
Setpoint~
  • Type: Decimal
  • Description: The setpoint to set the PID Controller

Send Email~

  • Manufacturer: Mycodo
  • Works with: Functions

Send an email.

Usage: Executing self.run_action("ACTION_ID") will email the specified recipient(s) using the SMTP credentials in the system configuration. Separate multiple recipients with commas. The body of the email will be the self-generated message. Executing self.run_action("ACTION_ID", value={"email_address": ["email1@email.com", "email2@email.com"], "message": "My message"}) will send an email to the specified recipient(s) with the specified message.

Options~

E-Mail Address~
  • Type: Text
  • Default Value: email@domain.com
  • Description: E-mail recipient(s) (separate multiple addresses with commas)

Send Email with Photo~

  • Manufacturer: Mycodo
  • Works with: Functions

Take a photo and send an email with it attached.

Usage: Executing self.run_action("ACTION_ID") will take a photo and email it to the specified recipient(s) using the SMTP credentials in the system configuration. Separate multiple recipients with commas. The body of the email will be the self-generated message. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "email_address": ["email1@email.com", "email2@email.com"], "message": "My message"}) will capture a photo using the camera with the specified ID and send an email to the specified email(s) with message and attached photo.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to take a photo with
E-Mail Address~
  • Type: Text
  • Default Value: email@domain.com
  • Description: E-mail recipient(s). Separate multiple with commas.

System: Restart~

  • Manufacturer: Mycodo
  • Works with: Functions

Restart the System

Usage: Executing self.run_action("ACTION_ID") will restart the system in 10 seconds.

System: Shutdown~

  • Manufacturer: Mycodo
  • Works with: Functions

Shutdown the System

Usage: Executing self.run_action("ACTION_ID") will shut down the system in 10 seconds.

Webhook~

  • Manufacturer: Mycodo
  • Works with: Functions

Emits a HTTP request when triggered. The first line contains a HTTP verb (GET, POST, PUT, ...) followed by a space and the URL to call. Subsequent lines are optional "name: value"-header parameters. After a blank line, the body payload to be sent follows. {{{message}}} is a placeholder that gets replaced by the message, {{{quoted_message}}} is the message in an URL safe encoding.

Usage: Executing self.run_action("ACTION_ID") will run the Action.

Options~

Webhook Request~
  • Description: HTTP request to execute

Built-In Actions (Devices)~

Display: Backlight: Color~

  • Manufacturer: Display
  • Works with: Functions

Set the display backlight color

Usage: Executing self.run_action("ACTION_ID") will change the backlight color on the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "color": "255,0,0"}) will change the backlight color on the controller with the specified ID and color.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to set the backlight color
Color (RGB)~
  • Type: Text
  • Default Value: 255,0,0
  • Description: Color as R,G,B values (e.g. "255,0,0" without quotes)

Display: Backlight: Off~

  • Manufacturer: Display
  • Works with: Functions

Turn display backlight off

Usage: Executing self.run_action("ACTION_ID") will turn the backlight off for the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will turn the backlight off for the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to turn the backlight off

Display: Backlight: On~

  • Manufacturer: Display
  • Works with: Functions

Turn display backlight on

Usage: Executing self.run_action("ACTION_ID") will turn the backlight on for the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will turn the backlight on for the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to turn the backlight on

Display: Flashing: Off~

  • Manufacturer: Display
  • Works with: Functions

Turn display flashing off

Usage: Executing self.run_action("ACTION_ID") will stop the backlight flashing on the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will stop the backlight flashing on the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to stop flashing the backlight

Display: Flashing: On~

  • Manufacturer: Display
  • Works with: Functions

Turn display flashing on

Usage: Executing self.run_action("ACTION_ID") will start the backlight flashing on the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will start the backlight flashing on the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to start flashing the backlight
\ No newline at end of file + Supported Actions - Mycodo
Skip to content

Supported Actions

Built-In Actions (System)~

Actions: Pause~

  • Manufacturer: Mycodo
  • Works with: Functions

Set a delay between executing Actions when self.run_all_actions() is used.

Usage: Executing self.run_action("ACTION_ID") will create a pause for the set duration. When self.run_all_actions() is executed, this will add a pause in the sequential execution of all actions.

Options~

Duration (seconds)~
  • Type: Decimal
  • Description: The duration to pause

Camera: Capture Photo~

  • Manufacturer: Mycodo
  • Works with: Functions

Capture a photo with the selected Camera.

Usage: Executing self.run_action("ACTION_ID") will capture a photo with the selected Camera. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will capture a photo with the Camera with the specified ID.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to take a photo

Camera: Time-lapse: Pause~

  • Manufacturer: Mycodo
  • Works with: Functions

Pause a camera time-lapse

Usage: Executing self.run_action("ACTION_ID") will pause the selected Camera time-lapse. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will pause the Camera time-lapse with the specified ID.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to pause the time-lapse

Camera: Time-lapse: Resume~

  • Manufacturer: Mycodo
  • Works with: Functions

Resume a camera time-lapse

Usage: Executing self.run_action("ACTION_ID") will resume the selected Camera time-lapse. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will resume the Camera time-lapse with the specified ID.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to resume the time-lapse

Controller: Activate~

  • Manufacturer: Mycodo
  • Works with: Functions

Activate a controller.

Usage: Executing self.run_action("ACTION_ID") will activate the selected Controller. Executing self.run_action("ACTION_ID", value={"controller_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will activate the controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the controller to activate

Controller: Deactivate~

  • Manufacturer: Mycodo
  • Works with: Functions

Deactivate a controller.

Usage: Executing self.run_action("ACTION_ID") will deactivate the selected Controller. Executing self.run_action("ACTION_ID", value={"controller_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will deactivate the controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the controller to deactivate

Create: Note~

  • Manufacturer: Mycodo
  • Works with: Functions

Create a note with the selected Tag.

Usage: Executing self.run_action("ACTION_ID") will create a note with the selected tag and note. Executing self.run_action("ACTION_ID", value={"tags": ["tag1", "tag2"], "name": "My Note", "note": "this is a message"}) will execute the action with the specified list of tag(s) and note. If using only one tag, make it the only element of the list (e.g. ["tag1"]). If note is not specified, then the action message will be used as the note.

Options~

Tags~
  • Description: Select one or more tags
Name~
  • Type: Text
  • Default Value: Name
  • Description: The name of the note
Note~
  • Type: Text
  • Default Value: Note
  • Description: The body of the note

Execute Command: Shell~

  • Manufacturer: Mycodo
  • Works with: Functions

Execute a Linux bash shell command.

Usage: Executing self.run_action("ACTION_ID") will execute the bash command.Executing self.run_action("ACTION_ID", value={"user": "mycodo", "command": "/home/pi/my_script.sh on"}) will execute the action with the specified command and user.

Options~

User~
  • Type: Text
  • Default Value: mycodo
  • Description: The user to execute the command
Command~
  • Type: Text
  • Default Value: /home/pi/my_script.sh on
  • Description: Command to execute

Flow Meter: Clear Total Volume~

  • Manufacturer: Mycodo
  • Works with: Functions

Clear the total volume saved for a flow meter Input. The Input must have the Clear Total Volume option.

Usage: Executing self.run_action("ACTION_ID") will clear the total volume for the selected flow meter Input. Executing self.run_action("ACTION_ID", value={"input_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will clear the total volume for the flow meter Input with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the flow meter Input

Input: Force Measurements~

  • Manufacturer: Mycodo
  • Works with: Functions

Force measurements to be conducted for an input

Usage: Executing self.run_action("ACTION_ID") will force acquiring measurements for the selected Input. Executing self.run_action("ACTION_ID", value={"input_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will force acquiring measurements for the Input with the specified ID.

Options~

Input~
  • Type: Select Device
  • Description: Select an Input

MQTT: Publish~

  • Manufacturer: Mycodo
  • Works with: Functions
  • Dependencies: paho-mqtt

Publish to an MQTT server.

Usage: Executing self.run_action("ACTION_ID") will publish the saved payload text options to the MQTT server. Executing self.run_action("ACTION_ID", value={"payload": 42}) will publish the specified payload (any type) to the MQTT server. You can also specify the topic (e.g. value={"topic": "my_topic", "payload": 42}). Warning: If using multiple MQTT Inputs or Functions, ensure the Client IDs are unique.

Options~

Hostname~
  • Type: Text
  • Default Value: localhost
  • Description: The hostname of the MQTT server
Port~
  • Type: Integer
  • Default Value: 1883
  • Description: The port of the MQTT server
Topic~
  • Type: Text
  • Default Value: paho/test/single
  • Description: The topic to publish with
Payload~
  • Type: Text
  • Description: The payload to publish
Keep Alive~
  • Type: Integer
  • Default Value: 60
  • Description: The keepalive timeout value for the client. Set to 0 to disable.
Client ID~
  • Type: Text
  • Default Value: client_796v1NR4
  • Description: Unique client ID for connecting to the MQTT server
Use Login~
  • Type: Boolean
  • Description: Send login credentials
Username~
  • Type: Text
  • Default Value: user
  • Description: Username for connecting to the server
Password~
  • Type: Text
  • Description: Password for connecting to the server

MQTT: Publish: Measurement~

  • Manufacturer: Mycodo
  • Works with: Inputs
  • Dependencies: paho-mqtt

Publish an Input measurement to an MQTT server.

Options~

Measurement~
  • Description: Select the measurement to send as the payload
Hostname~
  • Type: Text
  • Default Value: localhost
  • Description: The hostname of the MQTT server
Port~
  • Type: Integer
  • Default Value: 1883
  • Description: The port of the MQTT server
Topic~
  • Type: Text
  • Default Value: paho/test/single
  • Description: The topic to publish with
Keep Alive~
  • Type: Integer
  • Default Value: 60
  • Description: The keepalive timeout value for the client. Set to 0 to disable.
Client ID~
  • Type: Text
  • Default Value: client_YeURfmKy
  • Description: Unique client ID for connecting to the MQTT server
Use Login~
  • Type: Boolean
  • Description: Send login credentials
Username~
  • Type: Text
  • Default Value: user
  • Description: Username for connecting to the server
Password~
  • Type: Text
  • Description: Password for connecting to the server.

Output: Duty Cycle~

  • Manufacturer: Mycodo
  • Works with: Functions

Set a PWM Output to set a duty cycle.

Usage: Executing self.run_action("ACTION_ID") will set the PWM output duty cycle. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "duty_cycle": 42}) will set the duty cycle of the PWM output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Duty Cycle~
  • Type: Decimal
  • Description: Duty cycle for the PWM (percent, 0.0 - 100.0)

Output: On/Off/Duration~

  • Manufacturer: Mycodo
  • Works with: Functions

Turn an On/Off Output On, Off, or On for a duration.

Usage: Executing self.run_action("ACTION_ID") will actuate an output. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "state": "on", "duration": 300}) will set the state of the output with the specified ID and channel. If state is on and a duration is set, the output will turn off after the duration.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
State~
  • Type: Select
  • Description: Turn the output on or off
Duration (seconds)~
  • Type: Decimal
  • Description: If On, you can set a duration to turn the output on. 0 stays on.

Output: Ramp Duty Cycle~

  • Manufacturer: Mycodo
  • Works with: Functions

Ramp a PWM Output from one duty cycle to another duty cycle over a period of time.

Usage: Executing self.run_action("ACTION_ID") will ramp the PWM output duty cycle according to the settings. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "start": 42, "end": 62, "increment": 1.0, "duration": 600}) will ramp the duty cycle of the PWM output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Duty Cycle: Start~
  • Type: Decimal
  • Description: Duty cycle for the PWM (percent, 0.0 - 100.0)
Duty Cycle: End~
  • Type: Decimal
  • Default Value: 50.0
  • Description: Duty cycle for the PWM (percent, 0.0 - 100.0)
Increment (Duty Cycle)~
  • Type: Decimal
  • Default Value: 1.0
  • Description: How much to change the duty cycle every Duration
Duration (seconds)~
  • Type: Decimal
  • Description: How long to ramp from start to finish.

Output: Value~

  • Manufacturer: Mycodo
  • Works with: Functions

Send a value to the Output.

Usage: Executing self.run_action("ACTION_ID") will actuate a value output. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "value": 42}) will send a value to the output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Value~
  • Type: Decimal
  • Description: The value to send to the output

Output: Volume~

  • Manufacturer: Mycodo
  • Works with: Functions

Instruct the Output to dispense a volume.

Usage: Executing self.run_action("ACTION_ID") will actuate a volume output. Executing self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "channel": 0, "volume": 42}) will send a volume to the output with the specified ID and channel.

Options~

Output~
  • Type: Select Channel
  • Selections: Output_Channels
  • Description: Select an output to control
Volume~
  • Type: Decimal
  • Description: The volume to send to the output

PID: Lower: Setpoint~

  • Manufacturer: Mycodo
  • Works with: Functions

Lower the Setpoint of a PID.

Usage: Executing self.run_action("ACTION_ID") will lower the setpoint of the selected PID Controller. Executing self.run_action("ACTION_ID", value={"pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "amount": 2}) will lower the setpoint of the PID with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to lower the setpoint of
Lower Setpoint~
  • Type: Decimal
  • Description: The amount to lower the PID setpoint by

PID: Pause~

  • Manufacturer: Mycodo
  • Works with: Functions

Pause a PID.

Usage: Executing self.run_action("ACTION_ID") will pause the selected PID Controller. Executing self.run_action("ACTION_ID", value="959019d1-c1fa-41fe-a554-7be3366a9c5b") will pause the PID Controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to pause

PID: Raise: Setpoint~

  • Manufacturer: Mycodo
  • Works with: Functions

Raise the Setpoint of a PID.

Usage: Executing self.run_action("ACTION_ID") will raise the setpoint of the selected PID Controller. Executing self.run_action("ACTION_ID", value={"pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "amount": 2}) will raise the setpoint of the PID with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to raise the setpoint of
Raise Setpoint~
  • Type: Decimal
  • Description: The amount to raise the PID setpoint by

PID: Resume~

  • Manufacturer: Mycodo
  • Works with: Functions

Resume a PID.

Usage: Executing self.run_action("ACTION_ID") will resume the selected PID Controller. Executing self.run_action("ACTION_ID", value="959019d1-c1fa-41fe-a554-7be3366a9c5b") will resume the PID Controller with the specified ID.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to resume

PID: Set Method~

  • Manufacturer: Mycodo
  • Works with: Functions

Select a method to set the PID to use.

Usage: Executing self.run_action("ACTION_ID") will pause the selected PID Controller. Executing self.run_action("ACTION_ID", value={"pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "method_id": "fe8b8f41-131b-448d-ba7b-00a044d24075"}) will set a method for the PID Controller with the specified IDs.

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to apply the method
Method~
  • Type: Select Device
  • Description: Select the Method to apply to the PID

PID: Set: Setpoint~

  • Manufacturer: Mycodo
  • Works with: Functions

Set the Setpoint of a PID.

Usage: Executing self.run_action("ACTION_ID") will set the setpoint of the selected PID Controller. Executing self.run_action("ACTION_ID", value={"setpoint": 42}) will set the setpoint of the PID Controller (e.g. 42). You can also specify the PID ID (e.g. value={"setpoint": 42, "pid_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"})

Options~

Controller~
  • Type: Select Device
  • Description: Select the PID Controller to pause
Setpoint~
  • Type: Decimal
  • Description: The setpoint to set the PID Controller

Send Email~

  • Manufacturer: Mycodo
  • Works with: Functions

Send an email.

Usage: Executing self.run_action("ACTION_ID") will email the specified recipient(s) using the SMTP credentials in the system configuration. Separate multiple recipients with commas. The body of the email will be the self-generated message. Executing self.run_action("ACTION_ID", value={"email_address": ["email1@email.com", "email2@email.com"], "message": "My message"}) will send an email to the specified recipient(s) with the specified message.

Options~

E-Mail Address~
  • Type: Text
  • Default Value: email@domain.com
  • Description: E-mail recipient(s) (separate multiple addresses with commas)

Send Email with Photo~

  • Manufacturer: Mycodo
  • Works with: Functions

Take a photo and send an email with it attached.

Usage: Executing self.run_action("ACTION_ID") will take a photo and email it to the specified recipient(s) using the SMTP credentials in the system configuration. Separate multiple recipients with commas. The body of the email will be the self-generated message. Executing self.run_action("ACTION_ID", value={"camera_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "email_address": ["email1@email.com", "email2@email.com"], "message": "My message"}) will capture a photo using the camera with the specified ID and send an email to the specified email(s) with message and attached photo.

Options~

Camera~
  • Type: Select Device
  • Description: Select the Camera to take a photo with
E-Mail Address~
  • Type: Text
  • Default Value: email@domain.com
  • Description: E-mail recipient(s). Separate multiple with commas.

System: Restart~

  • Manufacturer: Mycodo
  • Works with: Functions

Restart the System

Usage: Executing self.run_action("ACTION_ID") will restart the system in 10 seconds.

System: Shutdown~

  • Manufacturer: Mycodo
  • Works with: Functions

Shutdown the System

Usage: Executing self.run_action("ACTION_ID") will shut down the system in 10 seconds.

Webhook~

  • Manufacturer: Mycodo
  • Works with: Functions

Emits a HTTP request when triggered. The first line contains a HTTP verb (GET, POST, PUT, ...) followed by a space and the URL to call. Subsequent lines are optional "name: value"-header parameters. After a blank line, the body payload to be sent follows. {{{message}}} is a placeholder that gets replaced by the message, {{{quoted_message}}} is the message in an URL safe encoding.

Usage: Executing self.run_action("ACTION_ID") will run the Action.

Options~

Webhook Request~
  • Description: HTTP request to execute

Built-In Actions (Devices)~

Display: Backlight: Color~

  • Manufacturer: Display
  • Works with: Functions

Set the display backlight color

Usage: Executing self.run_action("ACTION_ID") will change the backlight color on the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "color": "255,0,0"}) will change the backlight color on the controller with the specified ID and color.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to set the backlight color
Color (RGB)~
  • Type: Text
  • Default Value: 255,0,0
  • Description: Color as R,G,B values (e.g. "255,0,0" without quotes)

Display: Backlight: Off~

  • Manufacturer: Display
  • Works with: Functions

Turn display backlight off

Usage: Executing self.run_action("ACTION_ID") will turn the backlight off for the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will turn the backlight off for the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to turn the backlight off

Display: Backlight: On~

  • Manufacturer: Display
  • Works with: Functions

Turn display backlight on

Usage: Executing self.run_action("ACTION_ID") will turn the backlight on for the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will turn the backlight on for the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to turn the backlight on

Display: Flashing: Off~

  • Manufacturer: Display
  • Works with: Functions

Turn display flashing off

Usage: Executing self.run_action("ACTION_ID") will stop the backlight flashing on the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will stop the backlight flashing on the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to stop flashing the backlight

Display: Flashing: On~

  • Manufacturer: Display
  • Works with: Functions

Turn display flashing on

Usage: Executing self.run_action("ACTION_ID") will start the backlight flashing on the selected display. Executing self.run_action("ACTION_ID", value={"display_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b"}) will start the backlight flashing on the controller with the specified ID.

Options~

Display~
  • Type: Select Device
  • Description: Select the display to start flashing the backlight
\ No newline at end of file diff --git a/Supported-Functions/index.html b/Supported-Functions/index.html index 29fdc16a9..8885ced1a 100644 --- a/Supported-Functions/index.html +++ b/Supported-Functions/index.html @@ -1 +1 @@ - Supported Functions - Mycodo
Skip to content

Supported Functions

Built-In Functions~

Average (Last, Multiple)~

This function acquires the last measurement of those that are selected, averages them, then stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementMeasurement to replace "x" in the equation

Average (Past, Single)~

This function acquires the past measurements (within Max Age) for the selected measurement, averages them, then stores the resulting value as the selected measurement and unit. Note: There is a bug in InfluxDB 1.8.10 that prevents the mean() function from working properly. Therefore, if you are using Influxdb v1.x, the median() function will be used. InfluxDB 2.x is unaffected and uses mean(). To get the true mean, upgrade to InfluxDB 2.x.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
MeasurementSelect Measurement (Input, Function)Measurement to replace "x" in the equation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Backup to Remote Host (rsync)~

This function will use rsync to back up assets on this system to a remote system. Your remote system needs to have an SSH server running and rsync installed. This system will need rsync installed and be able to access your remote system via SSH keyfile (login without a password). You can do this by creating an SSH key on this system running Mycodo with "ssh-keygen" (leave the password field empty), then run "ssh-copy-id -i ~/.ssh/id_rsa.pub pi@REMOTE_HOST_IP" to transfer your public SSH key to your remote system (changing pi and REMOTE_HOST_IP to the appropriate user and host of your remote system). You can test if this worked by trying to connect to your remote system with "ssh pi@REMOTE_HOST_IP" and you should log in without being asked for a password. Be careful not to set the Period too low, which could cause the function to begin running before the previous operation(s) complete. Therefore, it is recommended to set a relatively long Period (greater than 10 minutes). The default Period is 15 days. Note that the Period will reset if the system or the Mycodo daemon restarts and the Function will run, generating new settings and measurement archives that will be synced. There are two common ways to use this Function: 1) A short period (1 hour), only have Backup Camera Directories enabled, and use the Backup Settings Now and Backup Measurements Now buttons manually to perform a backup, and 2) A long period (15 days), only have Backup Settings and Backup Measurements enabled. You can even create two of these Functions with one set up to perform long-Period settings and measurement backups and the other set up to perform short-Period camera backups.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 1296000The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 300The duration to wait before the first operation
Local UserText - Default Value: piThe user on this system that will run rsync
Remote UserText - Default Value: piThe user to log in to the remote host
Remote HostText - Default Value: 192.168.0.50The IP or host address to send the backup to
Remote Backup PathText - Default Value: /home/pi/backup_mycodoThe path to backup to on the remote host
Rsync Timeout (Seconds)Integer - Default Value: 3600How long to allow rsync to complete
Local Backup PathTextA local path to backup (leave blank to disable)
Backup Settings Export FileBoolean - Default Value: TrueCreate and backup exported settings file
Remove Local Settings BackupsBooleanRemove local settings backups after successful transfer to remote host
Backup MeasurementsBoolean - Default Value: TrueBackup all influxdb measurements
Remove Local Measurements BackupsBooleanRemove local measurements backups after successful transfer to remote host
Backup Camera DirectoriesBoolean - Default Value: TrueBackup all camera directories
Remove Local Camera ImagesBooleanRemove local camera images after successful transfer to remote host
SSH PortInteger - Default Value: 22Specify a nonstandard SSH port
Commands
Backup of settings are only created if the Mycodo version or database versions change. This is due to this Function running periodically- if it created a new backup every Period, there would soon be many identical backups. Therefore, if you want to induce the backup of settings, measurements, or camera directories and sync them to your remote system, use the buttons below.
Backup Settings NowButton
Backup Measurements NowButton
Backup Camera Directories NowButton

Bang-Bang Hysteretic (On/Off) (Raise/Lower)~

A simple bang-bang control for controlling one output from one input. Select an input, an output, enter a setpoint and a hysteresis, and select a direction. The output will turn on when the input is below (lower = setpoint - hysteresis) and turn off when the input is above (higher = setpoint + hysteresis). This is the behavior when Raise is selected, such as when heating. Lower direction has the opposite behavior - it will try to turn the output on in order to drive the input lower.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
Measurement: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
OutputSelect Device, Measurement, and Channel (Output)Select an output to control that will affect the measurement
SetpointDecimal - Default Value: 50The desired setpoint
HysteresisDecimal - Default Value: 1The amount above and below the setpoint that defines the control band
DirectionSelect(Options: [Raise | Lower] (Default in bold)Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling)
Period (Seconds)Decimal - Default Value: 5The duration between measurements or actions

Bang-Bang Hysteretic (On/Off) (Raise/Lower/Both)~

A simple bang-bang control for controlling one or two outputs from one input. Select an input, a raise and/or lower output, enter a setpoint and a hysteresis, and select a direction. The output will turn on when the input is below (lower = setpoint - hysteresis) and turn off when the input is above (higher = setpoint + hysteresis). This is the behavior when Raise is selected, such as when heating. Lower direction has the opposite behavior - it will try to turn the output on in order to drive the input lower. The Both option will raise and lower. Note: This output will only work with On/Off Outputs.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
Measurement: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Output (Raise)Select Device, Measurement, and Channel (Output)Select an output to control that will raise the measurement
Output (Lower)Select Device, Measurement, and Channel (Output)Select an output to control that will lower the measurement
SetpointDecimal - Default Value: 50The desired setpoint
HysteresisDecimal - Default Value: 1The amount above and below the setpoint that defines the control band
DirectionSelect(Options: [Raise | Lower | Both] (Default in bold)Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling)
Period (Seconds)Decimal - Default Value: 5The duration between measurements or actions

Bang-Bang Hysteretic (PWM) (Raise/Lower/Both)~

A simple bang-bang control for controlling one PWM output from one input. Select an input, a PWM output, enter a setpoint and a hysteresis, and select a direction. The output will turn on when the input is below below (lower = setpoint - hysteresis) and turn off when the input is above (higher = setpoint + hysteresis). This is the behavior when Raise is selected, such as when heating. Lower direction has the opposite behavior - it will try to turn the output on in order to drive the input lower. The Both option will raise and lower. Note: This output will only work with PWM Outputs.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
Measurement: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
OutputSelect Device, Measurement, and Channel (Output)Select an output to control that will affect the measurement
SetpointDecimal - Default Value: 50The desired setpoint
HysteresisDecimal - Default Value: 1The amount above and below the setpoint that defines the control band
DirectionSelect(Options: [Raise | Lower | Both] (Default in bold)Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling)
Period (Seconds)Decimal - Default Value: 5The duration between measurements or actions
Duty Cycle (increase)Decimal - Default Value: 90The duty cycle to increase the measurement
Duty Cycle (maintain)Decimal - Default Value: 55The duty cycle to maintain the measurement
Duty Cycle (decrease)Decimal - Default Value: 20The duty cycle to decrease the measurement
Duty Cycle (shutdown)DecimalThe duty cycle to set when the function shuts down

Camera: libcamera: Image/Video~

NOTE: THIS IS CURRENTLY EXPERIMENTAL - USE AT YOUR OWN RISK UNTIL THIS NOTICE IS REMOVED. Capture images and videos from a camera using libcamera-still and libcamera-vid. The Function must be activated in order to capture still and timelapse images and use the Camera Widget.

OptionTypeDescription
Status Period (seconds)Integer - Default Value: 60The duration (seconds) to update the Function status on the UI
Image options.
Custom Image PathTextSet a non-default path for still images to be saved
Custom Timelapse PathTextSet a non-default path for timelapse images to be saved
Image ExtensionSelect(Options: [JPG | PNG | BMP | RGB | YUV420] (Default in bold)The file type/format to save images
Image: Resolution: WidthInteger - Default Value: 720The width of still images
Image: Resolution: HeightInteger - Default Value: 480The height of still images
BrightnessDecimalThe brightness of still images (-1 to 1)
Image: ContrastDecimal - Default Value: 1.0The contrast of still images. Larger values produce images with more contrast.
SaturationDecimal - Default Value: 1.0The saturation of still images. Larger values produce more saturated colours; 0.0 produces a greyscale image.
SharpnessDecimalThe sharpness of still images. Larger values produce more saturated colours; 0.0 produces a greyscale image.
Shutter Speed (Microseconds)IntegerThe shutter speed, in microseconds. 0 disables and returns to auto exposure.
GainDecimal - Default Value: 1.0The gain of still images.
White Balance: AutoSelect(Options: [Auto | Incandescent | Tungsten | Fluorescent | Indoor | Daylight | Cloudy | Custom] (Default in bold)The white balance of images
White Balance: Red GainDecimalThe red gain of white balance for still images (disabled Auto White Balance if red and blue are not set to 0)
White Balance: Blue GainDecimalThe red gain of white balance for still images (disabled Auto White Balance if red and blue are not set to 0)
Flip HorizontallyBooleanFlip the image horizontally.
Flip VerticallyBooleanFlip the image vertically.
Rotate (Degrees)IntegerRotate the image.
Custom libcamera-still OptionsTextPass custom options to the libcamera-still command.
Video options.
Custom Video PathTextSet a non-default path for videos to be saved
Video ExtensionSelect(Options: [H264 -> MP4 (with ffmpeg) | H264 | MJPEG | YUV420] (Default in bold)The file type/format to save videos
Video: Resolution: WidthInteger - Default Value: 720The width of videos
Video: Resolution: HeightInteger - Default Value: 480The height of videos
Custom libcamera-vid OptionsTextPass custom options to the libcamera-vid command.
Commands
Capture ImageButton
To capture a video, enter the duration and press Capture Video.
Video Duration (Seconds)Integer - Default Value: 5How long to record the video
Capture VideoButton
To start a timelapse, enter the duration and period and press Start Timelapse.
Timelapse Duration (Seconds)Integer - Default Value: 2592000How long the timelapse will run
Timelapse Period (Seconds)Integer - Default Value: 600How often to take a timelapse photo
Start TimelapseButton
To stop an active timelapse, press Stop Timelapse.
Stop TimelapseButton
To pause or resume an active timelapse, press Pause Timelapse or Resume Timelapse.
Pause TimelapseButton
Resume TimelapseButton

Difference~

This function acquires 2 measurements, calculates the difference, and stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement: ASelect Measurement (Input, Function)
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement: BSelect Measurement (Input, Function)
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Reverse OrderBooleanReverse the order in the calculation
Absolute DifferenceBooleanReturn the absolute value of the difference

Display: Generic LCD 16x2 (I2C)~

This Function outputs to a generic 16x2 LCD display via I2C. Since this display can show 2 lines at a time, channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first 2 lines that are displayed are channels 0 and 1, then 2 and 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x20
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Commands
Backlight OnButton
Backlight OffButton
Backlight Flashing OnButton
Backlight Flashing OffButton

Display: Generic LCD 20x4 (I2C)~

This Function outputs to a generic 20x4 LCD display via I2C. Since this display can show 4 lines at a time, channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first 4 lines that are displayed are channels 0, 1, 2, and 3, then 4, 5, 6, and 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x20
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Commands
Backlight OnButton
Backlight OffButton

Display: Grove LCD 16x2 (I2C)~

This Function outputs to the Grove 16x2 LCD display via I2C. Since this display can show 2 lines at a time, channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first 2 lines that are displayed are channels 0 and 1, then 2 and 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3e
I2C BusInteger - Default Value: 1
Backlight I2C AddressText - Default Value: 0x62I2C address to control the backlight
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Backlight Red (0 - 255)Integer - Default Value: 255Set the red color value of the backlight on startup.
Backlight Green (0 - 255)Integer - Default Value: 255Set the green color value of the backlight on startup.
Backlight Blue (0 - 255)Integer - Default Value: 255Set the blue color value of the backlight on startup.
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Commands
Backlight OnButton
Backlight OffButton
Color (RGB)Text - Default Value: 255,0,0Color as R,G,B values (e.g. "255,0,0" without quotes)
Set Backlight ColorButton

Display: SSD1306 OLED 128x32 [2 Lines] (I2C)~

This Function outputs to a 128x32 SSD1306 OLED display via I2C. This display Function will show 2 lines at a time, so channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 1, then 2 - 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x32 [2 Lines] (SPI)~

This Function outputs to a 128x32 SSD1306 OLED display via SPI. This display Function will show 2 lines at a time, so channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 1, then 2 - 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x32 [4 Lines] (I2C)~

This Function outputs to a 128x32 SSD1306 OLED display via I2C. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x32 [4 Lines] (SPI)~

This Function outputs to a 128x32 SSD1306 OLED display via SPI. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [4 Lines] (I2C)~

This Function outputs to a 128x64 SSD1306 OLED display via I2C. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [4 Lines] (SPI)~

This Function outputs to a 128x64 SSD1306 OLED display via SPI. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [8 Lines] (I2C)~

This Function outputs to a 128x64 SSD1306 OLED display via I2C. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [8 Lines] (SPI)~

This Function outputs to a 128x64 SSD1306 OLED display via SPI. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1309 OLED 128x64 [8 Lines] (I2C)~

This Function outputs to a 128x64 SSD1309 OLED display via I2C. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Equation (Multi-Measure)~

This function acquires two measurements and uses them within a user-set equation and stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement: ASelect Measurement (Input, Output, Function)Measurement to replace a
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement: BSelect Measurement (Input, Output, Function)Measurement to replace b
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
EquationText - Default Value: a*(2+b)Equation using measurements a and b

Equation (Single-Measure)~

This function acquires a measurement and uses it within a user-set equation and stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
MeasurementSelect Measurement (Input, Output, Function)Measurement to replace "x" in the equation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
EquationText - Default Value: x*5+2Equation using the measurement

Example: Generic~

This is an example Function Module that showcases all the different type of UI options. It is not useful beyond showing how to develop new custom Function modules.This message will appear above the Function options. It will retrieve the last selected measurement, turn the selected output on for 15 seconds, then deactivate itself. Study the code to develop your own Function Module that can be imported on the Function Import page.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
The following fields are for text, integers, and decimal inputs. This message will automatically create a new line for the options that come after it. Alternatively, a new line can be created instead without a message, which are what separates each of the following three inputs.
Text InputText - Default Value: Text_1Type in text
Integer InputInteger - Default Value: 100Type in an Integer
Devimal InputDecimal - Default Value: 50.2Type in a decimal value
A boolean value can be made using a checkbox.
Boolean ValueBoolean - Default Value: TrueSet to either True (checked) or False (Unchecked)
A dropdown selection can be made of any user-defined options, with any of the options selected by default when the Function is added by the user.
Select OptionSelect(Options: [First Option Selected | Second Option Selected | Third Option Selected] (Default in bold)Select an option from the dropdown
A specific measurement from an Input, Function, or PID Controller can be selected. The following dropdown will be populated if at least one Input, Function, or PID Controller has been created (as long as the Function has measurements, e.g. Statistics Function).
Controller MeasurementSelect Measurement (Input, Function, PID)Select a controller Measurement
An output channel measurement can be selected that will return the Output ID, Channel ID, and Measurement ID. This is useful if you need more than just the Output and Channel IDs and require the user to select the specific Measurement of a channel.
Output Channel MeasurementSelect Device, Measurement, and Channel (Output)Select an output channel and measurement
An output can be selected that will return the Output ID if only the output ID is needed.
Output DeviceSelect DeviceSelect an Output device
An Input, Output, Function, PID, or Trigger can be selected that will return the ID if only the controller ID is needed (e.g. for activating/deactivating a controller)
Controller DeviceSelect DeviceSelect an Input/Output/Function/PID/Trigger controller
Commands
Button One will pass the Button One Value to the button_one() function of this module. This allows functions to be executed with user-specified inputs. These can be text, integers, decimals, or boolean values.
Button One ValueInteger - Default Value: 650Value for button one.
Button OneButton
Here is another action with another user input that will be passed to the function. Note that Button One Value will also be passed to this second function, so be sure to use unique ids for each input.
Button Two ValueInteger - Default Value: 1500Value for button two.
Button TwoButton

Humidity (Wet/Dry-Bulb)~

This function calculates the humidity based on wet and dry bulb temperature measurements.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Dry Bulb TemperatureSelect Measurement (Input, Function)Dry Bulb temperature measurement
Dry Bulb: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Wet Bulb TemperatureSelect Measurement (Input, Function)Wet Bulb temperature measurement
Wet Bulb: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
PressureSelect Measurement (Input, Function)Pressure measurement
Pressure: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Neokey 4x1 Neopixel Keyboard (Execute Actions)~

This Function executes actions when a key is pressed. Add actions at the bottom of this module, then enter one or more short action IDs for each key, separated by commas. The Action ID is found next to the Action (for example, the Action "[Action 0559689e] Controller: Activate" has an Action ID of 0559689e. When entering Action ID(s), separate multiple IDs by commas (for example, "asdf1234" or "asdf1234,qwer5678,zxcv0987"). Actions will be executed in the order they are entered in the text string. Enter Action IDs to execute those actions when the key is pressed. If enable Toggling Actions, every other key press will execute Actions listed in Toggled Action IDs. The LED color of the key before being pressed, after being pressed, and while the last action is running. Color is an RGB string, with 0-255 for each color. For example, red is "255, 0, 0" and blue is "0, 0, 255".

OptionTypeDescription
I2C AddressText - Default Value: 0x30
I2C BusInteger - Default Value: 1
LED Brightness (0.0-1.0)Decimal - Default Value: 0.2The brightness of the LEDs
LED Flash Period (Seconds)Decimal - Default Value: 1.0Set the period if the LED begins flashing
Channel Options
NameTextA name to distinguish this from others
LED Delay (Seconds)Decimal - Default Value: 1.5How long to leave the LED on after the last action executes.
Action ID(s)TextSet which action(s) execute when the key is pressed. Enter one or more Action IDs, separated by commas
Enable Toggling ActionsBooleanAlternate between executing two sets of Actions
Toggled Action ID(s)TextSet which action(s) execute when the key is pressed on even presses. Enter one or more Action IDs, separated by commas
Resting LED Color (RGB)Text - Default Value: 0, 0, 0The RGB color while no actions are running (e.g 10, 0, 0)
Actions Running LED Color: (RGB)Text - Default Value: 0, 255, 0The RGB color while all but the last action is running (e.g 10, 0, 0)
Last Action LED Color (RGB)Text - Default Value: 0, 0, 255The RGB color while the last action is running (e.g 10, 0, 0)
Shutdown LED Color (RGB)Text - Default Value: 0, 0, 0The RGB color when the Function is disabled (e.g 10, 0, 0)

PID Autotune~

This function will attempt to perform a PID controller autotune. That is, an output will be powered and the response measured from a sensor several times to calculate the P, I, and D gains. Updates about the operation will be sent to the Daemon log. If the autotune successfully completes, a summary will be sent to the Daemon log as well. Currently, only raising a Measurement is supported, but lowering should be possible with some modification to the function controller code. It is recommended to create a graph on a dashboard with the Measurement and Output to monitor that the Output is successfully raising the Measurement beyond the Setpoint. Note: Autotune is an experimental feature, it is not well-developed, and it has a high likelihood of failing to generate PID gains. Do not rely on it for accurately tuning your PID controller.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
OutputSelect Device, Measurement, and Channel (Output)Select an output to modulate that will affect the measurement
PeriodInteger - Default Value: 30The period between powering the output
SetpointDecimal - Default Value: 50A value sufficiently far from the current measured value that the output is capable of pushing the measurement toward
Noise BandDecimal - Default Value: 0.5The amount above the setpoint the measurement must reach
OutstepDecimal - Default Value: 10How many seconds the output will turn on every Period
Currently, only autotuning to raise a condition (measurement) is supported.
DirectionSelect(Options: [Raise] (Default in bold)The direction the Output will push the Measurement

Redundancy~

This function stores the first available measurement. This is useful if you have multiple sensors that you want to serve as backups in case one stops working, you can set them up in the order of importance. This function will check if a measurement exits, starting with the first measurement. If it doesn't, the next is checked, until a measurement is found. Once a measurement is found, it is stored in the database with the user-set measurement and unit. The output of this function can be used as an input throughout Mycodo. If you need more than 3 measurements to be checked, you can string multiple Redundancy Functions by creating a second Function and setting the first Function's output as the second Function's input.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement ASelect Measurement (Input, Function)Measurement to replace a
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement BSelect Measurement (Input, Function)Measurement to replace b
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement CSelect Measurement (Input, Function)Measurement to replace C
Measurement C: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Regulate pH and Electrical Conductivity~

This function regulates pH with 2 pumps (acid and base solutions) and electrical conductivity (EC) with up to 4 pumps (nutrient solutions A, B, C, and D). Set only the nutrient solution outputs you want to use. Any outputs not set will not dispense when EC is being adjusted, allowing as few as 1 pump or as many as 4 pumps. Outputs can be instructed to turn on for durations (seconds) or volumes (ml). Set each Output Type to the correct type for each selected Output Channel (only select on/off Output Channels for durations and volume Output Channels for volumes). The ratio of nutrient solutions being dispensed is defined by the duration or volume set for each EC output.
If an e-mail address (or multiple addresses separated by commas) is entered into the E-Mail Notification field, a notification e-mail will be sent if 1) pH is outside the set danger range, 2) EC is too high and water needs to be added to the reservoir, or 3) a measurement could not be found in the database for the specific Max Age. Each e-mail notification type has its own timer that prevents e-mail spam, and will only allow sending for each notification type every set E-Mail Timer Duration. After this duration, the timer will automatically reset to allow new notifications to be sent. You may also manually reset e-mail timers at any time with the Custom Commands, below.
When the Function is active, Status text will appear below indicating the regulation information and total duration/volume for each output.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 300The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Status Period (seconds)Integer - Default Value: 60The duration (seconds) to update the Function status on the UI
Measurement Options
pH MeasurementSelect Measurement (Input, Function)Measurement from the pH input
pH: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
EC MeasurementSelect Measurement (Input, Function)Measurement from the EC input
Electrical Conductivity: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Output Options
Output: pH Dose Raise (Base)Select Channel (Output_Channels)Select an output to raise the pH
Output: pH Dose Lower (Acid)Select Channel (Output_Channels)Select an output to lower the pH
pH Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
pH Output AmountDecimal - Default Value: 2.0The amount to send to the pH dosing pumps (duration or volume)
Output: EC Dose Nutrient ASelect Channel (Output_Channels)Select an output to dose nutrient A
Nutrient A Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient A Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient A dosing pump (duration or volume)
Output: EC Dose Nutrient BSelect Channel (Output_Channels)Select an output to dose nutrient B
Nutrient B Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient B Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient B dosing pump (duration or volume)
Output: EC Dose Nutrient CSelect Channel (Output_Channels)Select an output to dose nutrient C
Nutrient C Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient C Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient C dosing pump (duration or volume)
Output: EC Dose Nutrient DSelect Channel (Output_Channels)Select an output to dose nutrient D
Nutrient D Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient D Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient D dosing pump (duration or volume)
Setpoint Options
pH SetpointDecimal - Default Value: 5.85The desired pH setpoint
pH HysteresisDecimal - Default Value: 0.35The hysteresis to determine the pH range
EC SetpointDecimal - Default Value: 150.0The desired electrical conductivity setpoint
EC HysteresisDecimal - Default Value: 50.0The hysteresis to determine the EC range
pH Danger Range (High Value)Decimal - Default Value: 7.0This high pH value for the danger range
pH Danger Range (Low Value)Decimal - Default Value: 5.0This low pH value for the danger range
Alert Notification Options
Notification E-MailTextE-mail to notify when there is an issue (blank to disable)
E-Mail Timer Duration (Hours)Decimal - Default Value: 12.0How long to wait between sending e-mail notifications
Commands
Each e-mail notification timer can be manually reset before the expiration.
Reset EC E-mail TimerButton
Reset pH E-mail TimerButton
Reset Measurement Issue E-mail TimerButton
Reset All E-Mail TimersButton
Each total duration and volume can be manually reset.
Reset All TotalsButton
Reset Total Raise pH DurationButton
Reset Total Lower pH DurationButton
Reset Total Raise pH VolumeButton
Reset Total Lower pH VolumeButton
Reset Total EC A DurationButton
Reset Total EC A VolumeButton
Reset Total EC B DurationButton
Reset Total EC B VolumeButton
Reset Total EC C DurationButton
Reset Total EC C VolumeButton
Reset Total EC D DurationButton
Reset Total EC D VolumeButton

Spacer~

A spacer to organize Functions.

OptionTypeDescription
ColorText - Default Value: #000000The color of the name text

Statistics (Last, Multiple)~

This function acquires multiple measurements, calculates statistics, and stores the resulting values as the selected unit.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementMeasurements to perform statistics on
Halt on Missing MeasurementBooleanDon't calculate statistics if >= 1 measurement is not found within Max Age

Statistics (Past, Single)~

This function acquires multiple values from a single measurement, calculates statistics, and stores the resulting values as the selected unit.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementSelect Measurement (Input, Function)Measurement to perform statistics on

Sum (Last, Multiple)~

This function acquires the last measurement of those that are selected, sums them, then stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementMeasurement to replace "x" in the equation

Sum (Past, Single)~

This function acquires the past measurements (within Max Age) for the selected measurement, sums them, then stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
MeasurementSelect Measurement (Input, Function, Output)Measurement to replace "x" in the equation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Vapor Pressure Deficit~

This function calculates the vapor pressure deficit based on leaf temperature and humidity.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
TemperatureSelect Measurement (Input, Function)Temperature measurement
Temperature: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
HumiditySelect Measurement (Input, Function)Humidity measurement
Humidity: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Verification~

This function acquires 2 measurements, calculates the difference, and if the difference is not larger than the set threshold, the Measurement A value is stored. This enables verifying one sensor's measurement with another sensor's measurement. Only when they are both in agreement is a measurement stored. This stored measurement can be used in functions such as Conditional Functions that will notify the user if no measurement is available to indicate there may be an issue with a sensor.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement ASelect Measurement (Input, Function)Measurement A
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement BSelect Measurement (Input, Function)Measurement B
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Maximum DifferenceDecimal - Default Value: 10.0The maximum allowed difference between the measurements
Average MeasurementsBooleanStore the average of the measurements in the database
\ No newline at end of file + Supported Functions - Mycodo
Skip to content

Supported Functions

Built-In Functions~

Average (Last, Multiple)~

This function acquires the last measurement of those that are selected, averages them, then stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementMeasurement to replace "x" in the equation

Average (Past, Single)~

This function acquires the past measurements (within Max Age) for the selected measurement, averages them, then stores the resulting value as the selected measurement and unit. Note: There is a bug in InfluxDB 1.8.10 that prevents the mean() function from working properly. Therefore, if you are using Influxdb v1.x, the median() function will be used. InfluxDB 2.x is unaffected and uses mean(). To get the true mean, upgrade to InfluxDB 2.x.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
MeasurementSelect Measurement (Input, Function)Measurement to replace "x" in the equation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Backup to Remote Host (rsync)~

This function will use rsync to back up assets on this system to a remote system. Your remote system needs to have an SSH server running and rsync installed. This system will need rsync installed and be able to access your remote system via SSH keyfile (login without a password). You can do this by creating an SSH key on this system running Mycodo with "ssh-keygen" (leave the password field empty), then run "ssh-copy-id -i ~/.ssh/id_rsa.pub pi@REMOTE_HOST_IP" to transfer your public SSH key to your remote system (changing pi and REMOTE_HOST_IP to the appropriate user and host of your remote system). You can test if this worked by trying to connect to your remote system with "ssh pi@REMOTE_HOST_IP" and you should log in without being asked for a password. Be careful not to set the Period too low, which could cause the function to begin running before the previous operation(s) complete. Therefore, it is recommended to set a relatively long Period (greater than 10 minutes). The default Period is 15 days. Note that the Period will reset if the system or the Mycodo daemon restarts and the Function will run, generating new settings and measurement archives that will be synced. There are two common ways to use this Function: 1) A short period (1 hour), only have Backup Camera Directories enabled, and use the Backup Settings Now and Backup Measurements Now buttons manually to perform a backup, and 2) A long period (15 days), only have Backup Settings and Backup Measurements enabled. You can even create two of these Functions with one set up to perform long-Period settings and measurement backups and the other set up to perform short-Period camera backups.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 1296000The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 300The duration to wait before the first operation
Local UserText - Default Value: piThe user on this system that will run rsync
Remote UserText - Default Value: piThe user to log in to the remote host
Remote HostText - Default Value: 192.168.0.50The IP or host address to send the backup to
Remote Backup PathText - Default Value: /home/pi/backup_mycodoThe path to backup to on the remote host
Rsync Timeout (Seconds)Integer - Default Value: 3600How long to allow rsync to complete
Local Backup PathTextA local path to backup (leave blank to disable)
Backup Settings Export FileBoolean - Default Value: TrueCreate and backup exported settings file
Remove Local Settings BackupsBooleanRemove local settings backups after successful transfer to remote host
Backup MeasurementsBoolean - Default Value: TrueBackup all influxdb measurements
Remove Local Measurements BackupsBooleanRemove local measurements backups after successful transfer to remote host
Backup Camera DirectoriesBoolean - Default Value: TrueBackup all camera directories
Remove Local Camera ImagesBooleanRemove local camera images after successful transfer to remote host
SSH PortInteger - Default Value: 22Specify a nonstandard SSH port
Commands
Backup of settings are only created if the Mycodo version or database versions change. This is due to this Function running periodically- if it created a new backup every Period, there would soon be many identical backups. Therefore, if you want to induce the backup of settings, measurements, or camera directories and sync them to your remote system, use the buttons below.
Backup Settings NowButton
Backup Measurements NowButton
Backup Camera Directories NowButton

Bang-Bang Hysteretic (On/Off) (Raise/Lower)~

A simple bang-bang control for controlling one output from one input. Select an input, an output, enter a setpoint and a hysteresis, and select a direction. The output will turn on when the input is below (lower = setpoint - hysteresis) and turn off when the input is above (higher = setpoint + hysteresis). This is the behavior when Raise is selected, such as when heating. Lower direction has the opposite behavior - it will try to turn the output on in order to drive the input lower.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
Measurement: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
OutputSelect Device, Measurement, and Channel (Output)Select an output to control that will affect the measurement
SetpointDecimal - Default Value: 50The desired setpoint
HysteresisDecimal - Default Value: 1The amount above and below the setpoint that defines the control band
DirectionSelect(Options: [Raise | Lower] (Default in bold)Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling)
Period (Seconds)Decimal - Default Value: 5The duration between measurements or actions

Bang-Bang Hysteretic (On/Off) (Raise/Lower/Both)~

A simple bang-bang control for controlling one or two outputs from one input. Select an input, a raise and/or lower output, enter a setpoint and a hysteresis, and select a direction. The output will turn on when the input is below (lower = setpoint - hysteresis) and turn off when the input is above (higher = setpoint + hysteresis). This is the behavior when Raise is selected, such as when heating. Lower direction has the opposite behavior - it will try to turn the output on in order to drive the input lower. The Both option will raise and lower. Note: This output will only work with On/Off Outputs.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
Measurement: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Output (Raise)Select Device, Measurement, and Channel (Output)Select an output to control that will raise the measurement
Output (Lower)Select Device, Measurement, and Channel (Output)Select an output to control that will lower the measurement
SetpointDecimal - Default Value: 50The desired setpoint
HysteresisDecimal - Default Value: 1The amount above and below the setpoint that defines the control band
DirectionSelect(Options: [Raise | Lower | Both] (Default in bold)Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling)
Period (Seconds)Decimal - Default Value: 5The duration between measurements or actions

Bang-Bang Hysteretic (PWM) (Raise/Lower/Both)~

A simple bang-bang control for controlling one PWM output from one input. Select an input, a PWM output, enter a setpoint and a hysteresis, and select a direction. The output will turn on when the input is below below (lower = setpoint - hysteresis) and turn off when the input is above (higher = setpoint + hysteresis). This is the behavior when Raise is selected, such as when heating. Lower direction has the opposite behavior - it will try to turn the output on in order to drive the input lower. The Both option will raise and lower. Note: This output will only work with PWM Outputs.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
Measurement: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
OutputSelect Device, Measurement, and Channel (Output)Select an output to control that will affect the measurement
SetpointDecimal - Default Value: 50The desired setpoint
HysteresisDecimal - Default Value: 1The amount above and below the setpoint that defines the control band
DirectionSelect(Options: [Raise | Lower | Both] (Default in bold)Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling)
Period (Seconds)Decimal - Default Value: 5The duration between measurements or actions
Duty Cycle (increase)Decimal - Default Value: 90The duty cycle to increase the measurement
Duty Cycle (maintain)Decimal - Default Value: 55The duty cycle to maintain the measurement
Duty Cycle (decrease)Decimal - Default Value: 20The duty cycle to decrease the measurement
Duty Cycle (shutdown)DecimalThe duty cycle to set when the function shuts down

Camera: libcamera: Image/Video~

NOTE: THIS IS CURRENTLY EXPERIMENTAL - USE AT YOUR OWN RISK UNTIL THIS NOTICE IS REMOVED. Capture images and videos from a camera using libcamera-still and libcamera-vid. The Function must be activated in order to capture still and timelapse images and use the Camera Widget.

OptionTypeDescription
Status Period (seconds)Integer - Default Value: 60The duration (seconds) to update the Function status on the UI
Image options.
Custom Image PathTextSet a non-default path for still images to be saved
Custom Timelapse PathTextSet a non-default path for timelapse images to be saved
Image ExtensionSelect(Options: [JPG | PNG | BMP | RGB | YUV420] (Default in bold)The file type/format to save images
Image: Resolution: WidthInteger - Default Value: 720The width of still images
Image: Resolution: HeightInteger - Default Value: 480The height of still images
BrightnessDecimalThe brightness of still images (-1 to 1)
Image: ContrastDecimal - Default Value: 1.0The contrast of still images. Larger values produce images with more contrast.
SaturationDecimal - Default Value: 1.0The saturation of still images. Larger values produce more saturated colours; 0.0 produces a greyscale image.
SharpnessDecimalThe sharpness of still images. Larger values produce more saturated colours; 0.0 produces a greyscale image.
Shutter Speed (Microseconds)IntegerThe shutter speed, in microseconds. 0 disables and returns to auto exposure.
GainDecimal - Default Value: 1.0The gain of still images.
White Balance: AutoSelect(Options: [Auto | Incandescent | Tungsten | Fluorescent | Indoor | Daylight | Cloudy | Custom] (Default in bold)The white balance of images
White Balance: Red GainDecimalThe red gain of white balance for still images (disabled Auto White Balance if red and blue are not set to 0)
White Balance: Blue GainDecimalThe red gain of white balance for still images (disabled Auto White Balance if red and blue are not set to 0)
Flip HorizontallyBooleanFlip the image horizontally.
Flip VerticallyBooleanFlip the image vertically.
Rotate (Degrees)IntegerRotate the image.
Custom libcamera-still OptionsTextPass custom options to the libcamera-still command.
Video options.
Custom Video PathTextSet a non-default path for videos to be saved
Video ExtensionSelect(Options: [H264 -> MP4 (with ffmpeg) | H264 | MJPEG | YUV420] (Default in bold)The file type/format to save videos
Video: Resolution: WidthInteger - Default Value: 720The width of videos
Video: Resolution: HeightInteger - Default Value: 480The height of videos
Custom libcamera-vid OptionsTextPass custom options to the libcamera-vid command.
Commands
Capture ImageButton
To capture a video, enter the duration and press Capture Video.
Video Duration (Seconds)Integer - Default Value: 5How long to record the video
Capture VideoButton
To start a timelapse, enter the duration and period and press Start Timelapse.
Timelapse Duration (Seconds)Integer - Default Value: 2592000How long the timelapse will run
Timelapse Period (Seconds)Integer - Default Value: 600How often to take a timelapse photo
Start TimelapseButton
To stop an active timelapse, press Stop Timelapse.
Stop TimelapseButton
To pause or resume an active timelapse, press Pause Timelapse or Resume Timelapse.
Pause TimelapseButton
Resume TimelapseButton

Difference~

This function acquires 2 measurements, calculates the difference, and stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement: ASelect Measurement (Input, Function)
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement: BSelect Measurement (Input, Function)
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Reverse OrderBooleanReverse the order in the calculation
Absolute DifferenceBooleanReturn the absolute value of the difference

Display: Generic LCD 16x2 (I2C)~

This Function outputs to a generic 16x2 LCD display via I2C. Since this display can show 2 lines at a time, channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first 2 lines that are displayed are channels 0 and 1, then 2 and 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x20
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Commands
Backlight OnButton
Backlight OffButton
Backlight Flashing OnButton
Backlight Flashing OffButton

Display: Generic LCD 20x4 (I2C)~

This Function outputs to a generic 20x4 LCD display via I2C. Since this display can show 4 lines at a time, channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first 4 lines that are displayed are channels 0, 1, 2, and 3, then 4, 5, 6, and 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x20
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Commands
Backlight OnButton
Backlight OffButton

Display: Grove LCD 16x2 (I2C)~

This Function outputs to the Grove 16x2 LCD display via I2C. Since this display can show 2 lines at a time, channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first 2 lines that are displayed are channels 0 and 1, then 2 and 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3e
I2C BusInteger - Default Value: 1
Backlight I2C AddressText - Default Value: 0x62I2C address to control the backlight
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Backlight Red (0 - 255)Integer - Default Value: 255Set the red color value of the backlight on startup.
Backlight Green (0 - 255)Integer - Default Value: 255Set the green color value of the backlight on startup.
Backlight Blue (0 - 255)Integer - Default Value: 255Set the blue color value of the backlight on startup.
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Commands
Backlight OnButton
Backlight OffButton
Color (RGB)Text - Default Value: 255,0,0Color as R,G,B values (e.g. "255,0,0" without quotes)
Set Backlight ColorButton

Display: SSD1306 OLED 128x32 [2 Lines] (I2C)~

This Function outputs to a 128x32 SSD1306 OLED display via I2C. This display Function will show 2 lines at a time, so channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 1, then 2 - 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x32 [2 Lines] (SPI)~

This Function outputs to a 128x32 SSD1306 OLED display via SPI. This display Function will show 2 lines at a time, so channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 1, then 2 - 3, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x32 [4 Lines] (I2C)~

This Function outputs to a 128x32 SSD1306 OLED display via I2C. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x32 [4 Lines] (SPI)~

This Function outputs to a 128x32 SSD1306 OLED display via SPI. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [4 Lines] (I2C)~

This Function outputs to a 128x64 SSD1306 OLED display via I2C. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [4 Lines] (SPI)~

This Function outputs to a 128x64 SSD1306 OLED display via SPI. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 17The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 12The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [8 Lines] (I2C)~

This Function outputs to a 128x64 SSD1306 OLED display via I2C. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1306 OLED 128x64 [8 Lines] (SPI)~

This Function outputs to a 128x64 SSD1306 OLED display via SPI. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
SPI DeviceIntegerThe SPI device
SPI BusIntegerThe SPI bus
DC PinInteger - Default Value: 16The pin (BCM numbering) connected to DC of the display
Reset PinInteger - Default Value: 19The pin (BCM numbering) connected to RST of the display
CS PinInteger - Default Value: 17The pin (BCM numbering) connected to CS of the display
Characters Per LineInteger - Default Value: 21The maximum number of characters to display per line
Use Non-Default FontBooleanDon't use the default font. Enable to specify the path to a font to use.
Non-Default Font PathText - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttfThe path to the non-default font to use
Font Size (pt)Integer - Default Value: 10The size of the font, in points
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Display: SSD1309 OLED 128x64 [8 Lines] (I2C)~

This Function outputs to a 128x64 SSD1309 OLED display via I2C. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 10The duration between measurements or actions
I2C AddressText - Default Value: 0x3c
I2C BusInteger - Default Value: 1
Number of Line SetsInteger - Default Value: 1How many sets of lines to cycle on the LCD
Reset PinInteger - Default Value: 17The pin (BCM numbering) connected to RST of the display
Channel Options
Line Display TypeSelectWhat to display on the line
MeasurementSelect Measurement (Input, Function, Output, PID)Measurement to display on the line
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement LabelTextSet to overwrite the default measurement label
Measurement DecimalInteger - Default Value: 1The number of digits after the decimal
TextText - Default Value: TextText to display
Display UnitBoolean - Default Value: TrueDisplay the measurement unit (if available)

Equation (Multi-Measure)~

This function acquires two measurements and uses them within a user-set equation and stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement: ASelect Measurement (Input, Output, Function)Measurement to replace a
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement: BSelect Measurement (Input, Output, Function)Measurement to replace b
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
EquationText - Default Value: a*(2+b)Equation using measurements a and b

Equation (Single-Measure)~

This function acquires a measurement and uses it within a user-set equation and stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
MeasurementSelect Measurement (Input, Output, Function)Measurement to replace "x" in the equation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
EquationText - Default Value: x*5+2Equation using the measurement

Example: Generic~

This is an example Function Module that showcases all the different type of UI options. It is not useful beyond showing how to develop new custom Function modules.This message will appear above the Function options. It will retrieve the last selected measurement, turn the selected output on for 15 seconds, then deactivate itself. Study the code to develop your own Function Module that can be imported on the Function Import page.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
The following fields are for text, integers, and decimal inputs. This message will automatically create a new line for the options that come after it. Alternatively, a new line can be created instead without a message, which are what separates each of the following three inputs.
Text InputText - Default Value: Text_1Type in text
Integer InputInteger - Default Value: 100Type in an Integer
Devimal InputDecimal - Default Value: 50.2Type in a decimal value
A boolean value can be made using a checkbox.
Boolean ValueBoolean - Default Value: TrueSet to either True (checked) or False (Unchecked)
A dropdown selection can be made of any user-defined options, with any of the options selected by default when the Function is added by the user.
Select OptionSelect(Options: [First Option Selected | Second Option Selected | Third Option Selected] (Default in bold)Select an option from the dropdown
A specific measurement from an Input, Function, or PID Controller can be selected. The following dropdown will be populated if at least one Input, Function, or PID Controller has been created (as long as the Function has measurements, e.g. Statistics Function).
Controller MeasurementSelect Measurement (Input, Function, PID)Select a controller Measurement
An output channel measurement can be selected that will return the Output ID, Channel ID, and Measurement ID. This is useful if you need more than just the Output and Channel IDs and require the user to select the specific Measurement of a channel.
Output Channel MeasurementSelect Device, Measurement, and Channel (Output)Select an output channel and measurement
An output can be selected that will return the Output ID if only the output ID is needed.
Output DeviceSelect DeviceSelect an Output device
An Input, Output, Function, PID, or Trigger can be selected that will return the ID if only the controller ID is needed (e.g. for activating/deactivating a controller)
Controller DeviceSelect DeviceSelect an Input/Output/Function/PID/Trigger controller
Commands
Button One will pass the Button One Value to the button_one() function of this module. This allows functions to be executed with user-specified inputs. These can be text, integers, decimals, or boolean values.
Button One ValueInteger - Default Value: 650Value for button one.
Button OneButton
Here is another action with another user input that will be passed to the function. Note that Button One Value will also be passed to this second function, so be sure to use unique ids for each input.
Button Two ValueInteger - Default Value: 1500Value for button two.
Button TwoButton

Humidity (Wet/Dry-Bulb)~

This function calculates the humidity based on wet and dry bulb temperature measurements.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Dry Bulb TemperatureSelect Measurement (Input, Function)Dry Bulb temperature measurement
Dry Bulb: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Wet Bulb TemperatureSelect Measurement (Input, Function)Wet Bulb temperature measurement
Wet Bulb: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
PressureSelect Measurement (Input, Function)Pressure measurement
Pressure: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Neokey 4x1 Neopixel Keyboard (Execute Actions)~

This Function executes actions when a key is pressed. Add actions at the bottom of this module, then enter one or more short action IDs for each key, separated by commas. The Action ID is found next to the Action (for example, the Action "[Action 0559689e] Controller: Activate" has an Action ID of 0559689e. When entering Action ID(s), separate multiple IDs by commas (for example, "asdf1234" or "asdf1234,qwer5678,zxcv0987"). Actions will be executed in the order they are entered in the text string. Enter Action IDs to execute those actions when the key is pressed. If enable Toggling Actions, every other key press will execute Actions listed in Toggled Action IDs. The LED color of the key before being pressed, after being pressed, and while the last action is running. Color is an RGB string, with 0-255 for each color. For example, red is "255, 0, 0" and blue is "0, 0, 255".

OptionTypeDescription
I2C AddressText - Default Value: 0x30
I2C BusInteger - Default Value: 1
LED Brightness (0.0-1.0)Decimal - Default Value: 0.2The brightness of the LEDs
LED Flash Period (Seconds)Decimal - Default Value: 1.0Set the period if the LED begins flashing
Channel Options
NameTextA name to distinguish this from others
LED Delay (Seconds)Decimal - Default Value: 1.5How long to leave the LED on after the last action executes.
Action ID(s)TextSet which action(s) execute when the key is pressed. Enter one or more Action IDs, separated by commas
Enable Toggling ActionsBooleanAlternate between executing two sets of Actions
Toggled Action ID(s)TextSet which action(s) execute when the key is pressed on even presses. Enter one or more Action IDs, separated by commas
Resting LED Color (RGB)Text - Default Value: 0, 0, 0The RGB color while no actions are running (e.g 10, 0, 0)
Actions Running LED Color: (RGB)Text - Default Value: 0, 255, 0The RGB color while all but the last action is running (e.g 10, 0, 0)
Last Action LED Color (RGB)Text - Default Value: 0, 0, 255The RGB color while the last action is running (e.g 10, 0, 0)
Shutdown LED Color (RGB)Text - Default Value: 0, 0, 0The RGB color when the Function is disabled (e.g 10, 0, 0)

PID Autotune~

This function will attempt to perform a PID controller autotune. That is, an output will be powered and the response measured from a sensor several times to calculate the P, I, and D gains. Updates about the operation will be sent to the Daemon log. If the autotune successfully completes, a summary will be sent to the Daemon log as well. Currently, only raising a Measurement is supported, but lowering should be possible with some modification to the function controller code. It is recommended to create a graph on a dashboard with the Measurement and Output to monitor that the Output is successfully raising the Measurement beyond the Setpoint. Note: Autotune is an experimental feature, it is not well-developed, and it has a high likelihood of failing to generate PID gains. Do not rely on it for accurately tuning your PID controller.

OptionTypeDescription
MeasurementSelect Measurement (Input, Function)Select a measurement the selected output will affect
OutputSelect Device, Measurement, and Channel (Output)Select an output to modulate that will affect the measurement
PeriodInteger - Default Value: 30The period between powering the output
SetpointDecimal - Default Value: 50A value sufficiently far from the current measured value that the output is capable of pushing the measurement toward
Noise BandDecimal - Default Value: 0.5The amount above the setpoint the measurement must reach
OutstepDecimal - Default Value: 10How many seconds the output will turn on every Period
Currently, only autotuning to raise a condition (measurement) is supported.
DirectionSelect(Options: [Raise] (Default in bold)The direction the Output will push the Measurement

Redundancy~

This function stores the first available measurement. This is useful if you have multiple sensors that you want to serve as backups in case one stops working, you can set them up in the order of importance. This function will check if a measurement exits, starting with the first measurement. If it doesn't, the next is checked, until a measurement is found. Once a measurement is found, it is stored in the database with the user-set measurement and unit. The output of this function can be used as an input throughout Mycodo. If you need more than 3 measurements to be checked, you can string multiple Redundancy Functions by creating a second Function and setting the first Function's output as the second Function's input.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement ASelect Measurement (Input, Function)Measurement to replace a
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement BSelect Measurement (Input, Function)Measurement to replace b
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement CSelect Measurement (Input, Function)Measurement to replace C
Measurement C: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Regulate pH and Electrical Conductivity~

This function regulates pH with 2 pumps (acid and base solutions) and electrical conductivity (EC) with up to 4 pumps (nutrient solutions A, B, C, and D). Set only the nutrient solution outputs you want to use. Any outputs not set will not dispense when EC is being adjusted, allowing as few as 1 pump or as many as 4 pumps. Outputs can be instructed to turn on for durations (seconds) or volumes (ml). Set each Output Type to the correct type for each selected Output Channel (only select on/off Output Channels for durations and volume Output Channels for volumes). The ratio of nutrient solutions being dispensed is defined by the duration or volume set for each EC output.
If an e-mail address (or multiple addresses separated by commas) is entered into the E-Mail Notification field, a notification e-mail will be sent if 1) pH is outside the set danger range, 2) EC is too high and water needs to be added to the reservoir, or 3) a measurement could not be found in the database for the specific Max Age. Each e-mail notification type has its own timer that prevents e-mail spam, and will only allow sending for each notification type every set E-Mail Timer Duration. After this duration, the timer will automatically reset to allow new notifications to be sent. You may also manually reset e-mail timers at any time with the Custom Commands, below.
When the Function is active, Status text will appear below indicating the regulation information and total duration/volume for each output.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 300The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Status Period (seconds)Integer - Default Value: 60The duration (seconds) to update the Function status on the UI
Measurement Options
pH MeasurementSelect Measurement (Input, Function)Measurement from the pH input
pH: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
EC MeasurementSelect Measurement (Input, Function)Measurement from the EC input
Electrical Conductivity: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Output Options
Output: pH Dose Raise (Base)Select Channel (Output_Channels)Select an output to raise the pH
Output: pH Dose Lower (Acid)Select Channel (Output_Channels)Select an output to lower the pH
pH Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
pH Output AmountDecimal - Default Value: 2.0The amount to send to the pH dosing pumps (duration or volume)
Output: EC Dose Nutrient ASelect Channel (Output_Channels)Select an output to dose nutrient A
Nutrient A Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient A Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient A dosing pump (duration or volume)
Output: EC Dose Nutrient BSelect Channel (Output_Channels)Select an output to dose nutrient B
Nutrient B Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient B Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient B dosing pump (duration or volume)
Output: EC Dose Nutrient CSelect Channel (Output_Channels)Select an output to dose nutrient C
Nutrient C Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient C Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient C dosing pump (duration or volume)
Output: EC Dose Nutrient DSelect Channel (Output_Channels)Select an output to dose nutrient D
Nutrient D Output TypeSelect(Options: [Duration (seconds) | Volume (ml)] (Default in bold)Select the output type for the selected Output Channel
Nutrient D Output AmountDecimal - Default Value: 2.0The amount to send to the Nutrient D dosing pump (duration or volume)
Setpoint Options
pH SetpointDecimal - Default Value: 5.85The desired pH setpoint
pH HysteresisDecimal - Default Value: 0.35The hysteresis to determine the pH range
EC SetpointDecimal - Default Value: 150.0The desired electrical conductivity setpoint
EC HysteresisDecimal - Default Value: 50.0The hysteresis to determine the EC range
pH Danger Range (High Value)Decimal - Default Value: 7.0This high pH value for the danger range
pH Danger Range (Low Value)Decimal - Default Value: 5.0This low pH value for the danger range
Alert Notification Options
Notification E-MailTextE-mail to notify when there is an issue (blank to disable)
E-Mail Timer Duration (Hours)Decimal - Default Value: 12.0How long to wait between sending e-mail notifications
Commands
Each e-mail notification timer can be manually reset before the expiration.
Reset EC E-mail TimerButton
Reset pH E-mail TimerButton
Reset Measurement Issue E-mail TimerButton
Reset All E-Mail TimersButton
Each total duration and volume can be manually reset.
Reset All TotalsButton
Reset Total Raise pH DurationButton
Reset Total Lower pH DurationButton
Reset Total Raise pH VolumeButton
Reset Total Lower pH VolumeButton
Reset Total EC A DurationButton
Reset Total EC A VolumeButton
Reset Total EC B DurationButton
Reset Total EC B VolumeButton
Reset Total EC C DurationButton
Reset Total EC C VolumeButton
Reset Total EC D DurationButton
Reset Total EC D VolumeButton

Spacer~

A spacer to organize Functions.

OptionTypeDescription
ColorText - Default Value: #000000The color of the name text

Statistics (Last, Multiple)~

This function acquires multiple measurements, calculates statistics, and stores the resulting values as the selected unit.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementMeasurements to perform statistics on
Halt on Missing MeasurementBooleanDon't calculate statistics if >= 1 measurement is not found within Max Age

Statistics (Past, Single)~

This function acquires multiple values from a single measurement, calculates statistics, and stores the resulting values as the selected unit.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementSelect Measurement (Input, Function)Measurement to perform statistics on

Sum (Last, Multiple)~

This function acquires the last measurement of those that are selected, sums them, then stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
MeasurementMeasurement to replace "x" in the equation

Sum (Past, Single)~

This function acquires the past measurements (within Max Age) for the selected measurement, sums them, then stores the resulting value as the selected measurement and unit.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
MeasurementSelect Measurement (Input, Function, Output)Measurement to replace "x" in the equation
Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Vapor Pressure Deficit~

This function calculates the vapor pressure deficit based on leaf temperature and humidity.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Start Offset (Seconds)Integer - Default Value: 10The duration to wait before the first operation
TemperatureSelect Measurement (Input, Function)Temperature measurement
Temperature: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
HumiditySelect Measurement (Input, Function)Humidity measurement
Humidity: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use

Verification~

This function acquires 2 measurements, calculates the difference, and if the difference is not larger than the set threshold, the Measurement A value is stored. This enables verifying one sensor's measurement with another sensor's measurement. Only when they are both in agreement is a measurement stored. This stored measurement can be used in functions such as Conditional Functions that will notify the user if no measurement is available to indicate there may be an issue with a sensor.

OptionTypeDescription
Period (Seconds)Decimal - Default Value: 60The duration between measurements or actions
Measurement ASelect Measurement (Input, Function)Measurement A
Measurement A: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Measurement BSelect Measurement (Input, Function)Measurement B
Measurement B: Max Age (Seconds)Integer - Default Value: 360The maximum age of the measurement to use
Maximum DifferenceDecimal - Default Value: 10.0The maximum allowed difference between the measurements
Average MeasurementsBooleanStore the average of the measurements in the database
\ No newline at end of file diff --git a/Supported-Inputs-By-Measurement/index.html b/Supported-Inputs-By-Measurement/index.html index 62df74abf..409361b6e 100644 --- a/Supported-Inputs-By-Measurement/index.html +++ b/Supported-Inputs-By-Measurement/index.html @@ -1 +1 @@ - Inputs Sorted by Measurement - Mycodo
Skip to content

Inputs Sorted by Measurement

Measurements

Acceleration~

Ruuvi: RuuviTag~

Acceleration (X)~

Analog Devices: ADXL34x (343, 344, 345, 346)~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Acceleration (Y)~

Analog Devices: ADXL34x (343, 344, 345, 346)~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Acceleration (Z)~

Analog Devices: ADXL34x (343, 344, 345, 346)~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

ADC~

AMS: AS7262~

Altitude~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

BOSCH: BMP180~

BOSCH: BMP280 (Adafruit_GPIO)~

BOSCH: BMP280 (bmp280-python)~

Senseair: K96~

Angle~

Raspberry Pi Foundation: Sense HAT~

Battery~

Ruuvi: RuuviTag~

Sensorion: SHT31 Smart Gadget~

Xiaomi: Miflora~

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

Boolean~

Mycodo: Output State (On/Off)~

Mycodo: Server Ping~

Mycodo: Server Port Open~

Carbon Dioxide~

AMS: CCS811 (with Temperature)~

AMS: CCS811 (without Temperature)~

Atlas Scientific: Atlas CO2 (Carbon Dioxide Gas)~

CO2Meter: K30~

Cozir: Cozir CO2~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Winsen: MH-Z14A~

Winsen: MH-Z16~

Winsen: MH-Z19~

Winsen: MH-Z19B~

Color (Y)~

Atlas Scientific: Atlas Color~

Color (Blue)~

Atlas Scientific: Atlas Color~

Color (Green)~

Atlas Scientific: Atlas Color~

Color (Red)~

Atlas Scientific: Atlas Color~

Color (x)~

Atlas Scientific: Atlas Color~

Color (y)~

Atlas Scientific: Atlas Color~

CPU Load (15 Minutes)~

Mycodo: CPU Load~

CPU Load (1 Minute)~

Mycodo: CPU Load~

CPU Load (5 Minutes)~

Mycodo: CPU Load~

Dewpoint~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

Atlas Scientific: Atlas Humidity~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Cozir: Cozir CO2~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Direction~

Raspberry Pi Foundation: Sense HAT~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Disk~

Mycodo: Free Space~

Mycodo: System and Mycodo RAM~

Dissolved Oxygen~

Atlas Scientific: Atlas DO~

Duration~

Mycodo: Uptime~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Duty Cycle~

Raspberry Pi: Signal (PWM)~

GPIO Edge~

Raspberry Pi: Edge Detection~

Electrical Conductivity~

AnyLeaf: AnyLeaf EC~

Atlas Scientific: Atlas EC~

Texas Instruments: ADS1115: Generic Analog pH/EC~

Texas Instruments: ADS1256: Generic Analog pH/EC~

Xiaomi: Miflora~

Electrical Current~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Texas Instruments: INA219x~

Electrical Potential~

Microchip: MCP3008 (Adafruit_CircuitPython_MCP3xxx)~

Microchip: MCP3008 (Adafruit_MCP3008)~

Microchip: MCP3208~

Microchip: MCP342x (x=2,3,4,6,7,8)~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Texas Instruments: ADS1015~

Texas Instruments: ADS1115~

Texas Instruments: ADS1256: Generic Analog pH/EC~

Texas Instruments: ADS1256~

Texas Instruments: ADS1x15~

Texas Instruments: INA219x~

Energy~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Frequency~

Raspberry Pi: Signal (PWM)~

GPIO State~

Raspberry Pi: GPIO State~

Humidity~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

ASAIR: AHTx0~

Atlas Scientific: Atlas Humidity~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Cozir: Cozir CO2~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

Ion Concentration~

AnyLeaf: AnyLeaf pH~

Atlas Scientific: Atlas pH~

Texas Instruments: ADS1115: Generic Analog pH/EC~

Texas Instruments: ADS1256: Generic Analog pH/EC~

Length~

Atlas Scientific: Atlas Color~

Multiple Manufacturers: HC-SR04~

STMicroelectronics: VL53L0X~

STMicroelectronics: VL53L1X~

STMicroelectronics: VL53L4CD~

Silicon Labs: SI1145~

Light~

AMS: TSL2561~

AMS: TSL2591~

Atlas Scientific: Atlas Color~

Catnip Electronics: Chirp~

ROHM: BH1750~

Silicon Labs: SI1145~

Xiaomi: Miflora~

ams: AS7341~

Magnetic Flux Density~

Melexis: MLX90393~

Raspberry Pi Foundation: Sense HAT~

Methane~

Senseair: K96~

Moisture~

Adafruit: I2C Capacitive Moisture Sensor~

Catnip Electronics: Chirp~

Xiaomi: Miflora~

Oxygen~

Atlas Scientific: Atlas O2 (Oxygen Gas)~

Oxidation Reduction Potential~

AnyLeaf: AnyLeaf ORP~

Atlas Scientific: Atlas ORP~

PM10~

Winsen: ZH03B~

PM1~

Winsen: ZH03B~

PM2.5~

Winsen: ZH03B~

Power~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Apparent Power~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Power Factor~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Reactive Power~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Pressure~

Atlas Scientific: Atlas Pressure~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

BOSCH: BMP180~

BOSCH: BMP280 (Adafruit_GPIO)~

BOSCH: BMP280 (bmp280-python)~

Infineon: DPS310~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Senseair: K96~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Pulse Width~

Raspberry Pi: Signal (PWM)~

Volume Flow Rate~

Atlas Scientific: Atlas Flow Meter~

Generic: Hall Flow Meter~

Resistance~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Revolutions~

Raspberry Pi: Signal (Revolutions) (pigpio method #1)~

Raspberry Pi: Signal (Revolutions) (pigpio method #2)~

Salinity~

Atlas Scientific: Atlas EC~

Specific Gravity~

Atlas Scientific: Atlas EC~

Speed~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Temperature~

AMS: CCS811 (with Temperature)~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

ASAIR: AHTx0~

Adafruit: I2C Capacitive Moisture Sensor~

Analog Devices: ADT7410~

Atlas Scientific: Atlas Humidity~

Atlas Scientific: Atlas PT-1000~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

BOSCH: BMP180~

BOSCH: BMP280 (Adafruit_GPIO)~

BOSCH: BMP280 (bmp280-python)~

Catnip Electronics: Chirp~

Cozir: Cozir CO2~

Infineon: DPS310~

MAXIM: DS1822~

MAXIM: DS1825~

MAXIM: DS18B20 (ow-shell)~

MAXIM: DS18B20 (w1thermsensor)~

MAXIM: DS18S20~

MAXIM: DS28EA00~

MAXIM: MAX31850K~

MAXIM: MAX31855 (Gravity PT100) (smbus2)~

MAXIM: MAX31855 (Gravity PT100) (wiringpi)~

MAXIM: MAX31855 (Adafruit_MAX31855)~

MAXIM: MAX31855 (adafruit-circuitpython-max31855)~

MAXIM: MAX31856~

MAXIM: MAX31865 (Adafruit-CircuitPython-MAX31865)~

MAXIM: MAX31865 (RPi.GPIO)~

Melexis: MLX90614~

Microchip: MCP9808~

Panasonic: AMG8833~

Raspberry Pi Foundation: Sense HAT~

Raspberry Pi: CPU/GPU Temperature~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

Sonoff: TH16/10 (Tasmota firmware) with DS18B20~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Texas Instruments: TMP006~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Xiaomi: Miflora~

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

Total Dissolved Solids~

Atlas Scientific: Atlas EC~

Vapor Pressure Deficit~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Version~

Mycodo: Mycodo Version~

VOC~

AMS: CCS811 (with Temperature)~

AMS: CCS811 (without Temperature)~

Volume~

Atlas Scientific: Atlas Flow Meter~

Generic: Hall Flow Meter~

\ No newline at end of file + Inputs Sorted by Measurement - Mycodo
Skip to content

Inputs Sorted by Measurement

Measurements

Acceleration~

Ruuvi: RuuviTag~

Acceleration (X)~

Analog Devices: ADXL34x (343, 344, 345, 346)~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Acceleration (Y)~

Analog Devices: ADXL34x (343, 344, 345, 346)~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Acceleration (Z)~

Analog Devices: ADXL34x (343, 344, 345, 346)~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

ADC~

AMS: AS7262~

Altitude~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

BOSCH: BMP180~

BOSCH: BMP280 (Adafruit_GPIO)~

BOSCH: BMP280 (bmp280-python)~

Senseair: K96~

Angle~

Raspberry Pi Foundation: Sense HAT~

Battery~

Ruuvi: RuuviTag~

Sensorion: SHT31 Smart Gadget~

Xiaomi: Miflora~

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

Boolean~

Mycodo: Output State (On/Off)~

Mycodo: Server Ping~

Mycodo: Server Port Open~

Carbon Dioxide~

AMS: CCS811 (with Temperature)~

AMS: CCS811 (without Temperature)~

Atlas Scientific: Atlas CO2 (Carbon Dioxide Gas)~

CO2Meter: K30~

Cozir: Cozir CO2~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Winsen: MH-Z14A~

Winsen: MH-Z16~

Winsen: MH-Z19~

Winsen: MH-Z19B~

Color (Y)~

Atlas Scientific: Atlas Color~

Color (Blue)~

Atlas Scientific: Atlas Color~

Color (Green)~

Atlas Scientific: Atlas Color~

Color (Red)~

Atlas Scientific: Atlas Color~

Color (x)~

Atlas Scientific: Atlas Color~

Color (y)~

Atlas Scientific: Atlas Color~

CPU Load (15 Minutes)~

Mycodo: CPU Load~

CPU Load (1 Minute)~

Mycodo: CPU Load~

CPU Load (5 Minutes)~

Mycodo: CPU Load~

Dewpoint~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

Atlas Scientific: Atlas Humidity~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Cozir: Cozir CO2~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Direction~

Raspberry Pi Foundation: Sense HAT~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Disk~

Mycodo: Free Space~

Mycodo: System and Mycodo RAM~

Dissolved Oxygen~

Atlas Scientific: Atlas DO~

Duration~

Mycodo: Uptime~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Duty Cycle~

Raspberry Pi: Signal (PWM)~

GPIO Edge~

Raspberry Pi: Edge Detection~

Electrical Conductivity~

AnyLeaf: AnyLeaf EC~

Atlas Scientific: Atlas EC~

Texas Instruments: ADS1115: Generic Analog pH/EC~

Texas Instruments: ADS1256: Generic Analog pH/EC~

Xiaomi: Miflora~

Electrical Current~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Texas Instruments: INA219x~

Electrical Potential~

Microchip: MCP3008 (Adafruit_CircuitPython_MCP3xxx)~

Microchip: MCP3008 (Adafruit_MCP3008)~

Microchip: MCP3208~

Microchip: MCP342x (x=2,3,4,6,7,8)~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Texas Instruments: ADS1015~

Texas Instruments: ADS1115~

Texas Instruments: ADS1256: Generic Analog pH/EC~

Texas Instruments: ADS1256~

Texas Instruments: ADS1x15~

Texas Instruments: INA219x~

Energy~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Frequency~

Raspberry Pi: Signal (PWM)~

GPIO State~

Raspberry Pi: GPIO State~

Humidity~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

ASAIR: AHTx0~

Atlas Scientific: Atlas Humidity~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Cozir: Cozir CO2~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

Ion Concentration~

AnyLeaf: AnyLeaf pH~

Atlas Scientific: Atlas pH~

Texas Instruments: ADS1115: Generic Analog pH/EC~

Texas Instruments: ADS1256: Generic Analog pH/EC~

Length~

Atlas Scientific: Atlas Color~

Multiple Manufacturers: HC-SR04~

STMicroelectronics: VL53L0X~

STMicroelectronics: VL53L1X~

STMicroelectronics: VL53L4CD~

Silicon Labs: SI1145~

Light~

AMS: TSL2561~

AMS: TSL2591~

Atlas Scientific: Atlas Color~

Catnip Electronics: Chirp~

ROHM: BH1750~

Silicon Labs: SI1145~

Xiaomi: Miflora~

ams: AS7341~

Magnetic Flux Density~

Melexis: MLX90393~

Raspberry Pi Foundation: Sense HAT~

Methane~

Senseair: K96~

Moisture~

Adafruit: I2C Capacitive Moisture Sensor~

Catnip Electronics: Chirp~

Xiaomi: Miflora~

Oxygen~

Atlas Scientific: Atlas O2 (Oxygen Gas)~

Oxidation Reduction Potential~

AnyLeaf: AnyLeaf ORP~

Atlas Scientific: Atlas ORP~

PM10~

Winsen: ZH03B~

PM1~

Winsen: ZH03B~

PM2.5~

Winsen: ZH03B~

Power~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Apparent Power~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Power Factor~

Power Monitor: RPi Power Monitor (6 Channels)~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Reactive Power~

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

Pressure~

Atlas Scientific: Atlas Pressure~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

BOSCH: BMP180~

BOSCH: BMP280 (Adafruit_GPIO)~

BOSCH: BMP280 (bmp280-python)~

Infineon: DPS310~

Raspberry Pi Foundation: Sense HAT~

Ruuvi: RuuviTag~

Senseair: K96~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Pulse Width~

Raspberry Pi: Signal (PWM)~

Volume Flow Rate~

Atlas Scientific: Atlas Flow Meter~

Generic: Hall Flow Meter~

Resistance~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Revolutions~

Raspberry Pi: Signal (Revolutions) (pigpio method #1)~

Raspberry Pi: Signal (Revolutions) (pigpio method #2)~

Salinity~

Atlas Scientific: Atlas EC~

Specific Gravity~

Atlas Scientific: Atlas EC~

Speed~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Temperature~

AMS: CCS811 (with Temperature)~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

ASAIR: AHTx0~

Adafruit: I2C Capacitive Moisture Sensor~

Analog Devices: ADT7410~

Atlas Scientific: Atlas Humidity~

Atlas Scientific: Atlas PT-1000~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

BOSCH: BMP180~

BOSCH: BMP280 (Adafruit_GPIO)~

BOSCH: BMP280 (bmp280-python)~

Catnip Electronics: Chirp~

Cozir: Cozir CO2~

Infineon: DPS310~

MAXIM: DS1822~

MAXIM: DS1825~

MAXIM: DS18B20 (ow-shell)~

MAXIM: DS18B20 (w1thermsensor)~

MAXIM: DS18S20~

MAXIM: DS28EA00~

MAXIM: MAX31850K~

MAXIM: MAX31855 (Gravity PT100) (smbus2)~

MAXIM: MAX31855 (Gravity PT100) (wiringpi)~

MAXIM: MAX31855 (Adafruit_MAX31855)~

MAXIM: MAX31855 (adafruit-circuitpython-max31855)~

MAXIM: MAX31856~

MAXIM: MAX31865 (Adafruit-CircuitPython-MAX31865)~

MAXIM: MAX31865 (RPi.GPIO)~

Melexis: MLX90614~

Microchip: MCP9808~

Panasonic: AMG8833~

Raspberry Pi Foundation: Sense HAT~

Raspberry Pi: CPU/GPU Temperature~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

Sonoff: TH16/10 (Tasmota firmware) with DS18B20~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Texas Instruments: TMP006~

Weather: OpenWeatherMap (City, Current)~

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

Xiaomi: Miflora~

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

Total Dissolved Solids~

Atlas Scientific: Atlas EC~

Vapor Pressure Deficit~

AOSONG: AM2315/AM2320~

AOSONG: DHT11~

AOSONG: DHT20~

AOSONG: DHT22~

BOSCH: BME280 (Adafruit_BME280)~

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

BOSCH: BME280 (RPi.bme280)~

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

BOSCH: BME680 (bme680)~

Ruuvi: RuuviTag~

Seeedstudio: DHT11/22~

Senseair: K96~

Sensirion: SCD-4x (40, 41)~

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

Sensirion: SCD30 (scd30_i2c)~

Sensirion: SHT1x/7x~

Sensirion: SHT2x (sht20)~

Sensirion: SHT2x (smbus2)~

Sensirion: SHT31-D~

Sensirion: SHT3x (30, 31, 35)~

Sensirion: SHT4X~

Sensirion: SHTC3~

Sensorion: SHT31 Smart Gadget~

Silicon Labs: Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

TE Connectivity: HTU21D (pigpio)~

Texas Instruments: HDC1000~

Version~

Mycodo: Mycodo Version~

VOC~

AMS: CCS811 (with Temperature)~

AMS: CCS811 (without Temperature)~

Volume~

Atlas Scientific: Atlas Flow Meter~

Generic: Hall Flow Meter~

\ No newline at end of file diff --git a/Supported-Inputs/index.html b/Supported-Inputs/index.html index 934731d6f..88d1ea282 100644 --- a/Supported-Inputs/index.html +++ b/Supported-Inputs/index.html @@ -1 +1 @@ - Supported Inputs - Mycodo
Skip to content

Supported Inputs

Built-In Inputs (System)~

Linux: Bash Command~

  • Manufacturer: Linux
  • Measurements: Return Value
  • Interfaces: Mycodo

This Input will execute a command in the shell and store the output as a float value. Perform any unit conversions within your script or command. A measurement/unit is required to be selected.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Command TimeoutInteger - Default Value: 60How long to wait for the command to finish before killing the process.
UserText - Default Value: mycodoThe user to execute the command
Current Working DirectoryText - Default Value: /home/piThe current working directory of the shell environment.

Linux: Python 3 Code (v1.0)~

  • Manufacturer: Linux
  • Measurements: Store Value(s)
  • Interfaces: Mycodo
  • Dependencies: pylint

All channels require a Measurement Unit to be selected and saved in order to store values to the database. Your code is executed from the same Python virtual environment that Mycodo runs from. Therefore, you must install Python libraries to this environment if you want them to be available to your code. This virtualenv is located at /opt/Mycodo/env and if you wanted to install a library, for example "my_library" using pip, you would execute "sudo /opt/Mycodo/env/bin/pip install my_library".

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving

Linux: Python 3 Code (v2.0)~

  • Manufacturer: Linux
  • Measurements: Store Value(s)
  • Interfaces: Mycodo
  • Dependencies: pylint

This is an alternate Python 3 Code Input that uses a different method for storing values to the database. This was created because the Python 3 Code v1.0 Input does not allow the use of Input Actions. This method does allow the use of Input Actions. (11/21/2023 Update: The Python 3 Code (v1.0) Input now allows the execution of Actions). All channels require a Measurement Unit to be selected and saved in order to store values to the database. Your code is executed from the same Python virtual environment that Mycodo runs from. Therefore, you must install Python libraries to this environment if you want them to be available to your code. This virtualenv is located at /opt/Mycodo/env and if you wanted to install a library, for example "my_library" using pip, you would execute "sudo /opt/Mycodo/env/bin/pip install my_library".

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Python 3 CodeThe code to execute. Must return a value.
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving

Mycodo: CPU Load~

  • Manufacturer: Mycodo
  • Measurements: CPULoad
  • Libraries: os.getloadavg()
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions

Mycodo: Free Space~

  • Manufacturer: Mycodo
  • Measurements: Unallocated Disk Space
  • Libraries: os.statvfs()
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions

Mycodo: Mycodo Version~

  • Manufacturer: Mycodo
  • Measurements: Version as Major.Minor.Revision
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions

Mycodo: Output State (On/Off)~

  • Manufacturer: Mycodo
  • Measurements: Boolean

This Input stores a 0 (off) or 1 (on) for the selected On/Off Output.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
On/Off Output ChannelSelect Channel (Output_Channels)Select an output to measure

Mycodo: Server Ping~

  • Manufacturer: Mycodo
  • Measurements: Boolean
  • Libraries: ping

This Input executes the bash command "ping -c [times] -w [deadline] [host]" to determine if the host can be pinged.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Mycodo: Server Port Open~

  • Manufacturer: Mycodo
  • Measurements: Boolean
  • Libraries: nc

This Input executes the bash command "nc -zv [host] [port]" to determine if the host at a particular port is accessible.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Mycodo: Spacer~

  • Manufacturer: Mycodo

A spacer to organize Inputs.

OptionTypeDescription
ColorText - Default Value: #000000The color of the name text

Mycodo: System and Mycodo RAM~

  • Manufacturer: Mycodo
  • Measurements: RAM Allocation
  • Libraries: psutil, resource.getrusage()
  • Dependencies: psutil
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Mycodo Frontend RAM EndpointText - Default Value: https://127.0.0.1/ramThe endpoint to get Mycodo frontend ram usage

Mycodo: Test Input: Save your own measurement value~

  • Manufacturer: Mycodo
  • Measurements: Variable measurements

This is a simple test Input that allows you to save any value as a measurement, that will be stored in the measurement database. It can be useful for testing other parts of Mycodo, such as PIDs, Bang-Bang, and Conditional Functions, since you can be completely in control of what values the input provides to the Functions. Note 1: Select and save the Name and Measurement Unit for each channel. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Note 2: Activate the Input before storing measurements.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Channel Options
NameTextA name to distinguish this from others
Commands
Enter the Value you want to store as a measurement, then press Store Measurement.
ChannelIntegerThis is the channel to save the measurement value to
ValueDecimal - Default Value: 10.0This is the measurement value to save for this Input
Store MeasurementButton

Mycodo: Uptime~

  • Manufacturer: Mycodo
  • Measurements: Seconds Since System Startup
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions

Raspberry Pi: CPU/GPU Temperature~

  • Manufacturer: Raspberry Pi
  • Measurements: Temperature
  • Interfaces: RPi

The internal CPU and GPU temperature of the Raspberry Pi.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Path for CPU TemperatureText - Default Value: /sys/class/thermal/thermal_zone0/tempReads the CPU temperature from this file
Path to vcgencmdText - Default Value: /usr/bin/vcgencmdReads the GPU from vcgencmd

Raspberry Pi: Edge Detection~

  • Manufacturer: Raspberry Pi
  • Measurements: Rising/Falling Edge
  • Interfaces: GPIO
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
OptionTypeDescription
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pin ModeSelect(Options: [Floating | Pull Down | Pull Up] (Default in bold)Enables or disables the pull-up or pull-down resistor

Raspberry Pi: GPIO State~

  • Manufacturer: Raspberry Pi
  • Measurements: GPIO State
  • Interfaces: GPIO
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO

Measures the state of a GPIO pin, returning either 0 (low) or 1 (high).

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pin ModeSelect(Options: [Floating | Pull Down | Pull Up] (Default in bold)Enables or disables the pull-up or pull-down resistor

Raspberry Pi: Signal (PWM)~

  • Manufacturer: Raspberry Pi
  • Measurements: Frequency/Pulse Width/Duty Cycle
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Raspberry Pi: Signal (Revolutions) (pigpio method #1)~

  • Manufacturer: Raspberry Pi
  • Measurements: RPM
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio

This calculates RPM from pulses on a pin using pigpio, but has been found to be less accurate than the method #2 module. This is typically used to measure the speed of a fan from a tachometer pin, however this can be used to measure any 3.3-volt pulses from a wire. Use a resistor to pull the measurement pin to 3.3 volts, set pigpio to the lowest latency (1 ms) on the Configure -> Raspberry Pi page. Note 1: Not setting pigpio to the lowest latency will hinder accuracy. Note 2: accuracy decreases as RPM increases.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Raspberry Pi: Signal (Revolutions) (pigpio method #2)~

  • Manufacturer: Raspberry Pi
  • Measurements: RPM
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio

This is an alternate method to calculate RPM from pulses on a pin using pigpio, and has been found to be more accurate than the method #1 module. This is typically used to measure the speed of a fan from a tachometer pin, however this can be used to measure any 3.3-volt pulses from a wire. Use a resistor to pull the measurement pin to 3.3 volts, set pigpio to the lowest latency (1 ms) on the Configure -> Raspberry Pi page. Note 1: Not setting pigpio to the lowest latency will hinder accuracy. Note 2: accuracy decreases as RPM increases.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pin: GPIO (BCM)IntegerThe pin to measure pulses from
Sample Time (Seconds)Decimal - Default Value: 5.0The duration of time to sample
Pulses Per RevDecimal - Default Value: 15.8The number of pulses per revolution to calculate revolutions per minute (RPM)

Built-In Inputs (Devices)~

AMS: AS7262~

  • Manufacturer: AMS
  • Measurements: Light at 450, 500, 550, 570, 600, 650 nm
  • Interfaces: I2C
  • Libraries: as7262
  • Dependencies: as7262
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
GainSelect(Options: [1x | 3.7x | 16x | 64x] (Default in bold)Set the sensor gain
Illumination LED CurrentSelect(Options: [12.5 mA | 25 mA | 50 mA | 100 mA] (Default in bold)Set the illumination LED current (milliamps)
Illumination LED ModeSelect(Options: [On | Off] (Default in bold)Turn the illumination LED on or off during a measurement
Indicator LED CurrentSelect(Options: [1 mA | 2 mA | 4 mA | 8 mA] (Default in bold)Set the indicator LED current (milliamps)
Indicator LED ModeSelect(Options: [On | Off] (Default in bold)Turn the indicator LED on or off during a measurement
Integration TimeDecimal - Default Value: 15.0The integration time (0 - ~91 ms)

AMS: CCS811 (with Temperature)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AMS: CCS811 (without Temperature)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AMS: TSL2561~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AMS: TSL2591~

  • Manufacturer: AMS
  • Measurements: Light
  • Interfaces: I2C
  • Libraries: maxlklaxl/python-tsl2591
  • Dependencies: tsl2591
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: AM2315/AM2320~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: quick2wire-api
  • Dependencies: quick2wire-api
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: DHT11~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: DHT20~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2, Link 3
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: DHT22~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

ASAIR: AHTx0~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Adafruit: I2C Capacitive Moisture Sensor~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Analog Devices: ADT7410~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Analog Devices: ADXL34x (343, 344, 345, 346)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
RangeSelect(Options: [±2 g (±19.6 m/s/s) | ±4 g (±39.2 m/s/s) | ±8 g (±78.4 m/s/s) | ±16 g (±156.9 m/s/s)] (Default in bold)Set the measurement range

AnyLeaf: AnyLeaf EC~

OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Conductivity ConstantDecimal - Default Value: 1.0Conductivity constant K

AnyLeaf: AnyLeaf ORP~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Calibrate: Voltage (Internal)Decimal - Default Value: 0.4Calibration data: internal voltage
Calibrate: ORP (Internal)Decimal - Default Value: 400.0Calibration data: internal ORP
Commands
Calibrate: Buffer ORP (mV)Decimal - Default Value: 400.0This is the nominal ORP of the calibration buffer in mV, usually labelled on the bottle.
CalibrateButton
Clear Calibration SlotsButton

AnyLeaf: AnyLeaf pH~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Cal data: V1 (internal)DecimalCalibration data: Voltage
Cal data: pH1 (internal)Decimal - Default Value: 7.0Calibration data: pH
Cal data: T1 (internal)Decimal - Default Value: 23.0Calibration data: Temperature
Cal data: V2 (internal)Decimal - Default Value: 0.17Calibration data: Voltage
Cal data: pH2 (internal)Decimal - Default Value: 4.0Calibration data: pH
Cal data: T2 (internal)Decimal - Default Value: 23.0Calibration data: Temperature
Cal data: V3 (internal)DecimalCalibration data: Voltage
Cal data: pH3 (internal)DecimalCalibration data: pH
Cal data: T3 (internal)DecimalCalibration data: Temperature
Commands
Calibration buffer pHDecimal - Default Value: 7.0This is the nominal pH of the calibration buffer, usually labelled on the bottle.
Calibrate, slot 1Button
Calibrate, slot 2Button
Calibrate, slot 3Button
Clear Calibration SlotsButton

Atlas Scientific: Atlas CO2 (Carbon Dioxide Gas)~

  • Manufacturer: Atlas Scientific
  • Measurements: CO2
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
A one- or two-point calibration can be performed. After exposing the probe to a concentration of CO2 between 3,000 and 5,000 ppmv until readings stabilize, press Calibrate (High). You can place the probe in a 0 CO2 environment until readings stabilize, then press Calibrate (Zero). You can also clear the currently-saved calibration by pressing Clear Calibration, returning to the factory-set calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
High Point CO2Integer - Default Value: 3000The high CO2 calibration point (3000 - 5000 ppmv)
Calibrate (High)Button
Calibrate (Zero)Button
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x69The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas Color~

  • Manufacturer: Atlas Scientific
  • Measurements: RGB, CIE, LUX, Proximity
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
LED Only For MeasureBoolean - Default Value: TrueTurn the LED on only during the measurement
LED PercentageInteger - Default Value: 30What percentage of power to supply to the LEDs during measurement
Gamma CorrectionDecimal - Default Value: 1.0Gamma correction between 0.01 and 4.99 (default is 1.0)
Commands
The EZO-RGB color sensor is designed to be calibrated to a white object at the maximum brightness the object will be viewed under. In order to get the best results, Atlas Scientific strongly recommends that the sensor is mounted into a fixed location. Holding the sensor in your hand during calibration will decrease performance.
1. Embed the EZO-RGB color sensor into its intended use location.
2. Set LED brightness to the desired level.
3. Place a white object in front of the target object and press the Calibration button.
4. A single color reading will be taken and the device will be fully calibrated.
CalibrateButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x70The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas DO~

  • Manufacturer: Atlas Scientific
  • Measurements: Dissolved Oxygen
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
A one- or two-point calibration can be performed. After exposing the probe to air for 30 seconds until readings stabilize, press Calibrate (Air). If you require accuracy below 1.0 mg/L, you can place the probe in a 0 mg/L solution for 30 to 90 seconds until readings stabilize, then press Calibrate (0 mg/L). You can also clear the currently-saved calibration by pressing Clear Calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Calibrate (Air)Button
Calibrate (0 mg/L)Button
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x66The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas EC~

  • Manufacturer: Atlas Scientific
  • Measurements: Electrical Conductivity
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
Calibration: a one- or two-point calibration can be performed. It's a good idea to clear the calibration before calibrating. Always perform a dry calibration with the probe in the air (not in any fluid). Then perform either a one- or two-point calibration with calibrated solutions. If performing a one-point calibration, use the Single Point Calibration field and button. If performing a two-point calibration, use the Low and High Point Calibration fields and buttons. Allow a minute or two after submerging your probe in a calibration solution for the measurements to equilibrate before calibrating to that solution. The EZO EC circuit default temperature compensation is set to 25 °C. If the temperature of the calibration solution is +/- 2 °C from 25 °C, consider setting the temperature compensation first. Note that at no point should you change the temperature compensation value during calibration. Therefore, if you have previously enabled temperature compensation, allow at least one measurement to occur (to set the compensation value), then disable the temperature compensation measurement while you calibrate. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Clear CalibrationButton
Calibrate DryButton
Single Point EC (µS)Integer - Default Value: 84The EC (µS) of the single point calibration solution
Calibrate Single PointButton
Low Point EC (µS)Integer - Default Value: 12880The EC (µS) of the low point calibration solution
Calibrate Low PointButton
High Point EC (µS)Integer - Default Value: 80000The EC (µS) of the high point calibration solution
Calibrate High PointButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x64The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas Flow Meter~

  • Manufacturer: Atlas Scientific
  • Measurements: Total Volume, Flow Rate
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link

Set the Measurement Time Base to a value most appropriate for your anticipated flow (it will affect accuracy). This flow rate time base that is set and returned from the sensor will be converted to liters per minute, which is the default unit for this input module. If you desire a different rate to be stored in the database (such as liters per second or hour), then use the Convert to Unit option.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Flow Meter TypeSelect(Options: [Atlas Scientific 3/8" Flow Meter | Atlas Scientific 1/4" Flow Meter | Atlas Scientific 1/2" Flow Meter | Atlas Scientific 3/4" Flow Meter | Non-Atlas Scientific Flow Meter] (Default in bold)Set the type of flow meter used
Atlas Meter Time BaseSelect(Options: [Liters per Second | Liters per Minute | Liters per Hour] (Default in bold)If using an Atlas Scientific flow meter, set the flow rate/time base
Internal ResistorSelect(Options: [Use Atlas Scientific Flow Meter | Disable Internal Resistor | 1 K Ω Pull-Up | 1 K Ω Pull-Down | 10 K Ω Pull-Up | 10 K Ω Pull-Down | 100 K Ω Pull-Up | 100 K Ω Pull-Down] (Default in bold)Set an internal resistor for the flow meter
Custom K Value(s)TextIf using a non-Atlas Scientific flow meter, enter the meter's K value(s). For a single K value, enter '[volume per pulse],[number of pulses]'. For multiple K values (up to 16), enter '[volume at frequency],[frequency in Hz];[volume at frequency],[frequency in Hz];...'. Leave blank to disable.
K Value Time BaseSelect(Options: [Use Atlas Scientific Flow Meter | Liters per Second | Liters per Minute | Liters per Hour] (Default in bold)If using a non-Atlas Scientific flow meter, set the flow rate/time base for the custom K values entered.
Commands
The total volume can be cleared with the following button or with the Clear Total Volume Function Action.
Clear Total: VolumeButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x68The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas Humidity~

  • Manufacturer: Atlas Scientific
  • Measurements: Humidity/Temperature
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
LED ModeSelect(Options: [Always On | Always Off | Only On During Measure] (Default in bold)When to turn the LED on
Commands
New I2C AddressText - Default Value: 0x6fThe new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas O2 (Oxygen Gas)~

  • Manufacturer: Atlas Scientific
  • Measurements: O2
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Temperature Compensation: ManualDecimal - Default Value: 20.0If not using a measurement, set the temperature to compensate
LED ModeSelect(Options: [Always On | Always Off | Only On During Measure] (Default in bold)When to turn the LED on
Commands
A one- or two-point calibration can be performed. After exposing the probe to a specific concentration of O2 until readings stabilize, press Calibrate (High). You can place the probe in a 0% O2 environment until readings stabilize, then press Calibrate (Zero). You can also clear the currently-saved calibration by pressing Clear Calibration, returning to the factory-set calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
High Point O2Decimal - Default Value: 20.95The high O2 calibration point (percent)
Calibrate (High)Button
Calibrate (Zero)Button
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x69The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas ORP~

  • Manufacturer: Atlas Scientific
  • Measurements: Oxidation Reduction Potential
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
A one-point calibration can be performed. Enter the solution's mV, set the probe in the solution, then press Calibrate. You can also clear the currently-saved calibration by pressing Clear Calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Calibration Solution mVInteger - Default Value: 225The value of the calibration solution, in mV
CalibrateButton
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x62The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas PT-1000~

  • Manufacturer: Atlas Scientific
  • Measurements: Temperature
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
New I2C AddressText - Default Value: 0x66The new I2C to set the device to
Set I2C AddressButton
Temperature (°C)Decimal - Default Value: 100.0Temperature for single point calibration
CalibrateButton
Clear CalibrationButton

Atlas Scientific: Atlas Pressure~

  • Manufacturer: Atlas Scientific
  • Measurements: Pressure
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
LED ModeSelect(Options: [Always On | Always Off | Only On During Measure] (Default in bold)When to turn the LED on
Commands
New I2C AddressText - Default Value: 0x6aThe new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas pH~

  • Manufacturer: Atlas Scientific
  • Measurements: Ion Concentration
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link

Calibration Measurement is an optional setting that provides a temperature measurement (in Celsius) of the water that the pH is being measured from.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
Calibration: a one-, two- or three-point calibration can be performed. It's a good idea to clear the calibration before calibrating. The first calibration must be the Mid point. The second must be the Low point. And the third must be the High point. You can perform a one-, two- or three-point calibration, but they must be performed in this order. Allow a minute or two after submerging your probe in a calibration solution for the measurements to equilibrate before calibrating to that solution. The EZO pH circuit default temperature compensation is set to 25 °C. If the temperature of the calibration solution is +/- 2 °C from 25 °C, consider setting the temperature compensation first. Note that if you have a Temperature Compensation Measurement selected from the Options, this will overwrite the manual Temperature Compensation set here, so be sure to disable this option if you would like to specify the temperature to compensate with. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Compensation Temperature (°C)Decimal - Default Value: 25.0The temperature of the calibration solutions
Set Temperature CompensationButton
Clear CalibrationButton
Mid Point pHDecimal - Default Value: 7.0The pH of the mid point calibration solution
Calibrate MidButton
Low Point pHDecimal - Default Value: 4.0The pH of the low point calibration solution
Calibrate LowButton
High Point pHDecimal - Default Value: 10.0The pH of the high point calibration solution
Calibrate HighButton
Calibration Export/Import: Export calibration to a series of strings. These can later be imported to restore the calibration. Watch the Daemon Log for the output.
Export CalibrationButton
Calibration StringTextThe calibration string to import
Import CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x63The new I2C to set the device to
Set I2C AddressButton

BOSCH: BME280 (Adafruit_BME280)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BME280 (RPi.bme280)~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Humidity/Temperature
  • Interfaces: I2C
  • Libraries: RPi.bme280
  • Dependencies: RPi.bme280
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Humidity OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Temperature OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Pressure OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
IIR Filter SizeSelect(Options: [0 | 1 | 3 | 7 | 15 | 31 | 63 | 127] (Default in bold)Optionally remove short term fluctuations from the temperature and pressure readings, increasing their resolution but reducing their bandwidth.
Temperature OffsetDecimalThe amount to offset the temperature, either negative or positive
Sea Level Pressure (ha)Decimal - Default Value: 1013.25The pressure at sea level for the sensor location

BOSCH: BME680 (bme680)~

  • Manufacturer: BOSCH
  • Measurements: Temperature/Humidity/Pressure/Gas
  • Interfaces: I2C
  • Libraries: bme680
  • Dependencies: bme680, smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Humidity OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Temperature OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Pressure OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
IIR Filter SizeSelect(Options: [0 | 1 | 3 | 7 | 15 | 31 | 63 | 127] (Default in bold)Optionally remove short term fluctuations from the temperature and pressure readings, increasing their resolution but reducing their bandwidth.
Gas Heater Temperature (°C)Integer - Default Value: 320What temperature to set
Gas Heater Duration (ms)Integer - Default Value: 150How long of a duration to heat. 20-30 ms are necessary for the heater to reach the intended target temperature.
Gas Heater ProfileSelectSelect one of the 10 configured heating durations/set points
Temperature OffsetDecimalThe amount to offset the temperature, either negative or positive

BOSCH: BMP180~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Temperature
  • Interfaces: I2C
  • Libraries: Adafruit_BMP
  • Dependencies: Adafruit-BMP, Adafruit-GPIO
  • Datasheet URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BMP280 (Adafruit_GPIO)~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Temperature
  • Interfaces: I2C
  • Libraries: Adafruit_GPIO
  • Dependencies: Adafruit-GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BMP280 (bmp280-python)~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Temperature
  • Interfaces: I2C
  • Libraries: bmp280-python
  • Dependencies: smbus2, bmp280
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

This is similar to the other BMP280 Input, except it uses a different library, whcih includes the ability to set forced mode.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Enable Forced ModeBooleanEnable heater to evaporate condensation. Turn on heater x seconds every y measurements.

CO2Meter: K30~

  • Manufacturer: CO2Meter
  • Measurements: CO2
  • Interfaces: I2C, UART
  • Libraries: serial (UART)
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Catnip Electronics: Chirp~

  • Manufacturer: Catnip Electronics
  • Measurements: Light/Moisture/Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x20The new I2C to set the device to
Set I2C AddressButton

Cozir: Cozir CO2~

  • Manufacturer: Cozir
  • Measurements: CO2/Humidity/Temperature
  • Interfaces: UART
  • Libraries: pierre-haessig/pycozir
  • Dependencies: cozir
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Generic: Hall Flow Meter~

  • Manufacturer: Generic
  • Measurements: Flow Rate, Total Volume
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pulses per LiterDecimal - Default Value: 1.0Enter the conversion factor for this meter (pulses to Liter).
Commands
Clear Total: VolumeButton

Infineon: DPS310~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: DS1822~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS1825~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS18B20 (ow-shell)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: ow-shell
  • Dependencies: ow-shell, owfs
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2, Link 3
  • Additional URL: Link

Warning: Counterfeit DS18B20 sensors are common and can cause a host of issues. Review the Additional URL for more information about how to determine if your sensor is authentic.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: DS18B20 (w1thermsensor)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2, Link 3
  • Additional URL: Link

Warning: Counterfeit DS18B20 sensors are common and can cause a host of issues. Review the Additional URL for more information about how to determine if your sensor is authentic.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimalThe temperature offset (degrees Celsius) to apply
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS18S20~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS28EA00~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: MAX31850K~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: MAX31855 (Gravity PT100) (smbus2)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31855 (Gravity PT100) (wiringpi)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: I2C
  • Libraries: wiringpi
  • Dependencies: wiringpi
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31855 (Adafruit_MAX31855)~

  • Manufacturer: MAXIM
  • Measurements: Temperature (Object/Die)
  • Interfaces: UART
  • Libraries: Adafruit_MAX31855
  • Dependencies: Adafruit_MAX31855, Adafruit-GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31855 (adafruit-circuitpython-max31855)~

  • Manufacturer: MAXIM
  • Measurements: Temperature (Object/Die)
  • Interfaces: SPI
  • Libraries: adafruit-circuitpython-max31855
  • Dependencies: adafruit-circuitpython-max31855
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Chip Select PinInteger - Default Value: 5Enter the GPIO Chip Select Pin for your device.

MAXIM: MAX31856~

  • Manufacturer: MAXIM
  • Measurements: Temperature (Object/Die)
  • Interfaces: UART
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31865 (Adafruit-CircuitPython-MAX31865)~

This module was added to allow support for multiple sensors to be connected at the same time, which the original MAX31865 module was not designed for.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Chip Select PinInteger - Default Value: 8Enter the GPIO Chip Select Pin for your device.
Number of wiresSelect(Options: [2 Wires | 3 Wires | 4 Wires] (Default in bold)Select the number of wires your thermocouple has.

MAXIM: MAX31865 (RPi.GPIO)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: UART
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Note: This module does not allow for multiple sensors to be connected at the same time. For multi-sensor support, use the MAX31865 CircuitPython Input.

OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MQTT: MQTT Subscribe (JSON payload)~

  • Manufacturer: MQTT
  • Measurements: Variable measurements
  • Interfaces: Mycodo
  • Libraries: paho-mqtt, jmespath
  • Dependencies: paho-mqtt, jmespath

A single topic is subscribed to and the returned JSON payload contains one or more key/value pairs. The given JSON Key is used as a JMESPATH expression to find the corresponding value that will be stored for that channel. Be sure you select and save the Measurement Unit for each channel. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Example expressions for jmespath (https://jmespath.org) include temperature, sensors[0].temperature, and bathroom.temperature which refer to the temperature as a direct key within the first entry of sensors or as a subkey of bathroom, respectively. Jmespath elements and keys that contain special characters have to be enclosed in double quotes, e.g. "sensor-1".temperature. Warning: If using multiple MQTT Inputs or Functions, ensure the Client IDs are unique.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
HostText - Default Value: localhostHost or IP address
PortInteger - Default Value: 1883Host port number
TopicText - Default Value: mqtt/test/inputThe topic to subscribe to
Keep AliveInteger - Default Value: 60Maximum amount of time between received signals. Set to 0 to disable.
Client IDText - Default Value: client_FGIg092mUnique client ID for connecting to the server
Use LoginBooleanSend login credentials
Use TLSBooleanSend login credentials using TLS
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server. Leave blank to disable.
Use WebsocketsBooleanUse websockets to connect to the server.
Channel Options
NameTextA name to distinguish this from others
JMESPATH ExpressionTextJMESPATH expression to find value in JSON response

MQTT: MQTT Subscribe (Value payload)~

  • Manufacturer: MQTT
  • Measurements: Variable measurements
  • Interfaces: Mycodo
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt

A topic is subscribed to for each channel Subscription Topic and the returned payload value will be stored for that channel. Be sure you select and save the Measurement Unit for each of the channels. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Warning: If using multiple MQTT Inputs or Functions, ensure the Client IDs are unique.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
HostText - Default Value: localhostHost or IP address
PortInteger - Default Value: 1883Host port number
Keep AliveInteger - Default Value: 60Maximum amount of time between received signals. Set to 0 to disable.
Client IDText - Default Value: client_mqUgXLvMUnique client ID for connecting to the server
Use LoginBooleanSend login credentials
Use TLSBooleanSend login credentials using TLS
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server. Leave blank to disable.
Use WebsocketsBooleanUse websockets to connect to the server.
Channel Options
NameTextA name to distinguish this from others
Subscription TopicTextThe MQTT topic to subscribe to

Melexis: MLX90393~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Melexis: MLX90614~

  • Manufacturer: Melexis
  • Measurements: Temperature (Ambient/Object)
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Microchip: MCP3008 (Adafruit_CircuitPython_MCP3xxx)~

  • Manufacturer: Microchip
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: UART
  • Libraries: Adafruit_CircuitPython_MCP3xxx
  • Dependencies: adafruit-circuitpython-mcp3xxx
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
VREF (volts)Decimal - Default Value: 3.3Set the VREF voltage

Microchip: MCP3008 (Adafruit_MCP3008)~

  • Manufacturer: Microchip
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: UART
  • Libraries: Adafruit_MCP3008
  • Dependencies: Adafruit-MCP3008
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
VREF (volts)Decimal - Default Value: 3.3Set the VREF voltage

Microchip: MCP3208~

  • Manufacturer: Microchip
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: SPI
  • Libraries: MCP3208
  • Dependencies: Adafruit-GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
SPI BusIntegerThe SPI bus ID.
SPI DeviceIntegerThe SPI device ID.
VREF (volts)Decimal - Default Value: 3.3Set the VREF voltage

Microchip: MCP342x (x=2,3,4,6,7,8)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Microchip: MCP9808~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Multiple Manufacturers: HC-SR04~

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Trigger PinIntegerEnter the GPIO Trigger Pin for your device (BCM numbering).
Echo PinIntegerEnter the GPIO Echo Pin for your device (BCM numbering).

Panasonic: AMG8833~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Power Monitor: RPi Power Monitor (6 Channels)~

  • Manufacturer: Power Monitor
  • Measurements: AC Voltage, Power, Current, Power Factor
  • Libraries: rpi-power-monitor
  • Dependencies: rpi_power_monitor
  • Manufacturer URL: Link
  • Product URL: Link

See https://github.com/David00/rpi-power-monitor/wiki/Calibrating-for-Accuracy for calibration procedures.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Grid VoltageDecimal - Default Value: 124.2The AC voltage measured at the outlet
Transformer VoltageDecimal - Default Value: 10.2The AC voltage measured at the barrel plug of the 9 VAC transformer
CT1 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT1
CT2 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT2
CT3 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT3
CT4 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT4
CT5 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT5
CT6 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT6
CT1 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT1
CT2 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT2
CT3 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT3
CT4 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT4
CT5 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT5
CT6 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT6
AC Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for AC

ROHM: BH1750~

  • Manufacturer: ROHM
  • Measurements: Light
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Raspberry Pi Foundation: Sense HAT~

  • Manufacturer: Raspberry Pi Foundation
  • Measurements: hum/temp/press/compass/magnet/accel/gyro
  • Interfaces: I2C
  • Libraries: sense-hat
  • Dependencies: git, Bash Commands (see Module for details), sense-hat
  • Manufacturer URL: Link

This module acquires measurements from the Raspberry Pi Sense HAT sensors, which include the LPS25H, LSM9DS1, and HTS221.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Ruuvi: RuuviTag~

OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

STMicroelectronics: VL53L0X~

  • Manufacturer: STMicroelectronics
  • Measurements: Millimeter (Time-of-Flight Distance)
  • Interfaces: I2C
  • Libraries: VL53L0X_rasp_python
  • Dependencies: VL53L0X
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
AccuracySelect(Options: [Good Accuracy (33 ms, 1.2 m range) | Better Accuracy (66 ms, 1.2 m range) | Best Accuracy (200 ms, 1.2 m range) | Long Range (33 ms, 2 m) | High Speed, Low Accuracy (20 ms, 1.2 m)] (Default in bold)Set the accuracy. A longer measurement duration yields a more accurate measurement
Commands
New I2C AddressText - Default Value: 0x52The new I2C to set the device to
Set I2C AddressButton

STMicroelectronics: VL53L1X~

  • Manufacturer: STMicroelectronics
  • Measurements: Millimeter (Time-of-Flight Distance)
  • Interfaces: I2C
  • Libraries: VL53L1X
  • Dependencies: smbus2, vl53l1x
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2

Notes when setting a custom timing budget: A higher timing budget results in greater measurement accuracy, but also a higher power consumption. The inter measurement period must be >= the timing budget, otherwise it will be double the expected value.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
RangeSelect(Options: [Short Range | Medium Range | Long Range | Custom Timing Budget] (Default in bold)Select a range or select to set a custom Timing Budget and Inter Measurement Period.
Timing Budget (microseconds)Integer - Default Value: 66000Set the timing budget. Must be less than or equal to the Inter Measurement Period.
Inter Measurement Period (milliseconds)Integer - Default Value: 70Set the Inter Measurement Period

STMicroelectronics: VL53L4CD~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Timing Budget (ms)Integer - Default Value: 50Set the timing budget between 10 to 200 ms. A longer duration yields a more accurate measurement.
Inter-Measurement Period (ms)IntegerValid range between Timing Budget and 5000 ms (0 to disable)
Commands
The I2C address of the sensor can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate the Input and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x29The new I2C to set the device to
Set I2C AddressButton

Seeedstudio: DHT11/22~

Enter the Grove Pi+ GPIO pin connected to the sensor and select the sensor type.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Sensor TypeSelect(Options: [DHT11 (Blue) | DHT22 (White)] (Default in bold)Sensor type

Senseair: K96~

  • Manufacturer: Senseair
  • Measurements: Methane/Moisture/CO2/Pressure/Humidity/Temperature
  • Interfaces: UART
  • Libraries: Serial
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SCD-4x (40, 41)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimal - Default Value: 4.0Set the sensor temperature offset
Altitude (m)IntegerSet the sensor altitude (meters)
Automatic Self-CalibrationBooleanSet the sensor automatic self-calibration
Persist SettingsBoolean - Default Value: TrueSettings will persist after powering off
Commands
You can force the CO2 calibration for a specific CO2 concentration value (in ppmv). The sensor needs to be active for at least 3 minutes prior to calibration.
CO2 Concentration (ppmv)Decimal - Default Value: 400.0Calibrate to this CO2 concentration that the sensor is being exposed to (in ppmv)
Calibrate CO2Button

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
I2C Frequency: The SCD-30 has temperamental I2C with clock stretching. The datasheet recommends starting at 50,000 Hz.
I2C Frequency (Hz)Integer - Default Value: 50000
Automatic Self Ccalibration (ASC): To work correctly, the sensor must be on and active for 7 days after enabling ASC, and exposed to fresh air for at least 1 hour per day. Consult the manufacturer’s documentation for more information.
Enable Automatic Self CalibrationBoolean
Temperature Offset: Specifies the offset to be added to the reported measurements to account for a bias in the measured signal. Must be a positive value, and will reduce the recorded temperature by that amount. Give the sensor adequate time to acclimate after setting this value. Value is in degrees Celsius with a resolution of 0.01 degrees and a maximum value of 655.35 C.
Temperature OffsetDecimal
Ambient Air Pressure (mBar): Specify the ambient air pressure at the measurement location in mBar. Setting this value adjusts the CO2 measurement calculations to account for the air pressure’s effect on readings. Values must be in mBar, from 700 to 1200 mBar.
Ambient Air Pressure (mBar)Integer - Default Value: 1200
Altitude: Specifies the altitude at the measurement location in meters above sea level. Setting this value adjusts the CO2 measurement calculations to account for the air pressure’s effect on readings.
Altitude (m)Integer - Default Value: 100
Commands
A soft reset restores factory default values.
Soft ResetButton
Forced Re-Calibration: The SCD-30 is placed in an environment with a known CO2 concentration, this concentration value is entered in the CO2 Concentration (ppmv) field, then the Foce Calibration button is pressed. But how do you come up with that known value? That is a caveat of this approach and Sensirion suggests three approaches: 1. Using a separate secondary calibrated CO2 sensor to provide the value. 2. Exposing the SCD-30 to a controlled environment with a known value. 3. Exposing the SCD-30 to fresh outside air and using a value of 400 ppm.
CO2 Concentration (ppmv)Integer - Default Value: 800The CO2 concentration of the sensor environment when forcing calibration
Force RecalibrationButton

Sensirion: SCD30 (scd30_i2c)~

  • Manufacturer: Sensirion
  • Measurements: CO2/Humidity/Temperature
  • Interfaces: I2C
  • Libraries: scd30_i2c
  • Dependencies: scd30-i2c
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Automatic Self Ccalibration (ASC): To work correctly, the sensor must be on and active for 7 days after enabling ASC, and exposed to fresh air for at least 1 hour per day. Consult the manufacturer’s documentation for more information.
Enable Automatic Self CalibrationBoolean
Commands
A soft reset restores factory default values.
Soft ResetButton

Sensirion: SHT1x/7x~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: GPIO
  • Libraries: sht_sensor
  • Dependencies: sht-sensor
  • Manufacturer URLs: Link 1, Link 2
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SHT2x (sht20)~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: sht20
  • Dependencies: sht20
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature ResolutionSelect(Options: [11-bit | 12-bit | 13-bit | 14-bit] (Default in bold)The resolution of the temperature measurement

Sensirion: SHT2x (smbus2)~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SHT31-D~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimalThe temperature offset (degrees Celsius) to apply

Sensirion: SHT3x (30, 31, 35)~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: Adafruit_SHT31
  • Dependencies: Adafruit-GPIO, Adafruit-SHT31
  • Manufacturer URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Enable HeaterBooleanEnable heater to evaporate condensation. Turn on heater x seconds every y measurements
Heater On Seconds (Seconds)Decimal - Default Value: 1.0How long to turn the heater on
Heater On PeriodInteger - Default Value: 10After how many measurements to turn the heater on. This will repeat

Sensirion: SHT4X~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SHTC3~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensorion: SHT31 Smart Gadget~

OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Download Stored DataBoolean - Default Value: TrueDownload the data logged to the device.
Set Logging Interval (Seconds)Integer - Default Value: 600Set the logging interval the device will store measurements on its internal memory.

Silicon Labs: SI1145~

  • Manufacturer: Silicon Labs
  • Measurements: Light (UV/Visible/IR), Proximity (cm)
  • Interfaces: I2C
  • Libraries: si1145
  • Dependencies: SI1145
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Silicon Labs: Si7021~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

  • Manufacturer: Sonoff
  • Measurements: Humidity/Temperature
  • Libraries: requests
  • Dependencies: requests
  • Manufacturer URL: Link

This Input module allows the use of any temperature/humidity sensor with the TH10/TH16. Changing the Sensor Name option changes the key that's queried from the returned dictionary of measurements. If you would like to use this module with a version of this device that uses the AM2301, change Sensor Name to AM2301.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
IP AddressText - Default Value: 192.168.0.100The IP address of the device
Sensor NameText - Default Value: SI7021The name of the sensor connected to the device (specific key name in the returned dictionary)

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

  • Manufacturer: Sonoff
  • Measurements: Humidity/Temperature
  • Libraries: requests
  • Dependencies: requests
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
IP AddressText - Default Value: 192.168.0.100The IP address of the device

Sonoff: TH16/10 (Tasmota firmware) with DS18B20~

  • Manufacturer: Sonoff
  • Measurements: Temperature
  • Libraries: requests
  • Dependencies: requests
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
IP AddressText - Default Value: 192.168.0.100The IP address of the device

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimalThe temperature offset (degrees Celsius) to apply

TE Connectivity: HTU21D (pigpio)~

  • Manufacturer: TE Connectivity
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
  • Manufacturer: TP-Link
  • Measurements: kilowatt hours
  • Interfaces: IP
  • Libraries: python-kasa
  • Dependencies: python-kasa, aio_msgpack_rpc
  • Manufacturer URL: Link

This measures from several Kasa power devices (plugs/strips) capable of measuring energy consumption. These include, but are not limited to the KP115 and HS600.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Device TypeSelectThe type of Kasa device
HostText - Default Value: 0.0.0.0Host or IP address
Asyncio RPC PortInteger - Default Value: 18108The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Commands
The total kWh can be cleared with the following button or with the Clear Total kWh Function Action. This will also clear all energy stats on the device, not just the total kWh.
Clear Total: Kilowatt-hourButton

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

  • Manufacturer: Tasmota
  • Measurements: Total Energy, Amps, Watts
  • Interfaces: HTTP
  • Libraries: requests
  • Manufacturer URL: Link
  • Product URL: Link

This input queries the energy usage information from a WiFi outlet that is running the tasmota firmware. There are many WiFi outlets that support tasmota, and many of of those have energy monitoring capabilities. When used with an MQTT Output, you can both control your tasmota outlets as well as mionitor their energy usage.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
HostText - Default Value: 192.168.0.50Host or IP address

Texas Instruments: ADS1015~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.

Texas Instruments: ADS1115: Generic Analog pH/EC~

This input relies on an ADS1115 analog-to-digital converter (ADC) to measure pH and/or electrical conductivity (EC) from analog sensors. You can enable or disable either measurement if you want to only connect a pH sensor or an EC sensor by selecting which measurements you want to under Measurements Enabled. Select which channel each sensor is connected to on the ADC. There are default calibration values initially set for the Input. There are also functions to allow you to easily calibrate your sensors with calibration solutions. If you use the Calibrate Slot actions, these values will be calculated and will replace the currently-set values. You can use the Clear Calibration action to delete the database values and return to using the default values. If you delete the Input or create a new Input to use your ADC/sensors with, you will need to recalibrate in order to store new calibration data.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
ADC Channel: pHSelect(Options: [Channel 0 | Channel 1 | Channel 2 | Channel 3] (Default in bold)The ADC channel the pH sensor is connected
ADC Channel: ECSelect(Options: [Channel 0 | Channel 1 | Channel 2 | Channel 3] (Default in bold)The ADC channel the EC sensor is connected
Temperature Compensation
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
pH Calibration Data
Cal data: V1 (internal)Decimal - Default Value: 1.5Calibration data: Voltage
Cal data: pH1 (internal)Decimal - Default Value: 7.0Calibration data: pH
Cal data: T1 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
Cal data: V2 (internal)Decimal - Default Value: 2.032Calibration data: Voltage
Cal data: pH2 (internal)Decimal - Default Value: 4.0Calibration data: pH
Cal data: T2 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
EC Calibration Data
EC cal data: V1 (internal)Decimal - Default Value: 0.232EC calibration data: Voltage
EC cal data: EC1 (internal)Decimal - Default Value: 1413.0EC calibration data: EC
EC cal data: T1 (internal)Decimal - Default Value: 25.0EC calibration data: EC
EC cal data: V2 (internal)Decimal - Default Value: 2.112EC calibration data: Voltage
EC cal data: EC2 (internal)Decimal - Default Value: 12880.0EC calibration data: EC
EC cal data: T2 (internal)Decimal - Default Value: 25.0EC calibration data: EC
Commands
pH Calibration Actions: Place your probe in a solution of known pH. Set the known pH value in the "Calibration buffer pH" field, and press "Calibrate pH, slot 1". Repeat with a second buffer, and press "Calibrate pH, slot 2". You don't need to change the values under "Custom Options".
Calibration buffer pHDecimal - Default Value: 7.0This is the nominal pH of the calibration buffer, usually labelled on the bottle.
Calibrate pH, slot 1Button
Calibrate pH, slot 2Button
Clear pH Calibration SlotsButton
EC Calibration Actions: Place your probe in a solution of known EC. Set the known EC value in the "Calibration standard EC" field, and press "Calibrate EC, slot 1". Repeat with a second standard, and press "Calibrate EC, slot 2". You don't need to change the values under "Custom Options".
Calibration standard ECDecimal - Default Value: 1413.0This is the nominal EC of the calibration standard, usually labelled on the bottle.
Calibrate EC, slot 1Button
Calibrate EC, slot 2Button
Clear EC Calibration SlotsButton

Texas Instruments: ADS1115~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.

Texas Instruments: ADS1256: Generic Analog pH/EC~

  • Manufacturer: Texas Instruments
  • Measurements: Ion Concentration/Electrical Conductivity
  • Interfaces: UART
  • Libraries: wiringpi, kizniche/PiPyADC-py3
  • Dependencies: wiringpi, pipyadc_py3

This input relies on an ADS1256 analog-to-digital converter (ADC) to measure pH and/or electrical conductivity (EC) from analog sensors. You can enable or disable either measurement if you want to only connect a pH sensor or an EC sensor by selecting which measurements you want to under Measurements Enabled. Select which channel each sensor is connected to on the ADC. There are default calibration values initially set for the Input. There are also functions to allow you to easily calibrate your sensors with calibration solutions. If you use the Calibrate Slot actions, these values will be calculated and will replace the currently-set values. You can use the Clear Calibration action to delete the database values and return to using the default values. If you delete the Input or create a new Input to use your ADC/sensors with, you will need to recalibrate in order to store new calibration data.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
ADC Channel: pHSelect(Options: [Not Connected | Channel 0 | Channel 1 | Channel 2 | Channel 3 | Channel 4 | Channel 5 | Channel 6 | Channel 7] (Default in bold)The ADC channel the pH sensor is connected
ADC Channel: ECSelect(Options: [Not Connected | Channel 0 | Channel 1 | Channel 2 | Channel 3 | Channel 4 | Channel 5 | Channel 6 | Channel 7] (Default in bold)The ADC channel the EC sensor is connected
Temperature Compensation
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
pH Calibration Data
Cal data: V1 (internal)Decimal - Default Value: 1.5Calibration data: Voltage
Cal data: pH1 (internal)Decimal - Default Value: 7.0Calibration data: pH
Cal data: T1 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
Cal data: V2 (internal)Decimal - Default Value: 2.032Calibration data: Voltage
Cal data: pH2 (internal)Decimal - Default Value: 4.0Calibration data: pH
Cal data: T2 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
EC Calibration Data
EC cal data: V1 (internal)Decimal - Default Value: 0.232EC calibration data: Voltage
EC cal data: EC1 (internal)Decimal - Default Value: 1413.0EC calibration data: EC
EC cal data: T1 (internal)Decimal - Default Value: 25.0EC calibration data: EC
EC cal data: V2 (internal)Decimal - Default Value: 2.112EC calibration data: Voltage
EC cal data: EC2 (internal)Decimal - Default Value: 12880.0EC calibration data: EC
EC cal data: T2 (internal)Decimal - Default Value: 25.0EC calibration data: EC
CalibrationSelectSet the calibration method to perform during Input activation
Commands
pH Calibration Actions: Place your probe in a solution of known pH. Set the known pH value in the `Calibration buffer pH` field, and press `Calibrate pH, slot 1`. Repeat with a second buffer, and press `Calibrate pH, slot 2`. You don't need to change the values under `Custom Options`.
Calibration buffer pHDecimal - Default Value: 7.0This is the nominal pH of the calibration buffer, usually labelled on the bottle.
Calibrate pH, slot 1Button
Calibrate pH, slot 2Button
Clear pH Calibration SlotsButton
EC Calibration Actions: Place your probe in a solution of known EC. Set the known EC value in the `Calibration standard EC` field, and press `Calibrate EC, slot 1`. Repeat with a second standard, and press `Calibrate EC, slot 2`. You don't need to change the values under `Custom Options`.
Calibration standard ECDecimal - Default Value: 1413.0This is the nominal EC of the calibration standard, usually labelled on the bottle.
Calibrate EC, slot 1Button
Calibrate EC, slot 2Button
Clear EC Calibration SlotsButton

Texas Instruments: ADS1256~

  • Manufacturer: Texas Instruments
  • Measurements: Voltage (Waveshare, Analog-to-Digital Converter)
  • Interfaces: UART
  • Libraries: wiringpi, kizniche/PiPyADC-py3
  • Dependencies: wiringpi, pipyadc_py3
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
CalibrationSelectSet the calibration method to perform during Input activation

Texas Instruments: ADS1x15~

  • Manufacturer: Texas Instruments
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: I2C
  • Libraries: Adafruit_ADS1x15 [DEPRECATED]
  • Dependencies: Adafruit-GPIO, Adafruit-ADS1x15

The Adafruit_ADS1x15 is deprecated. It's advised to use The Circuit Python ADS1x15 Input.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.

Texas Instruments: HDC1000~

  • Manufacturer: Texas Instruments
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: fcntl/io
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Texas Instruments: INA219x~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.
Calibration RangeSelect(Options: [32V @ 2A max (default) | 32V @ 1A max | 16V @ 400mA max | 16V @ 5A max] (Default in bold)Set the device calibration range
Bus Voltage RangeSelect(Options: [(0x00) - 16V | (0x01) - 32V (default)] (Default in bold)Set the bus voltage range
Bus ADC ResolutionSelect(Options: [(0x00) - 9 Bit / 1 Sample | (0x01) - 10 Bit / 1 Sample | (0x02) - 11 Bit / 1 Sample | (0x03) - 12 Bit / 1 Sample (default) | (0x09) - 12 Bit / 2 Samples | (0x0A) - 12 Bit / 4 Samples | (0x0B) - 12 Bit / 8 Samples | (0x0C) - 12 Bit / 16 Samples | (0x0D) - 12 Bit / 32 Samples | (0x0E) - 12 Bit / 64 Samples | (0x0F) - 12 Bit / 128 Samples] (Default in bold)Set the Bus ADC Resolution.
Shunt ADC ResolutionSelect(Options: [(0x00) - 9 Bit / 1 Sample | (0x01) - 10 Bit / 1 Sample | (0x02) - 11 Bit / 1 Sample | (0x03) - 12 Bit / 1 Sample (default) | (0x09) - 12 Bit / 2 Samples | (0x0A) - 12 Bit / 4 Samples | (0x0B) - 12 Bit / 8 Samples | (0x0C) - 12 Bit / 16 Samples | (0x0D) - 12 Bit / 32 Samples | (0x0E) - 12 Bit / 64 Samples | (0x0F) - 12 Bit / 128 Samples] (Default in bold)Set the Shunt ADC Resolution.

Texas Instruments: TMP006~

  • Manufacturer: Texas Instruments
  • Measurements: Temperature (Object/Die)
  • Interfaces: I2C
  • Libraries: Adafruit_TMP
  • Dependencies: Adafruit-TMP
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

The Things Network: The Things Network: Data Storage (TTN v2)~

  • Manufacturer: The Things Network
  • Measurements: Variable measurements
  • Libraries: requests
  • Dependencies: requests

This Input receives and stores measurements from the Data Storage Integration on The Things Network.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Start Offset (Seconds)IntegerThe duration to wait before the first operation
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Application IDTextThe Things Network Application ID
App API KeyTextThe Things Network Application API Key
Device IDTextThe Things Network Device ID
Channel Options
NameTextA name to distinguish this from others
Variable NameTextThe TTN variable name

The Things Network: The Things Network: Data Storage (TTN v3, Payload Key)~

  • Manufacturer: The Things Network
  • Measurements: Variable measurements
  • Libraries: requests
  • Dependencies: requests

This Input receives and stores measurements from the Data Storage Integration on The Things Network. If you have key/value pairs as your payload, enter the key name in Variable Name and the corresponding value for that key will be stored in the measurement database.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Start Offset (Seconds)IntegerThe duration to wait before the first operation
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Application IDTextThe Things Network Application ID
App API KeyTextThe Things Network Application API Key
Device IDTextThe Things Network Device ID
Channel Options
NameTextA name to distinguish this from others
Variable NameTextThe TTN variable name

The Things Network: The Things Network: Data Storage (TTN v3, Payload jmespath Expression)~

  • Manufacturer: The Things Network
  • Measurements: Variable measurements
  • Libraries: requests, jmespath
  • Dependencies: requests, jmespath

This Input receives and stores measurements from the Data Storage Integration on The Things Network. The given Payload jmespath Expression is used as a JMESPATH expression to find the corresponding value that will be stored for that channel. Be sure you select and save the Measurement Unit for each channel. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Example expressions for jmespath (https://jmespath.org) include temperature, sensors[0].temperature, and bathroom.temperature which refer to the temperature as a direct key within the first entry of sensors or as a subkey of bathroom, respectively. Jmespath elements and keys that contain special characters have to be enclosed in double quotes, e.g. "sensor-1".temperature.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Start Offset (Seconds)IntegerThe duration to wait before the first operation
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Application IDTextThe Things Network Application ID
App API KeyTextThe Things Network Application API Key
Device IDTextThe Things Network Device ID
Channel Options
NameTextA name to distinguish this from others
Payload jmespath ExpressionTextThe TTN jmespath expression to return the value to store

Weather: OpenWeatherMap (City, Current)~

  • Manufacturer: Weather
  • Measurements: Humidity/Temperature/Pressure/Wind
  • Additional URL: Link

Obtain a free API key at openweathermap.org. If the city you enter does not return measurements, try another city. Note: the free API subscription is limited to 60 calls per minute

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
API KeyTextThe API Key for this service's API
CityTextThe city to acquire the weather data

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

  • Manufacturer: Weather
  • Measurements: Humidity/Temperature/Pressure/Wind
  • Interfaces: Mycodo
  • Additional URL: Link

Obtain a free API key at openweathermap.org. Notes: The free API subscription is limited to 60 calls per minute. If a Day (Future) time is selected, Minimum and Maximum temperatures are available as measurements.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
API KeyTextThe API Key for this service's API
Latitude (decimal)Decimal - Default Value: 33.441792The latitude to acquire weather data
Longitude (decimal)Decimal - Default Value: -94.037689The longitude to acquire weather data
TimeSelect(Options: [Current (Present) | 1 Day (Future) | 2 Day (Future) | 3 Day (Future) | 4 Day (Future) | 5 Day (Future) | 6 Day (Future) | 7 Day (Future) | 1 Hour (Future) | 2 Hours (Future) | 3 Hours (Future) | 4 Hours (Future) | 5 Hours (Future) | 6 Hours (Future) | 7 Hours (Future) | 8 Hours (Future) | 9 Hours (Future) | 10 Hours (Future) | 11 Hours (Future) | 12 Hours (Future) | 13 Hours (Future) | 14 Hours (Future) | 15 Hours (Future) | 16 Hours (Future) | 17 Hours (Future) | 18 Hours (Future) | 19 Hours (Future) | 20 Hours (Future) | 21 Hours (Future) | 22 Hours (Future) | 23 Hours (Future) | 24 Hours (Future) | 25 Hours (Future) | 26 Hours (Future) | 27 Hours (Future) | 28 Hours (Future) | 29 Hours (Future) | 30 Hours (Future) | 31 Hours (Future) | 32 Hours (Future) | 33 Hours (Future) | 34 Hours (Future) | 35 Hours (Future) | 36 Hours (Future) | 37 Hours (Future) | 38 Hours (Future) | 39 Hours (Future) | 40 Hours (Future) | 41 Hours (Future) | 42 Hours (Future) | 43 Hours (Future) | 44 Hours (Future) | 45 Hours (Future) | 46 Hours (Future) | 47 Hours (Future) | 48 Hours (Future)] (Default in bold)Select the time for the current or forecast weather

Winsen: MH-Z14A~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART
  • Libraries: serial
  • Dependencies: RPi.GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Automatic Self-calibrationBoolean - Default Value: TrueEnable automatic self-calibration
Measurement RangeSelect(Options: [400 - 2000 ppmv | 400 - 5000 ppmv | 400 - 10000 ppmv] (Default in bold)Set the measuring range of the sensor
The CO2 measurement can also be obtained using PWM via a GPIO pin. Enter the pin number below or leave blank to disable this option. This also makes it possible to obtain measurements even if the UART interface is not available (note that the sensor can't be configured / calibrated without a working UART interface).
GPIO OverrideTextObtain readings using PWM on this GPIO pin instead of via UART
Commands
Calibrate Zero PointButton
Span Point (ppmv)Integer - Default Value: 2000The ppmv concentration for a span point calibration
Calibrate Span PointButton

Winsen: MH-Z16~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART, I2C
  • Libraries: smbus2/serial
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Winsen: MH-Z19~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART
  • Libraries: serial
  • Datasheet URL: Link

This is the version of the sensor that does not include the ability to conduct automatic baseline correction (ABC). See the B version of the sensor if you wish to use ABC.

OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurement RangeSelect(Options: [0 - 1000 ppmv | 0 - 2000 ppmv | 0 - 3000 ppmv | 0 - 5000 ppmv] (Default in bold)Set the measuring range of the sensor
Commands
Calibrate Zero PointButton
Span Point (ppmv)Integer - Default Value: 2000The ppmv concentration for a span point calibration
Calibrate Span PointButton

Winsen: MH-Z19B~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART
  • Libraries: serial
  • Manufacturer URL: Link
  • Datasheet URL: Link

This is the B version of the sensor that includes the ability to conduct automatic baseline correction (ABC).

OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Automatic Baseline CorrectionBooleanEnable automatic baseline correction (ABC)
Measurement RangeSelect(Options: [0 - 1000 ppmv | 0 - 2000 ppmv | 0 - 3000 ppmv | 0 - 5000 ppmv | 0 - 10000 ppmv] (Default in bold)Set the measuring range of the sensor
Commands
Calibrate Zero PointButton
Span Point (ppmv)Integer - Default Value: 2000The ppmv concentration for a span point calibration
Calibrate Span PointButton

Winsen: ZH03B~

  • Manufacturer: Winsen
  • Measurements: Particulates
  • Interfaces: UART
  • Libraries: serial
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Fan Off After MeasureBooleanTurn the fan on only during the measurement
Fan On Duration (Seconds)Decimal - Default Value: 50.0How long to turn the fan on before acquiring measurements
Number of MeasurementsInteger - Default Value: 3How many measurements to acquire. If more than 1 are acquired that are less than 1001, the average of the measurements will be stored.

Xiaomi: Miflora~

  • Manufacturer: Xiaomi
  • Measurements: EC/Light/Moisture/Temperature
  • Interfaces: BT
  • Libraries: miflora
  • Dependencies: libglib2.0-dev, miflora, bluepy
OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

More information about ATC mode can be found at https://github.com/JsBergbau/MiTemperature2

OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Enable ATC ModeBooleanEnable sensor ATC mode

ams: AS7341~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
\ No newline at end of file + Supported Inputs - Mycodo
Skip to content

Supported Inputs

Built-In Inputs (System)~

Linux: Bash Command~

  • Manufacturer: Linux
  • Measurements: Return Value
  • Interfaces: Mycodo

This Input will execute a command in the shell and store the output as a float value. Perform any unit conversions within your script or command. A measurement/unit is required to be selected.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Command TimeoutInteger - Default Value: 60How long to wait for the command to finish before killing the process.
UserText - Default Value: mycodoThe user to execute the command
Current Working DirectoryText - Default Value: /home/piThe current working directory of the shell environment.

Linux: Python 3 Code (v1.0)~

  • Manufacturer: Linux
  • Measurements: Store Value(s)
  • Interfaces: Mycodo
  • Dependencies: pylint

All channels require a Measurement Unit to be selected and saved in order to store values to the database. Your code is executed from the same Python virtual environment that Mycodo runs from. Therefore, you must install Python libraries to this environment if you want them to be available to your code. This virtualenv is located at /opt/Mycodo/env and if you wanted to install a library, for example "my_library" using pip, you would execute "sudo /opt/Mycodo/env/bin/pip install my_library".

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving

Linux: Python 3 Code (v2.0)~

  • Manufacturer: Linux
  • Measurements: Store Value(s)
  • Interfaces: Mycodo
  • Dependencies: pylint

This is an alternate Python 3 Code Input that uses a different method for storing values to the database. This was created because the Python 3 Code v1.0 Input does not allow the use of Input Actions. This method does allow the use of Input Actions. (11/21/2023 Update: The Python 3 Code (v1.0) Input now allows the execution of Actions). All channels require a Measurement Unit to be selected and saved in order to store values to the database. Your code is executed from the same Python virtual environment that Mycodo runs from. Therefore, you must install Python libraries to this environment if you want them to be available to your code. This virtualenv is located at /opt/Mycodo/env and if you wanted to install a library, for example "my_library" using pip, you would execute "sudo /opt/Mycodo/env/bin/pip install my_library".

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Python 3 CodeThe code to execute. Must return a value.
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving

Mycodo: CPU Load~

  • Manufacturer: Mycodo
  • Measurements: CPULoad
  • Libraries: os.getloadavg()
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions

Mycodo: Free Space~

  • Manufacturer: Mycodo
  • Measurements: Unallocated Disk Space
  • Libraries: os.statvfs()
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions

Mycodo: Mycodo Version~

  • Manufacturer: Mycodo
  • Measurements: Version as Major.Minor.Revision
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions

Mycodo: Output State (On/Off)~

  • Manufacturer: Mycodo
  • Measurements: Boolean

This Input stores a 0 (off) or 1 (on) for the selected On/Off Output.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
On/Off Output ChannelSelect Channel (Output_Channels)Select an output to measure

Mycodo: Server Ping~

  • Manufacturer: Mycodo
  • Measurements: Boolean
  • Libraries: ping

This Input executes the bash command "ping -c [times] -w [deadline] [host]" to determine if the host can be pinged.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Mycodo: Server Port Open~

  • Manufacturer: Mycodo
  • Measurements: Boolean
  • Libraries: nc

This Input executes the bash command "nc -zv [host] [port]" to determine if the host at a particular port is accessible.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Mycodo: Spacer~

  • Manufacturer: Mycodo

A spacer to organize Inputs.

OptionTypeDescription
ColorText - Default Value: #000000The color of the name text

Mycodo: System and Mycodo RAM~

  • Manufacturer: Mycodo
  • Measurements: RAM Allocation
  • Libraries: psutil, resource.getrusage()
  • Dependencies: psutil
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Mycodo Frontend RAM EndpointText - Default Value: https://127.0.0.1/ramThe endpoint to get Mycodo frontend ram usage

Mycodo: Test Input: Save your own measurement value~

  • Manufacturer: Mycodo
  • Measurements: Variable measurements

This is a simple test Input that allows you to save any value as a measurement, that will be stored in the measurement database. It can be useful for testing other parts of Mycodo, such as PIDs, Bang-Bang, and Conditional Functions, since you can be completely in control of what values the input provides to the Functions. Note 1: Select and save the Name and Measurement Unit for each channel. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Note 2: Activate the Input before storing measurements.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Channel Options
NameTextA name to distinguish this from others
Commands
Enter the Value you want to store as a measurement, then press Store Measurement.
ChannelIntegerThis is the channel to save the measurement value to
ValueDecimal - Default Value: 10.0This is the measurement value to save for this Input
Store MeasurementButton

Mycodo: Uptime~

  • Manufacturer: Mycodo
  • Measurements: Seconds Since System Startup
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions

Raspberry Pi: CPU/GPU Temperature~

  • Manufacturer: Raspberry Pi
  • Measurements: Temperature
  • Interfaces: RPi

The internal CPU and GPU temperature of the Raspberry Pi.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Path for CPU TemperatureText - Default Value: /sys/class/thermal/thermal_zone0/tempReads the CPU temperature from this file
Path to vcgencmdText - Default Value: /usr/bin/vcgencmdReads the GPU from vcgencmd

Raspberry Pi: Edge Detection~

  • Manufacturer: Raspberry Pi
  • Measurements: Rising/Falling Edge
  • Interfaces: GPIO
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
OptionTypeDescription
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pin ModeSelect(Options: [Floating | Pull Down | Pull Up] (Default in bold)Enables or disables the pull-up or pull-down resistor

Raspberry Pi: GPIO State~

  • Manufacturer: Raspberry Pi
  • Measurements: GPIO State
  • Interfaces: GPIO
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO

Measures the state of a GPIO pin, returning either 0 (low) or 1 (high).

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pin ModeSelect(Options: [Floating | Pull Down | Pull Up] (Default in bold)Enables or disables the pull-up or pull-down resistor

Raspberry Pi: Signal (PWM)~

  • Manufacturer: Raspberry Pi
  • Measurements: Frequency/Pulse Width/Duty Cycle
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Raspberry Pi: Signal (Revolutions) (pigpio method #1)~

  • Manufacturer: Raspberry Pi
  • Measurements: RPM
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio

This calculates RPM from pulses on a pin using pigpio, but has been found to be less accurate than the method #2 module. This is typically used to measure the speed of a fan from a tachometer pin, however this can be used to measure any 3.3-volt pulses from a wire. Use a resistor to pull the measurement pin to 3.3 volts, set pigpio to the lowest latency (1 ms) on the Configure -> Raspberry Pi page. Note 1: Not setting pigpio to the lowest latency will hinder accuracy. Note 2: accuracy decreases as RPM increases.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Raspberry Pi: Signal (Revolutions) (pigpio method #2)~

  • Manufacturer: Raspberry Pi
  • Measurements: RPM
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio

This is an alternate method to calculate RPM from pulses on a pin using pigpio, and has been found to be more accurate than the method #1 module. This is typically used to measure the speed of a fan from a tachometer pin, however this can be used to measure any 3.3-volt pulses from a wire. Use a resistor to pull the measurement pin to 3.3 volts, set pigpio to the lowest latency (1 ms) on the Configure -> Raspberry Pi page. Note 1: Not setting pigpio to the lowest latency will hinder accuracy. Note 2: accuracy decreases as RPM increases.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pin: GPIO (BCM)IntegerThe pin to measure pulses from
Sample Time (Seconds)Decimal - Default Value: 5.0The duration of time to sample
Pulses Per RevDecimal - Default Value: 15.8The number of pulses per revolution to calculate revolutions per minute (RPM)

Built-In Inputs (Devices)~

AMS: AS7262~

  • Manufacturer: AMS
  • Measurements: Light at 450, 500, 550, 570, 600, 650 nm
  • Interfaces: I2C
  • Libraries: as7262
  • Dependencies: as7262
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
GainSelect(Options: [1x | 3.7x | 16x | 64x] (Default in bold)Set the sensor gain
Illumination LED CurrentSelect(Options: [12.5 mA | 25 mA | 50 mA | 100 mA] (Default in bold)Set the illumination LED current (milliamps)
Illumination LED ModeSelect(Options: [On | Off] (Default in bold)Turn the illumination LED on or off during a measurement
Indicator LED CurrentSelect(Options: [1 mA | 2 mA | 4 mA | 8 mA] (Default in bold)Set the indicator LED current (milliamps)
Indicator LED ModeSelect(Options: [On | Off] (Default in bold)Turn the indicator LED on or off during a measurement
Integration TimeDecimal - Default Value: 15.0The integration time (0 - ~91 ms)

AMS: CCS811 (with Temperature)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AMS: CCS811 (without Temperature)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AMS: TSL2561~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AMS: TSL2591~

  • Manufacturer: AMS
  • Measurements: Light
  • Interfaces: I2C
  • Libraries: maxlklaxl/python-tsl2591
  • Dependencies: tsl2591
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: AM2315/AM2320~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: quick2wire-api
  • Dependencies: quick2wire-api
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: DHT11~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: DHT20~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2, Link 3
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

AOSONG: DHT22~

  • Manufacturer: AOSONG
  • Measurements: Humidity/Temperature
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

ASAIR: AHTx0~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Adafruit: I2C Capacitive Moisture Sensor~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Analog Devices: ADT7410~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Analog Devices: ADXL34x (343, 344, 345, 346)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
RangeSelect(Options: [±2 g (±19.6 m/s/s) | ±4 g (±39.2 m/s/s) | ±8 g (±78.4 m/s/s) | ±16 g (±156.9 m/s/s)] (Default in bold)Set the measurement range

AnyLeaf: AnyLeaf EC~

OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Conductivity ConstantDecimal - Default Value: 1.0Conductivity constant K

AnyLeaf: AnyLeaf ORP~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Calibrate: Voltage (Internal)Decimal - Default Value: 0.4Calibration data: internal voltage
Calibrate: ORP (Internal)Decimal - Default Value: 400.0Calibration data: internal ORP
Commands
Calibrate: Buffer ORP (mV)Decimal - Default Value: 400.0This is the nominal ORP of the calibration buffer in mV, usually labelled on the bottle.
CalibrateButton
Clear Calibration SlotsButton

AnyLeaf: AnyLeaf pH~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Cal data: V1 (internal)DecimalCalibration data: Voltage
Cal data: pH1 (internal)Decimal - Default Value: 7.0Calibration data: pH
Cal data: T1 (internal)Decimal - Default Value: 23.0Calibration data: Temperature
Cal data: V2 (internal)Decimal - Default Value: 0.17Calibration data: Voltage
Cal data: pH2 (internal)Decimal - Default Value: 4.0Calibration data: pH
Cal data: T2 (internal)Decimal - Default Value: 23.0Calibration data: Temperature
Cal data: V3 (internal)DecimalCalibration data: Voltage
Cal data: pH3 (internal)DecimalCalibration data: pH
Cal data: T3 (internal)DecimalCalibration data: Temperature
Commands
Calibration buffer pHDecimal - Default Value: 7.0This is the nominal pH of the calibration buffer, usually labelled on the bottle.
Calibrate, slot 1Button
Calibrate, slot 2Button
Calibrate, slot 3Button
Clear Calibration SlotsButton

Atlas Scientific: Atlas CO2 (Carbon Dioxide Gas)~

  • Manufacturer: Atlas Scientific
  • Measurements: CO2
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
A one- or two-point calibration can be performed. After exposing the probe to a concentration of CO2 between 3,000 and 5,000 ppmv until readings stabilize, press Calibrate (High). You can place the probe in a 0 CO2 environment until readings stabilize, then press Calibrate (Zero). You can also clear the currently-saved calibration by pressing Clear Calibration, returning to the factory-set calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
High Point CO2Integer - Default Value: 3000The high CO2 calibration point (3000 - 5000 ppmv)
Calibrate (High)Button
Calibrate (Zero)Button
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x69The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas Color~

  • Manufacturer: Atlas Scientific
  • Measurements: RGB, CIE, LUX, Proximity
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
LED Only For MeasureBoolean - Default Value: TrueTurn the LED on only during the measurement
LED PercentageInteger - Default Value: 30What percentage of power to supply to the LEDs during measurement
Gamma CorrectionDecimal - Default Value: 1.0Gamma correction between 0.01 and 4.99 (default is 1.0)
Commands
The EZO-RGB color sensor is designed to be calibrated to a white object at the maximum brightness the object will be viewed under. In order to get the best results, Atlas Scientific strongly recommends that the sensor is mounted into a fixed location. Holding the sensor in your hand during calibration will decrease performance.
1. Embed the EZO-RGB color sensor into its intended use location.
2. Set LED brightness to the desired level.
3. Place a white object in front of the target object and press the Calibration button.
4. A single color reading will be taken and the device will be fully calibrated.
CalibrateButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x70The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas DO~

  • Manufacturer: Atlas Scientific
  • Measurements: Dissolved Oxygen
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
A one- or two-point calibration can be performed. After exposing the probe to air for 30 seconds until readings stabilize, press Calibrate (Air). If you require accuracy below 1.0 mg/L, you can place the probe in a 0 mg/L solution for 30 to 90 seconds until readings stabilize, then press Calibrate (0 mg/L). You can also clear the currently-saved calibration by pressing Clear Calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Calibrate (Air)Button
Calibrate (0 mg/L)Button
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x66The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas EC~

  • Manufacturer: Atlas Scientific
  • Measurements: Electrical Conductivity
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
Calibration: a one- or two-point calibration can be performed. It's a good idea to clear the calibration before calibrating. Always perform a dry calibration with the probe in the air (not in any fluid). Then perform either a one- or two-point calibration with calibrated solutions. If performing a one-point calibration, use the Single Point Calibration field and button. If performing a two-point calibration, use the Low and High Point Calibration fields and buttons. Allow a minute or two after submerging your probe in a calibration solution for the measurements to equilibrate before calibrating to that solution. The EZO EC circuit default temperature compensation is set to 25 °C. If the temperature of the calibration solution is +/- 2 °C from 25 °C, consider setting the temperature compensation first. Note that at no point should you change the temperature compensation value during calibration. Therefore, if you have previously enabled temperature compensation, allow at least one measurement to occur (to set the compensation value), then disable the temperature compensation measurement while you calibrate. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Clear CalibrationButton
Calibrate DryButton
Single Point EC (µS)Integer - Default Value: 84The EC (µS) of the single point calibration solution
Calibrate Single PointButton
Low Point EC (µS)Integer - Default Value: 12880The EC (µS) of the low point calibration solution
Calibrate Low PointButton
High Point EC (µS)Integer - Default Value: 80000The EC (µS) of the high point calibration solution
Calibrate High PointButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x64The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas Flow Meter~

  • Manufacturer: Atlas Scientific
  • Measurements: Total Volume, Flow Rate
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link

Set the Measurement Time Base to a value most appropriate for your anticipated flow (it will affect accuracy). This flow rate time base that is set and returned from the sensor will be converted to liters per minute, which is the default unit for this input module. If you desire a different rate to be stored in the database (such as liters per second or hour), then use the Convert to Unit option.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Flow Meter TypeSelect(Options: [Atlas Scientific 3/8" Flow Meter | Atlas Scientific 1/4" Flow Meter | Atlas Scientific 1/2" Flow Meter | Atlas Scientific 3/4" Flow Meter | Non-Atlas Scientific Flow Meter] (Default in bold)Set the type of flow meter used
Atlas Meter Time BaseSelect(Options: [Liters per Second | Liters per Minute | Liters per Hour] (Default in bold)If using an Atlas Scientific flow meter, set the flow rate/time base
Internal ResistorSelect(Options: [Use Atlas Scientific Flow Meter | Disable Internal Resistor | 1 K Ω Pull-Up | 1 K Ω Pull-Down | 10 K Ω Pull-Up | 10 K Ω Pull-Down | 100 K Ω Pull-Up | 100 K Ω Pull-Down] (Default in bold)Set an internal resistor for the flow meter
Custom K Value(s)TextIf using a non-Atlas Scientific flow meter, enter the meter's K value(s). For a single K value, enter '[volume per pulse],[number of pulses]'. For multiple K values (up to 16), enter '[volume at frequency],[frequency in Hz];[volume at frequency],[frequency in Hz];...'. Leave blank to disable.
K Value Time BaseSelect(Options: [Use Atlas Scientific Flow Meter | Liters per Second | Liters per Minute | Liters per Hour] (Default in bold)If using a non-Atlas Scientific flow meter, set the flow rate/time base for the custom K values entered.
Commands
The total volume can be cleared with the following button or with the Clear Total Volume Function Action.
Clear Total: VolumeButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x68The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas Humidity~

  • Manufacturer: Atlas Scientific
  • Measurements: Humidity/Temperature
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
LED ModeSelect(Options: [Always On | Always Off | Only On During Measure] (Default in bold)When to turn the LED on
Commands
New I2C AddressText - Default Value: 0x6fThe new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas O2 (Oxygen Gas)~

  • Manufacturer: Atlas Scientific
  • Measurements: O2
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Temperature Compensation: ManualDecimal - Default Value: 20.0If not using a measurement, set the temperature to compensate
LED ModeSelect(Options: [Always On | Always Off | Only On During Measure] (Default in bold)When to turn the LED on
Commands
A one- or two-point calibration can be performed. After exposing the probe to a specific concentration of O2 until readings stabilize, press Calibrate (High). You can place the probe in a 0% O2 environment until readings stabilize, then press Calibrate (Zero). You can also clear the currently-saved calibration by pressing Clear Calibration, returning to the factory-set calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
High Point O2Decimal - Default Value: 20.95The high O2 calibration point (percent)
Calibrate (High)Button
Calibrate (Zero)Button
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x69The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas ORP~

  • Manufacturer: Atlas Scientific
  • Measurements: Oxidation Reduction Potential
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
A one-point calibration can be performed. Enter the solution's mV, set the probe in the solution, then press Calibrate. You can also clear the currently-saved calibration by pressing Clear Calibration. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Calibration Solution mVInteger - Default Value: 225The value of the calibration solution, in mV
CalibrateButton
Clear CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x62The new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas PT-1000~

  • Manufacturer: Atlas Scientific
  • Measurements: Temperature
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
New I2C AddressText - Default Value: 0x66The new I2C to set the device to
Set I2C AddressButton
Temperature (°C)Decimal - Default Value: 100.0Temperature for single point calibration
CalibrateButton
Clear CalibrationButton

Atlas Scientific: Atlas Pressure~

  • Manufacturer: Atlas Scientific
  • Measurements: Pressure
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
LED ModeSelect(Options: [Always On | Always Off | Only On During Measure] (Default in bold)When to turn the LED on
Commands
New I2C AddressText - Default Value: 0x6aThe new I2C to set the device to
Set I2C AddressButton

Atlas Scientific: Atlas pH~

  • Manufacturer: Atlas Scientific
  • Measurements: Ion Concentration
  • Interfaces: I2C, UART, FTDI
  • Libraries: pylibftdi/fcntl/io/serial
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link

Calibration Measurement is an optional setting that provides a temperature measurement (in Celsius) of the water that the pH is being measured from.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
Commands
Calibration: a one-, two- or three-point calibration can be performed. It's a good idea to clear the calibration before calibrating. The first calibration must be the Mid point. The second must be the Low point. And the third must be the High point. You can perform a one-, two- or three-point calibration, but they must be performed in this order. Allow a minute or two after submerging your probe in a calibration solution for the measurements to equilibrate before calibrating to that solution. The EZO pH circuit default temperature compensation is set to 25 °C. If the temperature of the calibration solution is +/- 2 °C from 25 °C, consider setting the temperature compensation first. Note that if you have a Temperature Compensation Measurement selected from the Options, this will overwrite the manual Temperature Compensation set here, so be sure to disable this option if you would like to specify the temperature to compensate with. Status messages will be sent to the Daemon Log, accessible from Config -> Mycodo Logs -> Daemon Log.
Compensation Temperature (°C)Decimal - Default Value: 25.0The temperature of the calibration solutions
Set Temperature CompensationButton
Clear CalibrationButton
Mid Point pHDecimal - Default Value: 7.0The pH of the mid point calibration solution
Calibrate MidButton
Low Point pHDecimal - Default Value: 4.0The pH of the low point calibration solution
Calibrate LowButton
High Point pHDecimal - Default Value: 10.0The pH of the high point calibration solution
Calibrate HighButton
Calibration Export/Import: Export calibration to a series of strings. These can later be imported to restore the calibration. Watch the Daemon Log for the output.
Export CalibrationButton
Calibration StringTextThe calibration string to import
Import CalibrationButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x63The new I2C to set the device to
Set I2C AddressButton

BOSCH: BME280 (Adafruit_BME280)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BME280 (Adafruit_CircuitPython_BME280)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BME280 (RPi.bme280)~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Humidity/Temperature
  • Interfaces: I2C
  • Libraries: RPi.bme280
  • Dependencies: RPi.bme280
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BME680 (Adafruit_CircuitPython_BME680)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Humidity OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Temperature OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Pressure OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
IIR Filter SizeSelect(Options: [0 | 1 | 3 | 7 | 15 | 31 | 63 | 127] (Default in bold)Optionally remove short term fluctuations from the temperature and pressure readings, increasing their resolution but reducing their bandwidth.
Temperature OffsetDecimalThe amount to offset the temperature, either negative or positive
Sea Level Pressure (ha)Decimal - Default Value: 1013.25The pressure at sea level for the sensor location

BOSCH: BME680 (bme680)~

  • Manufacturer: BOSCH
  • Measurements: Temperature/Humidity/Pressure/Gas
  • Interfaces: I2C
  • Libraries: bme680
  • Dependencies: bme680, smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Humidity OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Temperature OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
Pressure OversamplingSelect(Options: [NONE | 1X | 2X | 4X | 8X | 16X] (Default in bold)A higher oversampling value means more stable readings with less noise and jitter. However each step of oversampling adds ~2 ms latency, causing a slower response time to fast transients.
IIR Filter SizeSelect(Options: [0 | 1 | 3 | 7 | 15 | 31 | 63 | 127] (Default in bold)Optionally remove short term fluctuations from the temperature and pressure readings, increasing their resolution but reducing their bandwidth.
Gas Heater Temperature (°C)Integer - Default Value: 320What temperature to set
Gas Heater Duration (ms)Integer - Default Value: 150How long of a duration to heat. 20-30 ms are necessary for the heater to reach the intended target temperature.
Gas Heater ProfileSelectSelect one of the 10 configured heating durations/set points
Temperature OffsetDecimalThe amount to offset the temperature, either negative or positive

BOSCH: BMP180~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Temperature
  • Interfaces: I2C
  • Libraries: Adafruit_BMP
  • Dependencies: Adafruit-BMP, Adafruit-GPIO
  • Datasheet URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BMP280 (Adafruit_GPIO)~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Temperature
  • Interfaces: I2C
  • Libraries: Adafruit_GPIO
  • Dependencies: Adafruit-GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

BOSCH: BMP280 (bmp280-python)~

  • Manufacturer: BOSCH
  • Measurements: Pressure/Temperature
  • Interfaces: I2C
  • Libraries: bmp280-python
  • Dependencies: smbus2, bmp280
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

This is similar to the other BMP280 Input, except it uses a different library, whcih includes the ability to set forced mode.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Enable Forced ModeBooleanEnable heater to evaporate condensation. Turn on heater x seconds every y measurements.

CO2Meter: K30~

  • Manufacturer: CO2Meter
  • Measurements: CO2
  • Interfaces: I2C, UART
  • Libraries: serial (UART)
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Catnip Electronics: Chirp~

  • Manufacturer: Catnip Electronics
  • Measurements: Light/Moisture/Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x20The new I2C to set the device to
Set I2C AddressButton

Cozir: Cozir CO2~

  • Manufacturer: Cozir
  • Measurements: CO2/Humidity/Temperature
  • Interfaces: UART
  • Libraries: pierre-haessig/pycozir
  • Dependencies: cozir
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Generic: Hall Flow Meter~

  • Manufacturer: Generic
  • Measurements: Flow Rate, Total Volume
  • Interfaces: GPIO
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Pulses per LiterDecimal - Default Value: 1.0Enter the conversion factor for this meter (pulses to Liter).
Commands
Clear Total: VolumeButton

Infineon: DPS310~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: DS1822~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS1825~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS18B20 (ow-shell)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: ow-shell
  • Dependencies: ow-shell, owfs
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2, Link 3
  • Additional URL: Link

Warning: Counterfeit DS18B20 sensors are common and can cause a host of issues. Review the Additional URL for more information about how to determine if your sensor is authentic.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: DS18B20 (w1thermsensor)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2, Link 3
  • Additional URL: Link

Warning: Counterfeit DS18B20 sensors are common and can cause a host of issues. Review the Additional URL for more information about how to determine if your sensor is authentic.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimalThe temperature offset (degrees Celsius) to apply
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS18S20~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: DS28EA00~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: MAX31850K~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: 1-Wire
  • Libraries: w1thermsensor
  • Dependencies: w1thermsensor
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Commands
Set the resolution, precision, and response time for the sensor. This setting will be written to the EEPROM to allow persistence after power loss. The EEPROM has a limited amount of writes (>50k).
ResolutionSelectSelect the resolution for the sensor
Set ResolutionButton

MAXIM: MAX31855 (Gravity PT100) (smbus2)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31855 (Gravity PT100) (wiringpi)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: I2C
  • Libraries: wiringpi
  • Dependencies: wiringpi
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31855 (Adafruit_MAX31855)~

  • Manufacturer: MAXIM
  • Measurements: Temperature (Object/Die)
  • Interfaces: UART
  • Libraries: Adafruit_MAX31855
  • Dependencies: Adafruit_MAX31855, Adafruit-GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31855 (adafruit-circuitpython-max31855)~

  • Manufacturer: MAXIM
  • Measurements: Temperature (Object/Die)
  • Interfaces: SPI
  • Libraries: adafruit-circuitpython-max31855
  • Dependencies: adafruit-circuitpython-max31855
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Chip Select PinInteger - Default Value: 5Enter the GPIO Chip Select Pin for your device.

MAXIM: MAX31856~

  • Manufacturer: MAXIM
  • Measurements: Temperature (Object/Die)
  • Interfaces: UART
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MAXIM: MAX31865 (Adafruit-CircuitPython-MAX31865)~

This module was added to allow support for multiple sensors to be connected at the same time, which the original MAX31865 module was not designed for.

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Chip Select PinInteger - Default Value: 8Enter the GPIO Chip Select Pin for your device.
Number of wiresSelect(Options: [2 Wires | 3 Wires | 4 Wires] (Default in bold)Select the number of wires your thermocouple has.

MAXIM: MAX31865 (RPi.GPIO)~

  • Manufacturer: MAXIM
  • Measurements: Temperature
  • Interfaces: UART
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Note: This module does not allow for multiple sensors to be connected at the same time. For multi-sensor support, use the MAX31865 CircuitPython Input.

OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

MQTT: MQTT Subscribe (JSON payload)~

  • Manufacturer: MQTT
  • Measurements: Variable measurements
  • Interfaces: Mycodo
  • Libraries: paho-mqtt, jmespath
  • Dependencies: paho-mqtt, jmespath

A single topic is subscribed to and the returned JSON payload contains one or more key/value pairs. The given JSON Key is used as a JMESPATH expression to find the corresponding value that will be stored for that channel. Be sure you select and save the Measurement Unit for each channel. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Example expressions for jmespath (https://jmespath.org) include temperature, sensors[0].temperature, and bathroom.temperature which refer to the temperature as a direct key within the first entry of sensors or as a subkey of bathroom, respectively. Jmespath elements and keys that contain special characters have to be enclosed in double quotes, e.g. "sensor-1".temperature. Warning: If using multiple MQTT Inputs or Functions, ensure the Client IDs are unique.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
HostText - Default Value: localhostHost or IP address
PortInteger - Default Value: 1883Host port number
TopicText - Default Value: mqtt/test/inputThe topic to subscribe to
Keep AliveInteger - Default Value: 60Maximum amount of time between received signals. Set to 0 to disable.
Client IDText - Default Value: client_FGIg092mUnique client ID for connecting to the server
Use LoginBooleanSend login credentials
Use TLSBooleanSend login credentials using TLS
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server. Leave blank to disable.
Use WebsocketsBooleanUse websockets to connect to the server.
Channel Options
NameTextA name to distinguish this from others
JMESPATH ExpressionTextJMESPATH expression to find value in JSON response

MQTT: MQTT Subscribe (Value payload)~

  • Manufacturer: MQTT
  • Measurements: Variable measurements
  • Interfaces: Mycodo
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt

A topic is subscribed to for each channel Subscription Topic and the returned payload value will be stored for that channel. Be sure you select and save the Measurement Unit for each of the channels. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Warning: If using multiple MQTT Inputs or Functions, ensure the Client IDs are unique.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
HostText - Default Value: localhostHost or IP address
PortInteger - Default Value: 1883Host port number
Keep AliveInteger - Default Value: 60Maximum amount of time between received signals. Set to 0 to disable.
Client IDText - Default Value: client_mqUgXLvMUnique client ID for connecting to the server
Use LoginBooleanSend login credentials
Use TLSBooleanSend login credentials using TLS
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server. Leave blank to disable.
Use WebsocketsBooleanUse websockets to connect to the server.
Channel Options
NameTextA name to distinguish this from others
Subscription TopicTextThe MQTT topic to subscribe to

Melexis: MLX90393~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Melexis: MLX90614~

  • Manufacturer: Melexis
  • Measurements: Temperature (Ambient/Object)
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Microchip: MCP3008 (Adafruit_CircuitPython_MCP3xxx)~

  • Manufacturer: Microchip
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: UART
  • Libraries: Adafruit_CircuitPython_MCP3xxx
  • Dependencies: adafruit-circuitpython-mcp3xxx
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
VREF (volts)Decimal - Default Value: 3.3Set the VREF voltage

Microchip: MCP3008 (Adafruit_MCP3008)~

  • Manufacturer: Microchip
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: UART
  • Libraries: Adafruit_MCP3008
  • Dependencies: Adafruit-MCP3008
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
VREF (volts)Decimal - Default Value: 3.3Set the VREF voltage

Microchip: MCP3208~

  • Manufacturer: Microchip
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: SPI
  • Libraries: MCP3208
  • Dependencies: Adafruit-GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
Pin: Cable SelectIntegerGPIO (using BCM numbering): Pin: Cable Select
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
SPI BusIntegerThe SPI bus ID.
SPI DeviceIntegerThe SPI device ID.
VREF (volts)Decimal - Default Value: 3.3Set the VREF voltage

Microchip: MCP342x (x=2,3,4,6,7,8)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Microchip: MCP9808~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Multiple Manufacturers: HC-SR04~

OptionTypeDescription
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Trigger PinIntegerEnter the GPIO Trigger Pin for your device (BCM numbering).
Echo PinIntegerEnter the GPIO Echo Pin for your device (BCM numbering).

Panasonic: AMG8833~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Power Monitor: RPi Power Monitor (6 Channels)~

  • Manufacturer: Power Monitor
  • Measurements: AC Voltage, Power, Current, Power Factor
  • Libraries: rpi-power-monitor
  • Dependencies: rpi_power_monitor
  • Manufacturer URL: Link
  • Product URL: Link

See https://github.com/David00/rpi-power-monitor/wiki/Calibrating-for-Accuracy for calibration procedures.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Grid VoltageDecimal - Default Value: 124.2The AC voltage measured at the outlet
Transformer VoltageDecimal - Default Value: 10.2The AC voltage measured at the barrel plug of the 9 VAC transformer
CT1 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT1
CT2 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT2
CT3 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT3
CT4 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT4
CT5 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT5
CT6 Phase CorrectionDecimal - Default Value: 1.0The phase correction value for CT6
CT1 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT1
CT2 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT2
CT3 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT3
CT4 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT4
CT5 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT5
CT6 Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for CT6
AC Accuracy CalibrationDecimal - Default Value: 1.0The accuracy calibration value for AC

ROHM: BH1750~

  • Manufacturer: ROHM
  • Measurements: Light
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Raspberry Pi Foundation: Sense HAT~

  • Manufacturer: Raspberry Pi Foundation
  • Measurements: hum/temp/press/compass/magnet/accel/gyro
  • Interfaces: I2C
  • Libraries: sense-hat
  • Dependencies: git, Bash Commands (see Module for details), sense-hat
  • Manufacturer URL: Link

This module acquires measurements from the Raspberry Pi Sense HAT sensors, which include the LPS25H, LSM9DS1, and HTS221.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Ruuvi: RuuviTag~

OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

STMicroelectronics: VL53L0X~

  • Manufacturer: STMicroelectronics
  • Measurements: Millimeter (Time-of-Flight Distance)
  • Interfaces: I2C
  • Libraries: VL53L0X_rasp_python
  • Dependencies: VL53L0X
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
AccuracySelect(Options: [Good Accuracy (33 ms, 1.2 m range) | Better Accuracy (66 ms, 1.2 m range) | Best Accuracy (200 ms, 1.2 m range) | Long Range (33 ms, 2 m) | High Speed, Low Accuracy (20 ms, 1.2 m)] (Default in bold)Set the accuracy. A longer measurement duration yields a more accurate measurement
Commands
New I2C AddressText - Default Value: 0x52The new I2C to set the device to
Set I2C AddressButton

STMicroelectronics: VL53L1X~

  • Manufacturer: STMicroelectronics
  • Measurements: Millimeter (Time-of-Flight Distance)
  • Interfaces: I2C
  • Libraries: VL53L1X
  • Dependencies: smbus2, vl53l1x
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2

Notes when setting a custom timing budget: A higher timing budget results in greater measurement accuracy, but also a higher power consumption. The inter measurement period must be >= the timing budget, otherwise it will be double the expected value.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
RangeSelect(Options: [Short Range | Medium Range | Long Range | Custom Timing Budget] (Default in bold)Select a range or select to set a custom Timing Budget and Inter Measurement Period.
Timing Budget (microseconds)Integer - Default Value: 66000Set the timing budget. Must be less than or equal to the Inter Measurement Period.
Inter Measurement Period (milliseconds)Integer - Default Value: 70Set the Inter Measurement Period

STMicroelectronics: VL53L4CD~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Timing Budget (ms)Integer - Default Value: 50Set the timing budget between 10 to 200 ms. A longer duration yields a more accurate measurement.
Inter-Measurement Period (ms)IntegerValid range between Timing Budget and 5000 ms (0 to disable)
Commands
The I2C address of the sensor can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate the Input and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x29The new I2C to set the device to
Set I2C AddressButton

Seeedstudio: DHT11/22~

Enter the Grove Pi+ GPIO pin connected to the sensor and select the sensor type.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Sensor TypeSelect(Options: [DHT11 (Blue) | DHT22 (White)] (Default in bold)Sensor type

Senseair: K96~

  • Manufacturer: Senseair
  • Measurements: Methane/Moisture/CO2/Pressure/Humidity/Temperature
  • Interfaces: UART
  • Libraries: Serial
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SCD-4x (40, 41)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimal - Default Value: 4.0Set the sensor temperature offset
Altitude (m)IntegerSet the sensor altitude (meters)
Automatic Self-CalibrationBooleanSet the sensor automatic self-calibration
Persist SettingsBoolean - Default Value: TrueSettings will persist after powering off
Commands
You can force the CO2 calibration for a specific CO2 concentration value (in ppmv). The sensor needs to be active for at least 3 minutes prior to calibration.
CO2 Concentration (ppmv)Decimal - Default Value: 400.0Calibrate to this CO2 concentration that the sensor is being exposed to (in ppmv)
Calibrate CO2Button

Sensirion: SCD30 (Adafruit_CircuitPython_SCD30)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
I2C Frequency: The SCD-30 has temperamental I2C with clock stretching. The datasheet recommends starting at 50,000 Hz.
I2C Frequency (Hz)Integer - Default Value: 50000
Automatic Self Ccalibration (ASC): To work correctly, the sensor must be on and active for 7 days after enabling ASC, and exposed to fresh air for at least 1 hour per day. Consult the manufacturer’s documentation for more information.
Enable Automatic Self CalibrationBoolean
Temperature Offset: Specifies the offset to be added to the reported measurements to account for a bias in the measured signal. Must be a positive value, and will reduce the recorded temperature by that amount. Give the sensor adequate time to acclimate after setting this value. Value is in degrees Celsius with a resolution of 0.01 degrees and a maximum value of 655.35 C.
Temperature OffsetDecimal
Ambient Air Pressure (mBar): Specify the ambient air pressure at the measurement location in mBar. Setting this value adjusts the CO2 measurement calculations to account for the air pressure’s effect on readings. Values must be in mBar, from 700 to 1200 mBar.
Ambient Air Pressure (mBar)Integer - Default Value: 1200
Altitude: Specifies the altitude at the measurement location in meters above sea level. Setting this value adjusts the CO2 measurement calculations to account for the air pressure’s effect on readings.
Altitude (m)Integer - Default Value: 100
Commands
A soft reset restores factory default values.
Soft ResetButton
Forced Re-Calibration: The SCD-30 is placed in an environment with a known CO2 concentration, this concentration value is entered in the CO2 Concentration (ppmv) field, then the Foce Calibration button is pressed. But how do you come up with that known value? That is a caveat of this approach and Sensirion suggests three approaches: 1. Using a separate secondary calibrated CO2 sensor to provide the value. 2. Exposing the SCD-30 to a controlled environment with a known value. 3. Exposing the SCD-30 to fresh outside air and using a value of 400 ppm.
CO2 Concentration (ppmv)Integer - Default Value: 800The CO2 concentration of the sensor environment when forcing calibration
Force RecalibrationButton

Sensirion: SCD30 (scd30_i2c)~

  • Manufacturer: Sensirion
  • Measurements: CO2/Humidity/Temperature
  • Interfaces: I2C
  • Libraries: scd30_i2c
  • Dependencies: scd30-i2c
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URLs: Link 1, Link 2
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Automatic Self Ccalibration (ASC): To work correctly, the sensor must be on and active for 7 days after enabling ASC, and exposed to fresh air for at least 1 hour per day. Consult the manufacturer’s documentation for more information.
Enable Automatic Self CalibrationBoolean
Commands
A soft reset restores factory default values.
Soft ResetButton

Sensirion: SHT1x/7x~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: GPIO
  • Libraries: sht_sensor
  • Dependencies: sht-sensor
  • Manufacturer URLs: Link 1, Link 2
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SHT2x (sht20)~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: sht20
  • Dependencies: sht20
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature ResolutionSelect(Options: [11-bit | 12-bit | 13-bit | 14-bit] (Default in bold)The resolution of the temperature measurement

Sensirion: SHT2x (smbus2)~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SHT31-D~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimalThe temperature offset (degrees Celsius) to apply

Sensirion: SHT3x (30, 31, 35)~

  • Manufacturer: Sensirion
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: Adafruit_SHT31
  • Dependencies: Adafruit-GPIO, Adafruit-SHT31
  • Manufacturer URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Enable HeaterBooleanEnable heater to evaporate condensation. Turn on heater x seconds every y measurements
Heater On Seconds (Seconds)Decimal - Default Value: 1.0How long to turn the heater on
Heater On PeriodInteger - Default Value: 10After how many measurements to turn the heater on. This will repeat

Sensirion: SHT4X~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensirion: SHTC3~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sensorion: SHT31 Smart Gadget~

OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Download Stored DataBoolean - Default Value: TrueDownload the data logged to the device.
Set Logging Interval (Seconds)Integer - Default Value: 600Set the logging interval the device will store measurements on its internal memory.

Silicon Labs: SI1145~

  • Manufacturer: Silicon Labs
  • Measurements: Light (UV/Visible/IR), Proximity (cm)
  • Interfaces: I2C
  • Libraries: si1145
  • Dependencies: SI1145
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Silicon Labs: Si7021~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Sonoff: TH16/10 (Tasmota firmware) with AM2301/Si7021~

  • Manufacturer: Sonoff
  • Measurements: Humidity/Temperature
  • Libraries: requests
  • Dependencies: requests
  • Manufacturer URL: Link

This Input module allows the use of any temperature/humidity sensor with the TH10/TH16. Changing the Sensor Name option changes the key that's queried from the returned dictionary of measurements. If you would like to use this module with a version of this device that uses the AM2301, change Sensor Name to AM2301.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
IP AddressText - Default Value: 192.168.0.100The IP address of the device
Sensor NameText - Default Value: SI7021The name of the sensor connected to the device (specific key name in the returned dictionary)

Sonoff: TH16/10 (Tasmota firmware) with AM2301~

  • Manufacturer: Sonoff
  • Measurements: Humidity/Temperature
  • Libraries: requests
  • Dependencies: requests
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
IP AddressText - Default Value: 192.168.0.100The IP address of the device

Sonoff: TH16/10 (Tasmota firmware) with DS18B20~

  • Manufacturer: Sonoff
  • Measurements: Temperature
  • Libraries: requests
  • Dependencies: requests
  • Manufacturer URL: Link
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
IP AddressText - Default Value: 192.168.0.100The IP address of the device

TE Connectivity: HTU21D (Adafruit_CircuitPython_HTU21D)~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Temperature OffsetDecimalThe temperature offset (degrees Celsius) to apply

TE Connectivity: HTU21D (pigpio)~

  • Manufacturer: TE Connectivity
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
  • Manufacturer: TP-Link
  • Measurements: kilowatt hours
  • Interfaces: IP
  • Libraries: python-kasa
  • Dependencies: python-kasa, aio_msgpack_rpc
  • Manufacturer URL: Link

This measures from several Kasa power devices (plugs/strips) capable of measuring energy consumption. These include, but are not limited to the KP115 and HS600.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Device TypeSelectThe type of Kasa device
HostText - Default Value: 0.0.0.0Host or IP address
Asyncio RPC PortInteger - Default Value: 18108The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Commands
The total kWh can be cleared with the following button or with the Clear Total kWh Function Action. This will also clear all energy stats on the device, not just the total kWh.
Clear Total: Kilowatt-hourButton

Tasmota: Tasmota Outlet Energy Monitor (HTTP)~

  • Manufacturer: Tasmota
  • Measurements: Total Energy, Amps, Watts
  • Interfaces: HTTP
  • Libraries: requests
  • Manufacturer URL: Link
  • Product URL: Link

This input queries the energy usage information from a WiFi outlet that is running the tasmota firmware. There are many WiFi outlets that support tasmota, and many of of those have energy monitoring capabilities. When used with an MQTT Output, you can both control your tasmota outlets as well as mionitor their energy usage.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
HostText - Default Value: 192.168.0.50Host or IP address

Texas Instruments: ADS1015~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.

Texas Instruments: ADS1115: Generic Analog pH/EC~

This input relies on an ADS1115 analog-to-digital converter (ADC) to measure pH and/or electrical conductivity (EC) from analog sensors. You can enable or disable either measurement if you want to only connect a pH sensor or an EC sensor by selecting which measurements you want to under Measurements Enabled. Select which channel each sensor is connected to on the ADC. There are default calibration values initially set for the Input. There are also functions to allow you to easily calibrate your sensors with calibration solutions. If you use the Calibrate Slot actions, these values will be calculated and will replace the currently-set values. You can use the Clear Calibration action to delete the database values and return to using the default values. If you delete the Input or create a new Input to use your ADC/sensors with, you will need to recalibrate in order to store new calibration data.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
ADC Channel: pHSelect(Options: [Channel 0 | Channel 1 | Channel 2 | Channel 3] (Default in bold)The ADC channel the pH sensor is connected
ADC Channel: ECSelect(Options: [Channel 0 | Channel 1 | Channel 2 | Channel 3] (Default in bold)The ADC channel the EC sensor is connected
Temperature Compensation
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
pH Calibration Data
Cal data: V1 (internal)Decimal - Default Value: 1.5Calibration data: Voltage
Cal data: pH1 (internal)Decimal - Default Value: 7.0Calibration data: pH
Cal data: T1 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
Cal data: V2 (internal)Decimal - Default Value: 2.032Calibration data: Voltage
Cal data: pH2 (internal)Decimal - Default Value: 4.0Calibration data: pH
Cal data: T2 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
EC Calibration Data
EC cal data: V1 (internal)Decimal - Default Value: 0.232EC calibration data: Voltage
EC cal data: EC1 (internal)Decimal - Default Value: 1413.0EC calibration data: EC
EC cal data: T1 (internal)Decimal - Default Value: 25.0EC calibration data: EC
EC cal data: V2 (internal)Decimal - Default Value: 2.112EC calibration data: Voltage
EC cal data: EC2 (internal)Decimal - Default Value: 12880.0EC calibration data: EC
EC cal data: T2 (internal)Decimal - Default Value: 25.0EC calibration data: EC
Commands
pH Calibration Actions: Place your probe in a solution of known pH. Set the known pH value in the "Calibration buffer pH" field, and press "Calibrate pH, slot 1". Repeat with a second buffer, and press "Calibrate pH, slot 2". You don't need to change the values under "Custom Options".
Calibration buffer pHDecimal - Default Value: 7.0This is the nominal pH of the calibration buffer, usually labelled on the bottle.
Calibrate pH, slot 1Button
Calibrate pH, slot 2Button
Clear pH Calibration SlotsButton
EC Calibration Actions: Place your probe in a solution of known EC. Set the known EC value in the "Calibration standard EC" field, and press "Calibrate EC, slot 1". Repeat with a second standard, and press "Calibrate EC, slot 2". You don't need to change the values under "Custom Options".
Calibration standard ECDecimal - Default Value: 1413.0This is the nominal EC of the calibration standard, usually labelled on the bottle.
Calibrate EC, slot 1Button
Calibrate EC, slot 2Button
Clear EC Calibration SlotsButton

Texas Instruments: ADS1115~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.

Texas Instruments: ADS1256: Generic Analog pH/EC~

  • Manufacturer: Texas Instruments
  • Measurements: Ion Concentration/Electrical Conductivity
  • Interfaces: UART
  • Libraries: wiringpi, kizniche/PiPyADC-py3
  • Dependencies: wiringpi, pipyadc_py3

This input relies on an ADS1256 analog-to-digital converter (ADC) to measure pH and/or electrical conductivity (EC) from analog sensors. You can enable or disable either measurement if you want to only connect a pH sensor or an EC sensor by selecting which measurements you want to under Measurements Enabled. Select which channel each sensor is connected to on the ADC. There are default calibration values initially set for the Input. There are also functions to allow you to easily calibrate your sensors with calibration solutions. If you use the Calibrate Slot actions, these values will be calculated and will replace the currently-set values. You can use the Clear Calibration action to delete the database values and return to using the default values. If you delete the Input or create a new Input to use your ADC/sensors with, you will need to recalibrate in order to store new calibration data.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
ADC Channel: pHSelect(Options: [Not Connected | Channel 0 | Channel 1 | Channel 2 | Channel 3 | Channel 4 | Channel 5 | Channel 6 | Channel 7] (Default in bold)The ADC channel the pH sensor is connected
ADC Channel: ECSelect(Options: [Not Connected | Channel 0 | Channel 1 | Channel 2 | Channel 3 | Channel 4 | Channel 5 | Channel 6 | Channel 7] (Default in bold)The ADC channel the EC sensor is connected
Temperature Compensation
Temperature Compensation: MeasurementSelect Measurement (Input, Function)Select a measurement for temperature compensation
Temperature Compensation: Max Age (Seconds)Integer - Default Value: 120The maximum age of the measurement to use
pH Calibration Data
Cal data: V1 (internal)Decimal - Default Value: 1.5Calibration data: Voltage
Cal data: pH1 (internal)Decimal - Default Value: 7.0Calibration data: pH
Cal data: T1 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
Cal data: V2 (internal)Decimal - Default Value: 2.032Calibration data: Voltage
Cal data: pH2 (internal)Decimal - Default Value: 4.0Calibration data: pH
Cal data: T2 (internal)Decimal - Default Value: 25.0Calibration data: Temperature
EC Calibration Data
EC cal data: V1 (internal)Decimal - Default Value: 0.232EC calibration data: Voltage
EC cal data: EC1 (internal)Decimal - Default Value: 1413.0EC calibration data: EC
EC cal data: T1 (internal)Decimal - Default Value: 25.0EC calibration data: EC
EC cal data: V2 (internal)Decimal - Default Value: 2.112EC calibration data: Voltage
EC cal data: EC2 (internal)Decimal - Default Value: 12880.0EC calibration data: EC
EC cal data: T2 (internal)Decimal - Default Value: 25.0EC calibration data: EC
CalibrationSelectSet the calibration method to perform during Input activation
Commands
pH Calibration Actions: Place your probe in a solution of known pH. Set the known pH value in the `Calibration buffer pH` field, and press `Calibrate pH, slot 1`. Repeat with a second buffer, and press `Calibrate pH, slot 2`. You don't need to change the values under `Custom Options`.
Calibration buffer pHDecimal - Default Value: 7.0This is the nominal pH of the calibration buffer, usually labelled on the bottle.
Calibrate pH, slot 1Button
Calibrate pH, slot 2Button
Clear pH Calibration SlotsButton
EC Calibration Actions: Place your probe in a solution of known EC. Set the known EC value in the `Calibration standard EC` field, and press `Calibrate EC, slot 1`. Repeat with a second standard, and press `Calibrate EC, slot 2`. You don't need to change the values under `Custom Options`.
Calibration standard ECDecimal - Default Value: 1413.0This is the nominal EC of the calibration standard, usually labelled on the bottle.
Calibrate EC, slot 1Button
Calibrate EC, slot 2Button
Clear EC Calibration SlotsButton

Texas Instruments: ADS1256~

  • Manufacturer: Texas Instruments
  • Measurements: Voltage (Waveshare, Analog-to-Digital Converter)
  • Interfaces: UART
  • Libraries: wiringpi, kizniche/PiPyADC-py3
  • Dependencies: wiringpi, pipyadc_py3
OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
CalibrationSelectSet the calibration method to perform during Input activation

Texas Instruments: ADS1x15~

  • Manufacturer: Texas Instruments
  • Measurements: Voltage (Analog-to-Digital Converter)
  • Interfaces: I2C
  • Libraries: Adafruit_ADS1x15 [DEPRECATED]
  • Dependencies: Adafruit-GPIO, Adafruit-ADS1x15

The Adafruit_ADS1x15 is deprecated. It's advised to use The Circuit Python ADS1x15 Input.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.

Texas Instruments: HDC1000~

  • Manufacturer: Texas Instruments
  • Measurements: Humidity/Temperature
  • Interfaces: I2C
  • Libraries: fcntl/io
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Texas Instruments: INA219x~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurements to AverageInteger - Default Value: 5The number of times to measure each channel. An average of the measurements will be stored.
Calibration RangeSelect(Options: [32V @ 2A max (default) | 32V @ 1A max | 16V @ 400mA max | 16V @ 5A max] (Default in bold)Set the device calibration range
Bus Voltage RangeSelect(Options: [(0x00) - 16V | (0x01) - 32V (default)] (Default in bold)Set the bus voltage range
Bus ADC ResolutionSelect(Options: [(0x00) - 9 Bit / 1 Sample | (0x01) - 10 Bit / 1 Sample | (0x02) - 11 Bit / 1 Sample | (0x03) - 12 Bit / 1 Sample (default) | (0x09) - 12 Bit / 2 Samples | (0x0A) - 12 Bit / 4 Samples | (0x0B) - 12 Bit / 8 Samples | (0x0C) - 12 Bit / 16 Samples | (0x0D) - 12 Bit / 32 Samples | (0x0E) - 12 Bit / 64 Samples | (0x0F) - 12 Bit / 128 Samples] (Default in bold)Set the Bus ADC Resolution.
Shunt ADC ResolutionSelect(Options: [(0x00) - 9 Bit / 1 Sample | (0x01) - 10 Bit / 1 Sample | (0x02) - 11 Bit / 1 Sample | (0x03) - 12 Bit / 1 Sample (default) | (0x09) - 12 Bit / 2 Samples | (0x0A) - 12 Bit / 4 Samples | (0x0B) - 12 Bit / 8 Samples | (0x0C) - 12 Bit / 16 Samples | (0x0D) - 12 Bit / 32 Samples | (0x0E) - 12 Bit / 64 Samples | (0x0F) - 12 Bit / 128 Samples] (Default in bold)Set the Shunt ADC Resolution.

Texas Instruments: TMP006~

  • Manufacturer: Texas Instruments
  • Measurements: Temperature (Object/Die)
  • Interfaces: I2C
  • Libraries: Adafruit_TMP
  • Dependencies: Adafruit-TMP
  • Datasheet URL: Link
  • Product URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

The Things Network: The Things Network: Data Storage (TTN v2)~

  • Manufacturer: The Things Network
  • Measurements: Variable measurements
  • Libraries: requests
  • Dependencies: requests

This Input receives and stores measurements from the Data Storage Integration on The Things Network.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Start Offset (Seconds)IntegerThe duration to wait before the first operation
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Application IDTextThe Things Network Application ID
App API KeyTextThe Things Network Application API Key
Device IDTextThe Things Network Device ID
Channel Options
NameTextA name to distinguish this from others
Variable NameTextThe TTN variable name

The Things Network: The Things Network: Data Storage (TTN v3, Payload Key)~

  • Manufacturer: The Things Network
  • Measurements: Variable measurements
  • Libraries: requests
  • Dependencies: requests

This Input receives and stores measurements from the Data Storage Integration on The Things Network. If you have key/value pairs as your payload, enter the key name in Variable Name and the corresponding value for that key will be stored in the measurement database.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Start Offset (Seconds)IntegerThe duration to wait before the first operation
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Application IDTextThe Things Network Application ID
App API KeyTextThe Things Network Application API Key
Device IDTextThe Things Network Device ID
Channel Options
NameTextA name to distinguish this from others
Variable NameTextThe TTN variable name

The Things Network: The Things Network: Data Storage (TTN v3, Payload jmespath Expression)~

  • Manufacturer: The Things Network
  • Measurements: Variable measurements
  • Libraries: requests, jmespath
  • Dependencies: requests, jmespath

This Input receives and stores measurements from the Data Storage Integration on The Things Network. The given Payload jmespath Expression is used as a JMESPATH expression to find the corresponding value that will be stored for that channel. Be sure you select and save the Measurement Unit for each channel. Once the unit has been saved, you can convert to other units in the Convert Measurement section. Example expressions for jmespath (https://jmespath.org) include temperature, sensors[0].temperature, and bathroom.temperature which refer to the temperature as a direct key within the first entry of sensors or as a subkey of bathroom, respectively. Jmespath elements and keys that contain special characters have to be enclosed in double quotes, e.g. "sensor-1".temperature.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Start Offset (Seconds)IntegerThe duration to wait before the first operation
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Application IDTextThe Things Network Application ID
App API KeyTextThe Things Network Application API Key
Device IDTextThe Things Network Device ID
Channel Options
NameTextA name to distinguish this from others
Payload jmespath ExpressionTextThe TTN jmespath expression to return the value to store

Weather: OpenWeatherMap (City, Current)~

  • Manufacturer: Weather
  • Measurements: Humidity/Temperature/Pressure/Wind
  • Additional URL: Link

Obtain a free API key at openweathermap.org. If the city you enter does not return measurements, try another city. Note: the free API subscription is limited to 60 calls per minute

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
API KeyTextThe API Key for this service's API
CityTextThe city to acquire the weather data

Weather: OpenWeatherMap (Lat/Lon, Current/Future)~

  • Manufacturer: Weather
  • Measurements: Humidity/Temperature/Pressure/Wind
  • Interfaces: Mycodo
  • Additional URL: Link

Obtain a free API key at openweathermap.org. Notes: The free API subscription is limited to 60 calls per minute. If a Day (Future) time is selected, Minimum and Maximum temperatures are available as measurements.

OptionTypeDescription
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
API KeyTextThe API Key for this service's API
Latitude (decimal)Decimal - Default Value: 33.441792The latitude to acquire weather data
Longitude (decimal)Decimal - Default Value: -94.037689The longitude to acquire weather data
TimeSelect(Options: [Current (Present) | 1 Day (Future) | 2 Day (Future) | 3 Day (Future) | 4 Day (Future) | 5 Day (Future) | 6 Day (Future) | 7 Day (Future) | 1 Hour (Future) | 2 Hours (Future) | 3 Hours (Future) | 4 Hours (Future) | 5 Hours (Future) | 6 Hours (Future) | 7 Hours (Future) | 8 Hours (Future) | 9 Hours (Future) | 10 Hours (Future) | 11 Hours (Future) | 12 Hours (Future) | 13 Hours (Future) | 14 Hours (Future) | 15 Hours (Future) | 16 Hours (Future) | 17 Hours (Future) | 18 Hours (Future) | 19 Hours (Future) | 20 Hours (Future) | 21 Hours (Future) | 22 Hours (Future) | 23 Hours (Future) | 24 Hours (Future) | 25 Hours (Future) | 26 Hours (Future) | 27 Hours (Future) | 28 Hours (Future) | 29 Hours (Future) | 30 Hours (Future) | 31 Hours (Future) | 32 Hours (Future) | 33 Hours (Future) | 34 Hours (Future) | 35 Hours (Future) | 36 Hours (Future) | 37 Hours (Future) | 38 Hours (Future) | 39 Hours (Future) | 40 Hours (Future) | 41 Hours (Future) | 42 Hours (Future) | 43 Hours (Future) | 44 Hours (Future) | 45 Hours (Future) | 46 Hours (Future) | 47 Hours (Future) | 48 Hours (Future)] (Default in bold)Select the time for the current or forecast weather

Winsen: MH-Z14A~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART
  • Libraries: serial
  • Dependencies: RPi.GPIO
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Automatic Self-calibrationBoolean - Default Value: TrueEnable automatic self-calibration
Measurement RangeSelect(Options: [400 - 2000 ppmv | 400 - 5000 ppmv | 400 - 10000 ppmv] (Default in bold)Set the measuring range of the sensor
The CO2 measurement can also be obtained using PWM via a GPIO pin. Enter the pin number below or leave blank to disable this option. This also makes it possible to obtain measurements even if the UART interface is not available (note that the sensor can't be configured / calibrated without a working UART interface).
GPIO OverrideTextObtain readings using PWM on this GPIO pin instead of via UART
Commands
Calibrate Zero PointButton
Span Point (ppmv)Integer - Default Value: 2000The ppmv concentration for a span point calibration
Calibrate Span PointButton

Winsen: MH-Z16~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART, I2C
  • Libraries: smbus2/serial
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Winsen: MH-Z19~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART
  • Libraries: serial
  • Datasheet URL: Link

This is the version of the sensor that does not include the ability to conduct automatic baseline correction (ABC). See the B version of the sensor if you wish to use ABC.

OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Measurement RangeSelect(Options: [0 - 1000 ppmv | 0 - 2000 ppmv | 0 - 3000 ppmv | 0 - 5000 ppmv] (Default in bold)Set the measuring range of the sensor
Commands
Calibrate Zero PointButton
Span Point (ppmv)Integer - Default Value: 2000The ppmv concentration for a span point calibration
Calibrate Span PointButton

Winsen: MH-Z19B~

  • Manufacturer: Winsen
  • Measurements: CO2
  • Interfaces: UART
  • Libraries: serial
  • Manufacturer URL: Link
  • Datasheet URL: Link

This is the B version of the sensor that includes the ability to conduct automatic baseline correction (ABC).

OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Automatic Baseline CorrectionBooleanEnable automatic baseline correction (ABC)
Measurement RangeSelect(Options: [0 - 1000 ppmv | 0 - 2000 ppmv | 0 - 3000 ppmv | 0 - 5000 ppmv | 0 - 10000 ppmv] (Default in bold)Set the measuring range of the sensor
Commands
Calibrate Zero PointButton
Span Point (ppmv)Integer - Default Value: 2000The ppmv concentration for a span point calibration
Calibrate Span PointButton

Winsen: ZH03B~

  • Manufacturer: Winsen
  • Measurements: Particulates
  • Interfaces: UART
  • Libraries: serial
  • Manufacturer URL: Link
  • Datasheet URL: Link
OptionTypeDescription
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Fan Off After MeasureBooleanTurn the fan on only during the measurement
Fan On Duration (Seconds)Decimal - Default Value: 50.0How long to turn the fan on before acquiring measurements
Number of MeasurementsInteger - Default Value: 3How many measurements to acquire. If more than 1 are acquired that are less than 1001, the average of the measurements will be stored.

Xiaomi: Miflora~

  • Manufacturer: Xiaomi
  • Measurements: EC/Light/Moisture/Temperature
  • Interfaces: BT
  • Libraries: miflora
  • Dependencies: libglib2.0-dev, miflora, bluepy
OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete

Xiaomi: Mijia LYWSD03MMC (ATC and non-ATC modes)~

More information about ATC mode can be found at https://github.com/JsBergbau/MiTemperature2

OptionTypeDescription
Bluetooth MAC (XX:XX:XX:XX:XX:XX)TextThe Hci location of the Bluetooth device.
Bluetooth Adapter (hci[X])TextThe adapter of the Bluetooth device.
Measurements EnabledMulti-SelectThe measurements to record
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
Enable ATC ModeBooleanEnable sensor ATC mode

ams: AS7341~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Period (Seconds)DecimalThe duration between measurements or actions
Pre OutputSelectTurn the selected output on before taking every measurement
Pre Out Duration (Seconds)DecimalIf a Pre Output is selected, set the duration to turn the Pre Output on for before every measurement is acquired.
Pre During MeasureBooleanCheck to turn the output off after (opposed to before) the measurement is complete
\ No newline at end of file diff --git a/Supported-Outputs/index.html b/Supported-Outputs/index.html index 1400d1413..8a3604f2f 100644 --- a/Supported-Outputs/index.html +++ b/Supported-Outputs/index.html @@ -1 +1 @@ - Supported Outputs - Mycodo
Skip to content

Supported Outputs

Built-In Outputs (System)~

On/Off: MQTT Publish~

  • Manufacturer: Mycodo
  • Interfaces: IP
  • Output Types: On/Off
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt
  • Additional URL: Link

Publish "on" or "off" (or any other strings of your choosing) to an MQTT server.

OptionTypeDescription
Channel Options
HostnameText - Default Value: localhostThe hostname of the MQTT server
PortInteger - Default Value: 1883The port of the MQTT server
TopicText - Default Value: paho/test/singleThe topic to publish with
Keep AliveInteger - Default Value: 60The keepalive timeout value for the client. Set to 0 to disable.
Client IDText - Default Value: client_6GggcConUnique client ID for connecting to the MQTT server
On PayloadText - Default Value: onThe payload to send when turned on
Off PayloadText - Default Value: offThe payload to send when turned off
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled
Use LoginBooleanSend login credentials
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server. Leave blank to disable.
Use WebsocketsBooleanUse websockets to connect to the server.

PWM: MQTT Publish~

  • Manufacturer: Mycodo
  • Output Types: PWM
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt
  • Additional URL: Link

Publish a PWM value to an MQTT server.

OptionTypeDescription
Channel Options
HostnameText - Default Value: localhostThe hostname of the MQTT server
PortInteger - Default Value: 1883The port of the MQTT server
TopicText - Default Value: paho/test/singleThe topic to publish with
Keep AliveInteger - Default Value: 60The keepalive timeout value for the client. Set to 0 to disable.
Client IDText - Default Value: client_tO6tBFpxUnique client ID for connecting to the MQTT server
Use LoginBooleanSend login credentials
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server.
Use WebsocketsBooleanUse websockets to connect to the server.
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

Value: MQTT Publish~

  • Manufacturer: Mycodo
  • Output Types: Value
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt
  • Additional URL: Link

Publish a value to an MQTT server.

OptionTypeDescription
Channel Options
HostnameText - Default Value: localhostThe hostname of the MQTT server
PortInteger - Default Value: 1883The port of the MQTT server
TopicText - Default Value: paho/test/singleThe topic to publish with
Keep AliveInteger - Default Value: 60The keepalive timeout value for the client. Set to 0 to disable.
Client IDText - Default Value: client_4ccOuIPcUnique client ID for connecting to the MQTT server
Off ValueIntegerThe value to send when an Off command is given
Use LoginBooleanSend login credentials
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server.
Use WebsocketsBooleanUse websockets to connect to the server.

Built-In Outputs (Devices)~

Digital Potentiometer: DS3502~

The DS3502 can generate a 0 - 10k Ohm resistance with 7-bit precision. This equates to 128 possible steps. A value, in Ohms, is passed to this output controller and the step value is calculated and passed to the device. Select whether to round up or down to the nearest step.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Round StepSelect(Options: [Up | Down] (Default in bold)Round direction to the nearest step value

Digital-to-Analog Converter: MCP4728~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
VREF (volts)Decimal - Default Value: 4.096Set the VREF voltage
Channel Options
NameTextA name to distinguish this from others
VREFSelect(Options: [Internal | VDD] (Default in bold)Select the channel VREF
GainSelect(Options: [1X | 2X] (Default in bold)Select the channel Gain
Start StateSelect(Options: [Previously-Saved State | Specified Value] (Default in bold)Select the channel start state
Start Value (volts)DecimalIf Specified Value is selected, set the start state value
Shutdown StateSelect(Options: [Previously-Saved Value | Specified Value] (Default in bold)Select the channel shutdown state
Shutdown Value (volts)DecimalIf Specified Value is selected, set the shutdown state value

Motor: Stepper Motor, Bipolar (Generic) (Pi <= 4)~

This is a generic module for bipolar stepper motor drivers such as the DRV8825, A4988, and others. The value passed to the output is the number of steps. A positive value turns clockwise and a negative value turns counter-clockwise.

OptionTypeDescription
Channel Options
If the Direction or Enable pins are not used, make sure you pull the appropriate pins on your driver high or low to set the proper direction and enable the stepper motor to be energized. Note: For Enable Mode, always having the motor energized will use more energy and produce more heat.
Step PinIntegerThe Step pin of the controller (BCM numbering)
Full Step DelayDecimal - Default Value: 0.005The Full Step Delay of the controller
Direction PinIntegerThe Direction pin of the controller (BCM numbering). Set to None to disable.
Enable PinIntegerThe Enable pin of the controller (BCM numbering). Set to None to disable.
Enable ModeSelect(Options: [Only When Turning | Always] (Default in bold)Choose when to pull the enable pin high to energize the motor.
Enable at ShutdownSelect(Options: [Enable | Disable] (Default in bold)Choose whether the enable pin in pulled high (Enable) or low (Disable) when Mycodo shuts down.
If using a Step Resolution other than Full, and all three Mode Pins are set, they will be set high (1) or how (0) according to the values in parentheses to the right of the selected Step Resolution, e.g. (Mode Pin 1, Mode Pin 2, Mode Pin 3).
Step ResolutionSelect(Options: [Full (modes 0, 0, 0) | Half (modes 1, 0, 0) | 1/4 (modes 0, 1, 0) | 1/8 (modes 1, 1, 0) | 1/16 (modes 0, 0, 1) | 1/32 (modes 1, 0, 1)] (Default in bold)The Step Resolution of the controller
Mode Pin 1IntegerThe Mode Pin 1 of the controller (BCM numbering). Set to None to disable.
Mode Pin 2IntegerThe Mode Pin 2 of the controller (BCM numbering). Set to None to disable.
Mode Pin 3IntegerThe Mode Pin 3 of the controller (BCM numbering). Set to None to disable.

Motor: ULN2003 Stepper Motor, Unipolar (Pi <= 4)~

  • Manufacturer: STMicroelectronics
  • Interfaces: GPIO
  • Output Types: Value
  • Libraries: RPi.GPIO, rpimotorlib
  • Dependencies: RPi.GPIO, rpimotorlib
  • Manufacturer URL: Link
  • Datasheet URLs: Link 1, Link 2

This is a module for the ULN2003 driver.

OptionTypeDescription
Channel Options
Notes about connecting the ULN2003...
Pin IN1Integer - Default Value: 18The pin (BCM numbering) connected to IN1 of the ULN2003
Pin IN2Integer - Default Value: 23The pin (BCM numbering) connected to IN2 of the ULN2003
Pin IN3Integer - Default Value: 24The pin (BCM numbering) connected to IN3 of the ULN2003
Pin IN4Integer - Default Value: 25The pin (BCM numbering) connected to IN4 of the ULN2003
Step DelayDecimal - Default Value: 0.001The Step Delay of the controller
Notes about step resolution...
Step ResolutionSelect(Options: [Full | Half | Wave] (Default in bold)The Step Resolution of the controller

On/Off: Grove Multichannel Relay (4- or 8-Channel board)~

  • Manufacturer: Grove
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 4 or 8 channel Grove multichannel relay board.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the relay when Mycodo starts
Shutdown StateSelectSet the state of the relay when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa HS300 6-Outlet WiFi Power Strip (old library, deprecated)~

  • Manufacturer: TP-Link
  • Interfaces: IP
  • Output Types: On/Off
  • Dependencies: python-kasa
  • Manufacturer URL: Link

This output controls the 6 outlets of the Kasa HS300 Smart WiFi Power Strip. This module uses an outdated python library and is deprecated. Do not use it. You will break the current Kasa modules if you do not delete this deprecated Output.

OptionTypeDescription
HostText - Default Value: 192.168.0.50Host or IP address
Status Update (Seconds)Integer - Default Value: 60The period between checking if connected and output states.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa HS300 6-Outlet WiFi Power Strip~

This output controls the 6 outlets of the Kasa HS300 Smart WiFi Power Strip. This is a variant that uses the latest python-kasa library. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18308The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa KP303 3-Outlet WiFi Power Strip (old library, deprecated)~

  • Manufacturer: TP-Link
  • Interfaces: IP
  • Output Types: On/Off
  • Dependencies: python-kasa
  • Manufacturer URL: Link

This output controls the 3 outlets of the Kasa KP303 Smart WiFi Power Strip. This module uses an outdated python library and is deprecated. Do not use it. You will break the current Kasa modules if you do not delete this deprecated Output.

OptionTypeDescription
HostText - Default Value: 192.168.0.50Host or IP address
Status Update (Seconds)Integer - Default Value: 60The period between checking if connected and output states.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa KP303 3-Outlet WiFi Power Strip~

This output controls the 3 outlets of the Kasa KP303 Smart WiFi Power Strip. This is a variant that uses the latest python-kasa library. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18575The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa WiFi Power Plug~

This output controls Kasa WiFi Power Plugs, including the KP105, KP115, KP125, KP401, HS100, HS103, HS105, HS107, and HS110. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18331The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa WiFi RGB Light Bulb~

This output controls the the Kasa WiFi Light Bulbs, including the KL125, KL130, and KL135. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18299The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Brightness (Percent)IntegerThe brightness to set, in percent (0 - 100)
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Hue (Degree)IntegerThe hue to set, in degrees (0 - 360)
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Saturation (Percent)IntegerThe saturation to set, in percent (0 - 100)
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Color Temperature (Kelvin)IntegerThe color temperature to set, in degrees Kelvin
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
HSVText - Default Value: 220, 20, 45The hue, saturation, brightness to set, e.g. "200, 20, 50"
SetButton
Transition (Milliseconds)Integer - Default Value: 1000The transition period
OnButton
Transition (Milliseconds)Integer - Default Value: 1000The transition period
OffButton

On/Off: MCP23017 16-Channel I/O Expander~

Controls the 16 channels of the MCP23017.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Neopixel (WS2812) RGB Strip with Raspberry Pi~

Control the LEDs of a neopixel light strip. USE WITH CAUTION: This library uses the Hardware-PWM0 bus. Only GPIO pins 12 or 18 will work. If you use one of these pins for a NeoPixel strip, you can not use the other for Hardware-PWM control of another output or there will be conflicts that can cause the Mycodo Daemon to crash and the Pi to become unresponsive. If you need to control another PWM output like a servo, fan, or dimmable grow lights, you will need to use the Software-PWM by setting the Output PWM: Raspberry Pi GPIO and set the "Library" field to "Any Pin, <=40kHz". If you select the "Hardware Pin, <=30MHz" option, it will cause conflicts. This output is best used with Actions to control individual LED color and brightness.

OptionTypeDescription
Data PinInteger - Default Value: 18Enter the GPIO Pin connected to your device data wire (BCM numbering).
Number of LEDsInteger - Default Value: 1How many LEDs in the string?
On ModeSelect(Options: [Single Color | Rainbow] (Default in bold)The color mode when turned on
Single ColorText - Default Value: 30, 30, 30The Color when turning on in Single Color Mode, RGB format (red, green, blue), 0 - 255 each.
Rainbow Speed (Seconds)Decimal - Default Value: 0.01The speed to change colors in Rainbow Mode
Rainbow BrightnessInteger - Default Value: 20The maximum brightness of LEDs in Rainbow Mode (1 - 255)
Rainbow ModeSelect(Options: [All LEDs change at once | One LED Changes at a time] (Default in bold)How the rainbow is displayed
Channel Options
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Commands
LED PositionIntegerWhich LED in the strip to change
RGB ColorText - Default Value: 10, 0, 0The color (e.g 10, 0, 0)
SetButton

On/Off: PCF8574 8-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 8 channels of the PCF8574.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: PCF8575 16-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 16 channels of the PCF8575.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Python Code~

  • Interfaces: Python
  • Output Types: On/Off
  • Dependencies: pylint

Python 3 code will be executed when this output is turned on or off.

OptionTypeDescription
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving
Channel Options
On CommandPython code to execute when the output is instructed to turn on
Off CommandPython code to execute when the output is instructed to turn off
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Raspberry Pi GPIO (Pi 5)~

  • Interfaces: GPIO
  • Output Types: On/Off
  • Libraries: pinctrl

The specified GPIO pin will be set HIGH (3.3 volts) or LOW (0 volts) when turned on or off, depending on the On State option.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Raspberry Pi GPIO (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: On/Off
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO

The specified GPIO pin will be set HIGH (3.3 volts) or LOW (0 volts) when turned on or off, depending on the On State option.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Sequent Microsystems 8-Relay HAT for Raspberry Pi~

  • Manufacturer: Sequent Microsystems
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 8 relays of the 8-relay HAT made by Sequent Microsystems. 8 of these boards can be used simultaneously, allowing 64 relays to be controlled.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Board Stack NumberSelectSelect the board stack number when multiple boards are used
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Shell Script~

  • Output Types: On/Off
  • Libraries: subprocess.Popen

Commands will be executed in the Linux shell by the specified user when this output is turned on or off.

OptionTypeDescription
Channel Options
On CommandText - Default Value: /home/pi/script_on_off.sh onCommand to execute when the output is instructed to turn on
Off CommandText - Default Value: /home/pi/script_on_off.sh offCommand to execute when the output is instructed to turn off
UserText - Default Value: mycodoThe user to execute the command
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Sparkfun Relay Board (4 Relays)~

  • Manufacturer: Sparkfun
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: sparkfun-qwiic-relay
  • Dependencies: sparkfun-qwiic-relay
  • Manufacturer URL: Link
  • Product URLs: Link 1, Link 2

Controls the 4 relays of the relay module.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Wireless 315/433 MHz (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: On/Off
  • Libraries: rpi-rf
  • Dependencies: RPi.GPIO, rpi_rf

This output uses a 315 or 433 MHz transmitter to turn wireless power outlets on or off. Run /opt/Mycodo/mycodo/devices/wireless_rpi_rf.py with a receiver to discover the codes produced from your remote.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
On CommandText - Default Value: 22559Command to execute when the output is instructed to turn on
Off CommandText - Default Value: 22558Command to execute when the output is instructed to turn off
ProtocolSelect(Options: [1 | 2 | 3 | 4 | 5] (Default in bold)
Pulse LengthInteger - Default Value: 189
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: XL9535 16-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 16 channels of the XL9535.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

PWM: PCA9685 16-Channel LED Controller~

  • Manufacturer: NXP Semiconductors
  • Interfaces: I2C
  • Output Types: PWM
  • Libraries: adafruit-pca9685
  • Dependencies: adafruit-pca9685
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

The PCA9685 can output a PWM signal to 16 channels at a frequency between 40 and 1600 Hz.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Frequency (Hertz)Integer - Default Value: 1600The Herts to output the PWM signal (40 - 1600)
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Current (Amps)DecimalThe current draw of the device being controlled

PWM: Python 3 Code~

  • Interfaces: Python
  • Output Types: PWM
  • Dependencies: pylint

Python 3 code will be executed when this output is turned on or off. The "duty_cycle" object is a float value that represents the duty cycle that has been set.

OptionTypeDescription
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving
Channel Options
Python 3 CodePython code to execute to set the PWM duty cycle (%)
UserText - Default Value: mycodoThe user to execute the command
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

PWM: Raspberry Pi GPIO (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: PWM
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio

See the PWM section of the manual for PWM information and determining which pins may be used for each library option.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
LibrarySelect(Options: [Any Pin, <= 40 kHz | Hardware Pin, <= 30 MHz] (Default in bold)Which method to produce the PWM signal (hardware pins can produce higher frequencies)
Frequency (Hertz)Integer - Default Value: 22000The Herts to output the PWM signal (0 - 70,000)
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

PWM: Shell Script~

  • Interfaces: Shell
  • Output Types: PWM
  • Libraries: subprocess.Popen

Commands will be executed in the Linux shell by the specified user when the duty cycle is set for this output. The string "((duty_cycle))" in the command will be replaced with the duty cycle being set prior to execution.

OptionTypeDescription
Channel Options
Bash CommandText - Default Value: /home/pi/script_pwm.sh ((duty_cycle))Command to execute to set the PWM duty cycle (%)
UserText - Default Value: mycodoThe user to execute the command
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

Peristaltic Pump: Atlas Scientific~

  • Manufacturer: Atlas Scientific
  • Interfaces: I2C, UART, FTDI
  • Output Types: Volume, On/Off
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Atlas Scientific peristaltic pumps can be set to dispense at their maximum rate or a rate can be specified. Their minimum flow rate is 0.5 ml/min and their maximum is 105 ml/min.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Channel Options
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Calibration: a calibration can be performed to increase the accuracy of the pump. It's a good idea to clear the calibration before calibrating. First, remove all air from the line by pumping the fluid you would like to calibrate to through the pump hose. Next, press Dispense Amount and the pump will be instructed to dispense 10 ml (unless you changed the default value). Measure how much fluid was actually dispensed, enter this value in the Actual Volume Dispensed (ml) field, and press Calibrate to Dispensed Amount. Now any further pump volumes dispensed should be accurate.
Clear CalibrationButton
Volume to Dispense (ml)Decimal - Default Value: 10.0The volume (ml) that is instructed to be dispensed
Dispense AmountButton
Actual Volume Dispensed (ml)Decimal - Default Value: 10.0The actual volume (ml) that was dispensed
Calibrate to Dispensed AmountButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x67The new I2C to set the device to
Set I2C AddressButton

Peristaltic Pump: Grove I2C Motor Driver (Board v1.3)~

  • Manufacturer: Grove
  • Interfaces: I2C
  • Output Types: Volume, On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link

Controls the Grove I2C Motor Driver Board (v1.3). Both motors will turn at the same time. This output can also dispense volumes of fluid if the motors are attached to peristaltic pumps.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Motor Speed (0 - 100)Integer - Default Value: 100The motor output that determines the speed
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Fastest Rate (ml/min)Decimal - Default Value: 100.0The fastest rate that the pump can dispense (ml/min)

Peristaltic Pump: Grove I2C Motor Driver (TB6612FNG, Board v1.0)~

  • Manufacturer: Grove
  • Interfaces: I2C
  • Output Types: Volume, On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link

Controls the Grove I2C Motor Driver Board (v1.3). Both motors will turn at the same time. This output can also dispense volumes of fluid if the motors are attached to peristaltic pumps.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Motor Speed (0 - 255)Integer - Default Value: 255The motor output that determines the speed
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Fastest Rate (ml/min)Decimal - Default Value: 100.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump turns on for every 60 second period (only used for Specify Flow Rate mode).
Commands
New I2C AddressText - Default Value: 0x14The new I2C to set the sensor to
Set I2C AddressButton

Peristaltic Pump: L298N DC Motor Controller (Pi <= 4)~

  • Manufacturer: STMicroelectronics
  • Interfaces: GPIO
  • Output Types: Volume, On/Off
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
  • Additional URL: Link

The L298N can control 2 DC motors, both speed and direction. If these motors control peristaltic pumps, set the Flow Rate and the output can can be instructed to dispense volumes accurately in addition to being turned on for durations.

OptionTypeDescription
Channel Options
NameTextA name to distinguish this from others
Input Pin 1IntegerThe Input Pin 1 of the controller (BCM numbering)
Input Pin 2IntegerThe Input Pin 2 of the controller (BCM numbering)
Use Enable PinBoolean - Default Value: TrueEnable the use of the Enable Pin
Enable PinIntegerThe Enable pin of the controller (BCM numbering)
Enable Pin Duty CycleInteger - Default Value: 50The duty cycle to apply to the Enable Pin (percent, 1 - 100)
DirectionSelect(Options: [Forward | Backward] (Default in bold)The direction to turn the motor
Volume Rate (ml/min)Decimal - Default Value: 150.0If a pump, the measured flow rate (ml/min) at the set Duty Cycle

Peristaltic Pump: MCP23017 16-Channel I/O Expander~

Controls the 16 channels of the MCP23017 with a relay and peristaltic pump connected to each channel.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the output channel that corresponds to the pump being on
Fastest Rate (ml/min)Decimal - Default Value: 150.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump should be turned on for every 60 second period
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled

Peristaltic Pump: PCF8574 8-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: Volume, On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 8 channels of the PCF8574 with a relay and peristaltic pump connected to each channel.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the output channel that corresponds to the pump being on
Fastest Rate (ml/min)Decimal - Default Value: 150.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump should be turned on for every 60 second period
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled

Peristaltic Pump: Raspberry Pi GPIO (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: Volume, On/Off
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO

This output turns a GPIO pin HIGH and LOW to control power to a generic peristaltic pump. The peristaltic pump can then be turned on for a duration or, after determining the pump's maximum flow rate, instructed to dispense a specific volume at the maximum rate or at a specified rate.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Fastest Rate (ml/min)Decimal - Default Value: 150.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump should be turned on for every 60 second period
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled

Remote Mycodo Output: On/Off~

  • Interfaces: API
  • Output Types: On/Off
  • Libraries: requests
  • Dependencies: requests

This Output allows remote control of another Mycodo On/Off Output over a network using the API.

OptionTypeDescription
Remote Mycodo HostTextThe host or IP address of the remote Mycodo
Remote Mycodo API KeyTextThe API key of the remote Mycodo
State Query Period (Seconds)Integer - Default Value: 120How often to query the state of the output
Channel Options
Remote Mycodo OutputThe Remote Mycodo Output to control
Startup StateSelect(Options: [Do Nothing | Off | On] (Default in bold)Set the state when Mycodo starts
Shutdown StateSelect(Options: [Do Nothing | Off | On] (Default in bold)Set the state when Mycodo shuts down
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup

Remote Mycodo Output: PWM~

  • Interfaces: API
  • Output Types: PWM
  • Libraries: requests
  • Dependencies: requests

This Output allows remote control of another Mycodo PWM Output over a network using the API.

OptionTypeDescription
Remote Mycodo HostTextThe host or IP address of the remote Mycodo
Remote Mycodo API KeyTextThe API key of the remote Mycodo
State Query Period (Seconds)Integer - Default Value: 120How often to query the state of the output
Channel Options
Remote Mycodo OutputThe Remote Mycodo Output to control
Startup StateSelectSet the state when Mycodo starts
Start Duty CycleDecimalThe duty cycle to set at startup, if enabled
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown Duty CycleDecimalThe duty cycle to set at shutdown, if enabled
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

Spacer~

A spacer to organize Outputs.

OptionTypeDescription
ColorText - Default Value: #000000The color of the name text

Value: GP8XXX (8413, 8403) 2-Channel DAC: 0-10 VDC~

Output 0 to 10 VDC signal. GP8403: 12bit DAC Dual Channel I2C to 0-5V/0-10V | GP8413: 15bit DAC Dual Channel I2C to 0-10V

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
DeviceSelect(Options: [GP8403 12-bit | GP8413 15-bit] (Default in bold)Select your GP8XXX device
Channel Options
Start StateSelect(Options: [Previously-Saved State | Specified Value] (Default in bold)Select the channel start state
Start Value (volts)DecimalIf Specified Value is selected, set the start state value
Shutdown StateSelect(Options: [Previously-Saved Value | Specified Value] (Default in bold)Select the channel shutdown state
Shutdown Value (volts)DecimalIf Specified Value is selected, set the shutdown state value
Off Value (volts)DecimalIf Specified Value to apply when turned off
\ No newline at end of file + Supported Outputs - Mycodo
Skip to content

Supported Outputs

Built-In Outputs (System)~

On/Off: MQTT Publish~

  • Manufacturer: Mycodo
  • Interfaces: IP
  • Output Types: On/Off
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt
  • Additional URL: Link

Publish "on" or "off" (or any other strings of your choosing) to an MQTT server.

OptionTypeDescription
Channel Options
HostnameText - Default Value: localhostThe hostname of the MQTT server
PortInteger - Default Value: 1883The port of the MQTT server
TopicText - Default Value: paho/test/singleThe topic to publish with
Keep AliveInteger - Default Value: 60The keepalive timeout value for the client. Set to 0 to disable.
Client IDText - Default Value: client_6GggcConUnique client ID for connecting to the MQTT server
On PayloadText - Default Value: onThe payload to send when turned on
Off PayloadText - Default Value: offThe payload to send when turned off
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled
Use LoginBooleanSend login credentials
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server. Leave blank to disable.
Use WebsocketsBooleanUse websockets to connect to the server.

PWM: MQTT Publish~

  • Manufacturer: Mycodo
  • Output Types: PWM
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt
  • Additional URL: Link

Publish a PWM value to an MQTT server.

OptionTypeDescription
Channel Options
HostnameText - Default Value: localhostThe hostname of the MQTT server
PortInteger - Default Value: 1883The port of the MQTT server
TopicText - Default Value: paho/test/singleThe topic to publish with
Keep AliveInteger - Default Value: 60The keepalive timeout value for the client. Set to 0 to disable.
Client IDText - Default Value: client_tO6tBFpxUnique client ID for connecting to the MQTT server
Use LoginBooleanSend login credentials
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server.
Use WebsocketsBooleanUse websockets to connect to the server.
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

Value: MQTT Publish~

  • Manufacturer: Mycodo
  • Output Types: Value
  • Libraries: paho-mqtt
  • Dependencies: paho-mqtt
  • Additional URL: Link

Publish a value to an MQTT server.

OptionTypeDescription
Channel Options
HostnameText - Default Value: localhostThe hostname of the MQTT server
PortInteger - Default Value: 1883The port of the MQTT server
TopicText - Default Value: paho/test/singleThe topic to publish with
Keep AliveInteger - Default Value: 60The keepalive timeout value for the client. Set to 0 to disable.
Client IDText - Default Value: client_4ccOuIPcUnique client ID for connecting to the MQTT server
Off ValueIntegerThe value to send when an Off command is given
Use LoginBooleanSend login credentials
UsernameText - Default Value: userUsername for connecting to the server
PasswordTextPassword for connecting to the server.
Use WebsocketsBooleanUse websockets to connect to the server.

Built-In Outputs (Devices)~

Digital Potentiometer: DS3502~

The DS3502 can generate a 0 - 10k Ohm resistance with 7-bit precision. This equates to 128 possible steps. A value, in Ohms, is passed to this output controller and the step value is calculated and passed to the device. Select whether to round up or down to the nearest step.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Round StepSelect(Options: [Up | Down] (Default in bold)Round direction to the nearest step value

Digital-to-Analog Converter: MCP4728~

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
VREF (volts)Decimal - Default Value: 4.096Set the VREF voltage
Channel Options
NameTextA name to distinguish this from others
VREFSelect(Options: [Internal | VDD] (Default in bold)Select the channel VREF
GainSelect(Options: [1X | 2X] (Default in bold)Select the channel Gain
Start StateSelect(Options: [Previously-Saved State | Specified Value] (Default in bold)Select the channel start state
Start Value (volts)DecimalIf Specified Value is selected, set the start state value
Shutdown StateSelect(Options: [Previously-Saved Value | Specified Value] (Default in bold)Select the channel shutdown state
Shutdown Value (volts)DecimalIf Specified Value is selected, set the shutdown state value

Motor: Stepper Motor, Bipolar (Generic) (Pi <= 4)~

This is a generic module for bipolar stepper motor drivers such as the DRV8825, A4988, and others. The value passed to the output is the number of steps. A positive value turns clockwise and a negative value turns counter-clockwise.

OptionTypeDescription
Channel Options
If the Direction or Enable pins are not used, make sure you pull the appropriate pins on your driver high or low to set the proper direction and enable the stepper motor to be energized. Note: For Enable Mode, always having the motor energized will use more energy and produce more heat.
Step PinIntegerThe Step pin of the controller (BCM numbering)
Full Step DelayDecimal - Default Value: 0.005The Full Step Delay of the controller
Direction PinIntegerThe Direction pin of the controller (BCM numbering). Set to None to disable.
Enable PinIntegerThe Enable pin of the controller (BCM numbering). Set to None to disable.
Enable ModeSelect(Options: [Only When Turning | Always] (Default in bold)Choose when to pull the enable pin high to energize the motor.
Enable at ShutdownSelect(Options: [Enable | Disable] (Default in bold)Choose whether the enable pin in pulled high (Enable) or low (Disable) when Mycodo shuts down.
If using a Step Resolution other than Full, and all three Mode Pins are set, they will be set high (1) or how (0) according to the values in parentheses to the right of the selected Step Resolution, e.g. (Mode Pin 1, Mode Pin 2, Mode Pin 3).
Step ResolutionSelect(Options: [Full (modes 0, 0, 0) | Half (modes 1, 0, 0) | 1/4 (modes 0, 1, 0) | 1/8 (modes 1, 1, 0) | 1/16 (modes 0, 0, 1) | 1/32 (modes 1, 0, 1)] (Default in bold)The Step Resolution of the controller
Mode Pin 1IntegerThe Mode Pin 1 of the controller (BCM numbering). Set to None to disable.
Mode Pin 2IntegerThe Mode Pin 2 of the controller (BCM numbering). Set to None to disable.
Mode Pin 3IntegerThe Mode Pin 3 of the controller (BCM numbering). Set to None to disable.

Motor: ULN2003 Stepper Motor, Unipolar (Pi <= 4)~

  • Manufacturer: STMicroelectronics
  • Interfaces: GPIO
  • Output Types: Value
  • Libraries: RPi.GPIO, rpimotorlib
  • Dependencies: RPi.GPIO, rpimotorlib
  • Manufacturer URL: Link
  • Datasheet URLs: Link 1, Link 2

This is a module for the ULN2003 driver.

OptionTypeDescription
Channel Options
Notes about connecting the ULN2003...
Pin IN1Integer - Default Value: 18The pin (BCM numbering) connected to IN1 of the ULN2003
Pin IN2Integer - Default Value: 23The pin (BCM numbering) connected to IN2 of the ULN2003
Pin IN3Integer - Default Value: 24The pin (BCM numbering) connected to IN3 of the ULN2003
Pin IN4Integer - Default Value: 25The pin (BCM numbering) connected to IN4 of the ULN2003
Step DelayDecimal - Default Value: 0.001The Step Delay of the controller
Notes about step resolution...
Step ResolutionSelect(Options: [Full | Half | Wave] (Default in bold)The Step Resolution of the controller

On/Off: Grove Multichannel Relay (4- or 8-Channel board)~

  • Manufacturer: Grove
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 4 or 8 channel Grove multichannel relay board.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the relay when Mycodo starts
Shutdown StateSelectSet the state of the relay when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa HS300 6-Outlet WiFi Power Strip (old library, deprecated)~

  • Manufacturer: TP-Link
  • Interfaces: IP
  • Output Types: On/Off
  • Dependencies: python-kasa
  • Manufacturer URL: Link

This output controls the 6 outlets of the Kasa HS300 Smart WiFi Power Strip. This module uses an outdated python library and is deprecated. Do not use it. You will break the current Kasa modules if you do not delete this deprecated Output.

OptionTypeDescription
HostText - Default Value: 192.168.0.50Host or IP address
Status Update (Seconds)Integer - Default Value: 60The period between checking if connected and output states.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa HS300 6-Outlet WiFi Power Strip~

This output controls the 6 outlets of the Kasa HS300 Smart WiFi Power Strip. This is a variant that uses the latest python-kasa library. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18308The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa KP303 3-Outlet WiFi Power Strip (old library, deprecated)~

  • Manufacturer: TP-Link
  • Interfaces: IP
  • Output Types: On/Off
  • Dependencies: python-kasa
  • Manufacturer URL: Link

This output controls the 3 outlets of the Kasa KP303 Smart WiFi Power Strip. This module uses an outdated python library and is deprecated. Do not use it. You will break the current Kasa modules if you do not delete this deprecated Output.

OptionTypeDescription
HostText - Default Value: 192.168.0.50Host or IP address
Status Update (Seconds)Integer - Default Value: 60The period between checking if connected and output states.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa KP303 3-Outlet WiFi Power Strip~

This output controls the 3 outlets of the Kasa KP303 Smart WiFi Power Strip. This is a variant that uses the latest python-kasa library. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18575The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
NameText - Default Value: Outlet NameA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa WiFi Power Plug~

This output controls Kasa WiFi Power Plugs, including the KP105, KP115, KP125, KP401, HS100, HS103, HS105, HS107, and HS110. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18331The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Kasa WiFi RGB Light Bulb~

This output controls the the Kasa WiFi Light Bulbs, including the KL125, KL130, and KL135. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.

OptionTypeDescription
HostText - Default Value: 0.0.0.0Host or IP address
Status Update (Seconds)Integer - Default Value: 300The period between checking if connected and output states. 0 disables.
Asyncio RPC PortInteger - Default Value: 18299The port to start the asyncio RPC server. Must be unique from other Kasa Outputs.
Channel Options
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Brightness (Percent)IntegerThe brightness to set, in percent (0 - 100)
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Hue (Degree)IntegerThe hue to set, in degrees (0 - 360)
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Saturation (Percent)IntegerThe saturation to set, in percent (0 - 100)
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
Color Temperature (Kelvin)IntegerThe color temperature to set, in degrees Kelvin
SetButton
Transition (Milliseconds)Integer - Default Value: 0The hsv transition period
HSVText - Default Value: 220, 20, 45The hue, saturation, brightness to set, e.g. "200, 20, 50"
SetButton
Transition (Milliseconds)Integer - Default Value: 1000The transition period
OnButton
Transition (Milliseconds)Integer - Default Value: 1000The transition period
OffButton

On/Off: MCP23017 16-Channel I/O Expander~

Controls the 16 channels of the MCP23017.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Neopixel (WS2812) RGB Strip with Raspberry Pi~

Control the LEDs of a neopixel light strip. USE WITH CAUTION: This library uses the Hardware-PWM0 bus. Only GPIO pins 12 or 18 will work. If you use one of these pins for a NeoPixel strip, you can not use the other for Hardware-PWM control of another output or there will be conflicts that can cause the Mycodo Daemon to crash and the Pi to become unresponsive. If you need to control another PWM output like a servo, fan, or dimmable grow lights, you will need to use the Software-PWM by setting the Output PWM: Raspberry Pi GPIO and set the "Library" field to "Any Pin, <=40kHz". If you select the "Hardware Pin, <=30MHz" option, it will cause conflicts. This output is best used with Actions to control individual LED color and brightness.

OptionTypeDescription
Data PinInteger - Default Value: 18Enter the GPIO Pin connected to your device data wire (BCM numbering).
Number of LEDsInteger - Default Value: 1How many LEDs in the string?
On ModeSelect(Options: [Single Color | Rainbow] (Default in bold)The color mode when turned on
Single ColorText - Default Value: 30, 30, 30The Color when turning on in Single Color Mode, RGB format (red, green, blue), 0 - 255 each.
Rainbow Speed (Seconds)Decimal - Default Value: 0.01The speed to change colors in Rainbow Mode
Rainbow BrightnessInteger - Default Value: 20The maximum brightness of LEDs in Rainbow Mode (1 - 255)
Rainbow ModeSelect(Options: [All LEDs change at once | One LED Changes at a time] (Default in bold)How the rainbow is displayed
Channel Options
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Commands
LED PositionIntegerWhich LED in the strip to change
RGB ColorText - Default Value: 10, 0, 0The color (e.g 10, 0, 0)
SetButton

On/Off: PCF8574 8-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 8 channels of the PCF8574.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: PCF8575 16-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 16 channels of the PCF8575.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Python Code~

  • Interfaces: Python
  • Output Types: On/Off
  • Dependencies: pylint

Python 3 code will be executed when this output is turned on or off.

OptionTypeDescription
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving
Channel Options
On CommandPython code to execute when the output is instructed to turn on
Off CommandPython code to execute when the output is instructed to turn off
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Raspberry Pi GPIO (Pi 5)~

  • Interfaces: GPIO
  • Output Types: On/Off
  • Libraries: pinctrl

The specified GPIO pin will be set HIGH (3.3 volts) or LOW (0 volts) when turned on or off, depending on the On State option.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Raspberry Pi GPIO (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: On/Off
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO

The specified GPIO pin will be set HIGH (3.3 volts) or LOW (0 volts) when turned on or off, depending on the On State option.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Sequent Microsystems 8-Relay HAT for Raspberry Pi~

  • Manufacturer: Sequent Microsystems
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 8 relays of the 8-relay HAT made by Sequent Microsystems. 8 of these boards can be used simultaneously, allowing 64 relays to be controlled.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Board Stack NumberSelectSelect the board stack number when multiple boards are used
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Shell Script~

  • Output Types: On/Off
  • Libraries: subprocess.Popen

Commands will be executed in the Linux shell by the specified user when this output is turned on or off.

OptionTypeDescription
Channel Options
On CommandText - Default Value: /home/pi/script_on_off.sh onCommand to execute when the output is instructed to turn on
Off CommandText - Default Value: /home/pi/script_on_off.sh offCommand to execute when the output is instructed to turn off
UserText - Default Value: mycodoThe user to execute the command
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Sparkfun Relay Board (4 Relays)~

  • Manufacturer: Sparkfun
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: sparkfun-qwiic-relay
  • Dependencies: sparkfun-qwiic-relay
  • Manufacturer URL: Link
  • Product URLs: Link 1, Link 2

Controls the 4 relays of the relay module.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: Wireless 315/433 MHz (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: On/Off
  • Libraries: rpi-rf
  • Dependencies: RPi.GPIO, rpi_rf

This output uses a 315 or 433 MHz transmitter to turn wireless power outlets on or off. Run /opt/Mycodo/mycodo/devices/wireless_rpi_rf.py with a receiver to discover the codes produced from your remote.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
On CommandText - Default Value: 22559Command to execute when the output is instructed to turn on
Off CommandText - Default Value: 22558Command to execute when the output is instructed to turn off
ProtocolSelect(Options: [1 | 2 | 3 | 4 | 5] (Default in bold)
Pulse LengthInteger - Default Value: 189
Startup StateSelectSet the state when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Force CommandBooleanAlways send the command, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

On/Off: XL9535 16-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 16 channels of the XL9535.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state of the GPIO when Mycodo starts
Shutdown StateSelectSet the state of the GPIO when Mycodo shuts down
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup
Current (Amps)DecimalThe current draw of the device being controlled

PWM: PCA9685 16-Channel LED Controller~

  • Manufacturer: NXP Semiconductors
  • Interfaces: I2C
  • Output Types: PWM
  • Libraries: adafruit-pca9685
  • Dependencies: adafruit-pca9685
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

The PCA9685 can output a PWM signal to 16 channels at a frequency between 40 and 1600 Hz.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Frequency (Hertz)Integer - Default Value: 1600The Herts to output the PWM signal (40 - 1600)
Channel Options
NameTextA name to distinguish this from others
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Current (Amps)DecimalThe current draw of the device being controlled

PWM: Python 3 Code~

  • Interfaces: Python
  • Output Types: PWM
  • Dependencies: pylint

Python 3 code will be executed when this output is turned on or off. The "duty_cycle" object is a float value that represents the duty cycle that has been set.

OptionTypeDescription
Analyze Python Code with PylintBoolean - Default Value: TrueAnalyze your Python code with pylint when saving
Channel Options
Python 3 CodePython code to execute to set the PWM duty cycle (%)
UserText - Default Value: mycodoThe user to execute the command
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

PWM: Raspberry Pi GPIO (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: PWM
  • Libraries: pigpio
  • Dependencies: pigpio, pigpio

See the PWM section of the manual for PWM information and determining which pins may be used for each library option.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
LibrarySelect(Options: [Any Pin, <= 40 kHz | Hardware Pin, <= 30 MHz] (Default in bold)Which method to produce the PWM signal (hardware pins can produce higher frequencies)
Frequency (Hertz)Integer - Default Value: 22000The Herts to output the PWM signal (0 - 70,000)
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

PWM: Shell Script~

  • Interfaces: Shell
  • Output Types: PWM
  • Libraries: subprocess.Popen

Commands will be executed in the Linux shell by the specified user when the duty cycle is set for this output. The string "((duty_cycle))" in the command will be replaced with the duty cycle being set prior to execution.

OptionTypeDescription
Channel Options
Bash CommandText - Default Value: /home/pi/script_pwm.sh ((duty_cycle))Command to execute to set the PWM duty cycle (%)
UserText - Default Value: mycodoThe user to execute the command
Startup StateSelectSet the state when Mycodo starts
Startup ValueDecimalThe value when Mycodo starts
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown ValueDecimalThe value when Mycodo shuts down
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Current (Amps)DecimalThe current draw of the device being controlled

Peristaltic Pump: Atlas Scientific~

  • Manufacturer: Atlas Scientific
  • Interfaces: I2C, UART, FTDI
  • Output Types: Volume, On/Off
  • Dependencies: pylibftdi
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Atlas Scientific peristaltic pumps can be set to dispense at their maximum rate or a rate can be specified. Their minimum flow rate is 0.5 ml/min and their maximum is 105 ml/min.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
FTDI DeviceTextThe FTDI device connected to the input/output/etc.
UART DeviceTextThe UART device location (e.g. /dev/ttyUSB1)
Channel Options
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled
Commands
Calibration: a calibration can be performed to increase the accuracy of the pump. It's a good idea to clear the calibration before calibrating. First, remove all air from the line by pumping the fluid you would like to calibrate to through the pump hose. Next, press Dispense Amount and the pump will be instructed to dispense 10 ml (unless you changed the default value). Measure how much fluid was actually dispensed, enter this value in the Actual Volume Dispensed (ml) field, and press Calibrate to Dispensed Amount. Now any further pump volumes dispensed should be accurate.
Clear CalibrationButton
Volume to Dispense (ml)Decimal - Default Value: 10.0The volume (ml) that is instructed to be dispensed
Dispense AmountButton
Actual Volume Dispensed (ml)Decimal - Default Value: 10.0The actual volume (ml) that was dispensed
Calibrate to Dispensed AmountButton
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address.
New I2C AddressText - Default Value: 0x67The new I2C to set the device to
Set I2C AddressButton

Peristaltic Pump: Grove I2C Motor Driver (Board v1.3)~

  • Manufacturer: Grove
  • Interfaces: I2C
  • Output Types: Volume, On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link

Controls the Grove I2C Motor Driver Board (v1.3). Both motors will turn at the same time. This output can also dispense volumes of fluid if the motors are attached to peristaltic pumps.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Motor Speed (0 - 100)Integer - Default Value: 100The motor output that determines the speed
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Fastest Rate (ml/min)Decimal - Default Value: 100.0The fastest rate that the pump can dispense (ml/min)

Peristaltic Pump: Grove I2C Motor Driver (TB6612FNG, Board v1.0)~

  • Manufacturer: Grove
  • Interfaces: I2C
  • Output Types: Volume, On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link

Controls the Grove I2C Motor Driver Board (v1.3). Both motors will turn at the same time. This output can also dispense volumes of fluid if the motors are attached to peristaltic pumps.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
Motor Speed (0 - 255)Integer - Default Value: 255The motor output that determines the speed
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Fastest Rate (ml/min)Decimal - Default Value: 100.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump turns on for every 60 second period (only used for Specify Flow Rate mode).
Commands
New I2C AddressText - Default Value: 0x14The new I2C to set the sensor to
Set I2C AddressButton

Peristaltic Pump: L298N DC Motor Controller (Pi <= 4)~

  • Manufacturer: STMicroelectronics
  • Interfaces: GPIO
  • Output Types: Volume, On/Off
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO
  • Additional URL: Link

The L298N can control 2 DC motors, both speed and direction. If these motors control peristaltic pumps, set the Flow Rate and the output can can be instructed to dispense volumes accurately in addition to being turned on for durations.

OptionTypeDescription
Channel Options
NameTextA name to distinguish this from others
Input Pin 1IntegerThe Input Pin 1 of the controller (BCM numbering)
Input Pin 2IntegerThe Input Pin 2 of the controller (BCM numbering)
Use Enable PinBoolean - Default Value: TrueEnable the use of the Enable Pin
Enable PinIntegerThe Enable pin of the controller (BCM numbering)
Enable Pin Duty CycleInteger - Default Value: 50The duty cycle to apply to the Enable Pin (percent, 1 - 100)
DirectionSelect(Options: [Forward | Backward] (Default in bold)The direction to turn the motor
Volume Rate (ml/min)Decimal - Default Value: 150.0If a pump, the measured flow rate (ml/min) at the set Duty Cycle

Peristaltic Pump: MCP23017 16-Channel I/O Expander~

Controls the 16 channels of the MCP23017 with a relay and peristaltic pump connected to each channel.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
NameTextA name to distinguish this from others
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the output channel that corresponds to the pump being on
Fastest Rate (ml/min)Decimal - Default Value: 150.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump should be turned on for every 60 second period
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled

Peristaltic Pump: PCF8574 8-Channel I/O Expander~

  • Manufacturer: Texas Instruments
  • Interfaces: I2C
  • Output Types: Volume, On/Off
  • Libraries: smbus2
  • Dependencies: smbus2
  • Manufacturer URL: Link
  • Datasheet URL: Link
  • Product URL: Link

Controls the 8 channels of the PCF8574 with a relay and peristaltic pump connected to each channel.

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
Channel Options
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the output channel that corresponds to the pump being on
Fastest Rate (ml/min)Decimal - Default Value: 150.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump should be turned on for every 60 second period
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled

Peristaltic Pump: Raspberry Pi GPIO (Pi <= 4)~

  • Interfaces: GPIO
  • Output Types: Volume, On/Off
  • Libraries: RPi.GPIO
  • Dependencies: RPi.GPIO

This output turns a GPIO pin HIGH and LOW to control power to a generic peristaltic pump. The peristaltic pump can then be turned on for a duration or, after determining the pump's maximum flow rate, instructed to dispense a specific volume at the maximum rate or at a specified rate.

OptionTypeDescription
Channel Options
Pin: GPIO (BCM)IntegerThe pin to control the state of
On StateSelect(Options: [HIGH | LOW] (Default in bold)The state of the GPIO that corresponds to an On state
Fastest Rate (ml/min)Decimal - Default Value: 150.0The fastest rate that the pump can dispense (ml/min)
Minimum On (Seconds)Decimal - Default Value: 1.0The minimum duration the pump should be turned on for every 60 second period
Flow Rate MethodSelect(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold)The flow rate to use when pumping a volume
Desired Flow Rate (ml/min)Decimal - Default Value: 10.0Desired flow rate in ml/minute when Specify Flow Rate set
Current (Amps)DecimalThe current draw of the device being controlled

Remote Mycodo Output: On/Off~

  • Interfaces: API
  • Output Types: On/Off
  • Libraries: requests
  • Dependencies: requests

This Output allows remote control of another Mycodo On/Off Output over a network using the API.

OptionTypeDescription
Remote Mycodo HostTextThe host or IP address of the remote Mycodo
Remote Mycodo API KeyTextThe API key of the remote Mycodo
State Query Period (Seconds)Integer - Default Value: 120How often to query the state of the output
Channel Options
Remote Mycodo OutputThe Remote Mycodo Output to control
Startup StateSelect(Options: [Do Nothing | Off | On] (Default in bold)Set the state when Mycodo starts
Shutdown StateSelect(Options: [Do Nothing | Off | On] (Default in bold)Set the state when Mycodo shuts down
Force CommandBooleanAlways send the command if instructed, regardless of the current state
Trigger Functions at StartupBooleanWhether to trigger functions when the output switches at startup

Remote Mycodo Output: PWM~

  • Interfaces: API
  • Output Types: PWM
  • Libraries: requests
  • Dependencies: requests

This Output allows remote control of another Mycodo PWM Output over a network using the API.

OptionTypeDescription
Remote Mycodo HostTextThe host or IP address of the remote Mycodo
Remote Mycodo API KeyTextThe API key of the remote Mycodo
State Query Period (Seconds)Integer - Default Value: 120How often to query the state of the output
Channel Options
Remote Mycodo OutputThe Remote Mycodo Output to control
Startup StateSelectSet the state when Mycodo starts
Start Duty CycleDecimalThe duty cycle to set at startup, if enabled
Shutdown StateSelectSet the state when Mycodo shuts down
Shutdown Duty CycleDecimalThe duty cycle to set at shutdown, if enabled
Invert SignalBooleanInvert the PWM signal
Invert Stored SignalBooleanInvert the value that is saved to the measurement database
Commands
Set the Duty Cycle.
Duty CycleDecimalThe duty cycle to set
Set Duty CycleButton

Spacer~

A spacer to organize Outputs.

OptionTypeDescription
ColorText - Default Value: #000000The color of the name text

Value: GP8XXX (8413, 8403) 2-Channel DAC: 0-10 VDC~

Output 0 to 10 VDC signal. GP8403: 12bit DAC Dual Channel I2C to 0-5V/0-10V | GP8413: 15bit DAC Dual Channel I2C to 0-10V

OptionTypeDescription
I2C AddressTextThe address of the I2C device.
I2C BusIntegerThe Bus the I2C device is connected.
DeviceSelect(Options: [GP8403 12-bit | GP8413 15-bit] (Default in bold)Select your GP8XXX device
Channel Options
Start StateSelect(Options: [Previously-Saved State | Specified Value] (Default in bold)Select the channel start state
Start Value (volts)DecimalIf Specified Value is selected, set the start state value
Shutdown StateSelect(Options: [Previously-Saved Value | Specified Value] (Default in bold)Select the channel shutdown state
Shutdown Value (volts)DecimalIf Specified Value is selected, set the shutdown state value
Off Value (volts)DecimalIf Specified Value to apply when turned off
\ No newline at end of file diff --git a/Supported-Widgets/index.html b/Supported-Widgets/index.html index 6f675f924..54d2abd7e 100644 --- a/Supported-Widgets/index.html +++ b/Supported-Widgets/index.html @@ -1 +1 @@ - Supported Widgets - Mycodo
Skip to content

Supported Widgets

Built-In Widgets~

Activate/Deactivate Controller~

Activate/Deactivate a Controller (Inputs and Functions). For manipulating a PID Controller, use the PID Controller Widget.

Camera~

Displays a camera image or stream.

Function Status~

Displays the status of a Function (if supported).

Gauge (Angular) [Highcharts]~

  • Libraries: Highcharts
  • Dependencies: highstock-9.1.2.js, highcharts-more-9.1.2.js

Displays an angular gauge. Be sure to set the Maximum option to the last Stop High value for the gauge to display properly.

Gauge (Solid) [Highcharts]~

  • Libraries: Highcharts
  • Dependencies: highstock-9.1.2.js, highcharts-more-9.1.2.js, solid-gauge-9.1.2.js

Displays a solid gauge. Be sure to set the Maximum option to the last Stop value for the gauge to display properly.

Graph (Synchronous) [Highstock]~

  • Libraries: Highstock
  • Dependencies: highstock-9.1.2.js, highcharts-more-9.1.2.js, data-9.1.2.js, exporting-9.1.2.js, export-data-9.1.2.js, offline-exporting-9.1.2.js

Displays a synchronous graph (all data is downloaded for the selected period on the x-axis).

Indicator~

Displays a red or green circular image based on a measurement value. Useful for showing if an Output is on or off.

Measurement (1 Value)~

Displays a measurement value and timestamp.

Measurement (2 Values)~

Displays two measurement values and timestamps.

Output (PWM Slider)~

Displays and allows control of a PWM output using a slider.

Output Control (Channel)~

Displays and allows control of an output channel. All output options and measurements for the selected channel will be displayed. E.g. pumps will have seconds on and volume as measurements, and can be turned on for a duration (Seconds) or amount (Volume). If NO DATA or TOO OLD is displayed, the Max Age is not sufficiently long enough to find a current measurement.

PID Controller~

Displays and allows control of a PID Controller.

Python Code~

Executes Python code and displays the output within the widget.

Spacer~

A simple widget to use as a spacer, which includes the ability to set text in its contents.

\ No newline at end of file + Supported Widgets - Mycodo
Skip to content

Supported Widgets

Built-In Widgets~

Activate/Deactivate Controller~

Activate/Deactivate a Controller (Inputs and Functions). For manipulating a PID Controller, use the PID Controller Widget.

Camera~

Displays a camera image or stream.

Function Status~

Displays the status of a Function (if supported).

Gauge (Angular) [Highcharts]~

  • Libraries: Highcharts
  • Dependencies: highstock-9.1.2.js, highcharts-more-9.1.2.js

Displays an angular gauge. Be sure to set the Maximum option to the last Stop High value for the gauge to display properly.

Gauge (Solid) [Highcharts]~

  • Libraries: Highcharts
  • Dependencies: highstock-9.1.2.js, highcharts-more-9.1.2.js, solid-gauge-9.1.2.js

Displays a solid gauge. Be sure to set the Maximum option to the last Stop value for the gauge to display properly.

Graph (Synchronous) [Highstock]~

  • Libraries: Highstock
  • Dependencies: highstock-9.1.2.js, highcharts-more-9.1.2.js, data-9.1.2.js, exporting-9.1.2.js, export-data-9.1.2.js, offline-exporting-9.1.2.js

Displays a synchronous graph (all data is downloaded for the selected period on the x-axis).

Indicator~

Displays a red or green circular image based on a measurement value. Useful for showing if an Output is on or off.

Measurement (1 Value)~

Displays a measurement value and timestamp.

Measurement (2 Values)~

Displays two measurement values and timestamps.

Output (PWM Slider)~

Displays and allows control of a PWM output using a slider.

Output Control (Channel)~

Displays and allows control of an output channel. All output options and measurements for the selected channel will be displayed. E.g. pumps will have seconds on and volume as measurements, and can be turned on for a duration (Seconds) or amount (Volume). If NO DATA or TOO OLD is displayed, the Max Age is not sufficiently long enough to find a current measurement.

PID Controller~

Displays and allows control of a PID Controller.

Python Code~

Executes Python code and displays the output within the widget.

Spacer~

A simple widget to use as a spacer, which includes the ability to set text in its contents.

\ No newline at end of file diff --git a/System-Information/index.html b/System-Information/index.html index e74d3091e..6df0acc09 100644 --- a/System-Information/index.html +++ b/System-Information/index.html @@ -1 +1 @@ - System Information - Mycodo

System Information

Page: [Gear Icon] -> System Information

This page serves to provide information about the Mycodo frontend and backend as well as the linux system it's running on. Several commands and their output are listed to give the user information about how their system is running.

Command Description
Mycodo Version The current version of Mycodo, reported by the configuration file.
Python Version The version of python currently running the web user interface.
Database Version The current version of the settings database. If the current version is different from what it should be, an error will appear indicating the issue and a link to find out more information about the issue.
Daemon Status This will be a green "Running" or a red "Stopped". Additionally, the Mycodo version and hostname text at the top-left of the screen May be Green, Yellow, or Red to indicate the status. Green = daemon running, yellow = unable to connect, and red = daemon not running.
... Several other status indicators and commands are listed to provide information about the health of the system. Use these in addition to others to investigate software or hardware issues.
\ No newline at end of file + System Information - Mycodo

System Information

Page: [Gear Icon] -> System Information

This page serves to provide information about the Mycodo frontend and backend as well as the linux system it's running on. Several commands and their output are listed to give the user information about how their system is running.

Command Description
Mycodo Version The current version of Mycodo, reported by the configuration file.
Python Version The version of python currently running the web user interface.
Database Version The current version of the settings database. If the current version is different from what it should be, an error will appear indicating the issue and a link to find out more information about the issue.
Daemon Status This will be a green "Running" or a red "Stopped". Additionally, the Mycodo version and hostname text at the top-left of the screen May be Green, Yellow, or Red to indicate the status. Green = daemon running, yellow = unable to connect, and red = daemon not running.
... Several other status indicators and commands are listed to provide information about the health of the system. Use these in addition to others to investigate software or hardware issues.
\ No newline at end of file diff --git a/Troubleshooting/index.html b/Troubleshooting/index.html index fe38a983d..8c1e7161c 100644 --- a/Troubleshooting/index.html +++ b/Troubleshooting/index.html @@ -1,4 +1,4 @@ - Troubleshooting - Mycodo
Skip to content

Troubleshooting

Cannot Access the Web UI Following an Upgrade~

There are many reasons why the web UI would be inaccessible following an upgrade. Bugs are also continually fixed as they are discovered. Therefore, do not rely on old GitHub Issues or forum posts that have a solution for a similar effect, since the cause of the effect can be something completely different. The first thing that should be done is to review the upgrade log (/var/log/mycodo/mycodoupgrade.log) for any errors. Next, you can attempt to rerun the upgrade by issuing the following command:

sudo /opt/Mycodo/mycodo/scripts/upgrade_post.sh
+ Troubleshooting - Mycodo      

Troubleshooting

Cannot Access the Web UI Following an Upgrade~

There are many reasons why the web UI would be inaccessible following an upgrade. Bugs are also continually fixed as they are discovered. Therefore, do not rely on old GitHub Issues or forum posts that have a solution for a similar effect, since the cause of the effect can be something completely different. The first thing that should be done is to review the upgrade log (/var/log/mycodo/mycodoupgrade.log) for any errors. Next, you can attempt to rerun the upgrade by issuing the following command:

sudo /opt/Mycodo/mycodo/scripts/upgrade_post.sh
 

Daemon Not Running~

  • Check the color of the top left time/version text. Green indicates the daemon is running, while orange or red can indicate an issue.
  • Determine if the Daemon is Running: Execute ps aux | grep mycodo_daemon.py in a terminal and look for an entry to be returned.
  • Check the Logs: From the [Gear Icon] -> Mycodo Logs page or /var/log/mycodo/, check the daemon log for any errors. If the issue began after an upgrade, also check the upgrade log for indications of an issue.
  • If a solution could not be found after investigating the above suggestions, search the GitHub issues for any open issues or the forum for any recent issues.

Incorrect Database Version~

  • Check the [Gear Icon] -> System Information page.
  • If the "Database Version" is green, it is the correct version. An incorrect version wil lbe colored red and indicate the version is incorrect.
  • An incorrect database version means the version stored in the Mycodo settings database (/opt/Mycodo/databases/mycodo.db) is not correct for the latest version of Mycodo, determined in the Mycodo config file (/opt/Mycodo/mycodo/config.py).
  • This can be caused by an error in the upgrade process from an older database version to a newer version, or from a database that did not upgrade during the Mycodo upgrade process.
  • Check the Upgrade Log for any issues that may have occurred. The log is located at /var/log/mycodo/mycodoupgrade.log but may also be accessed from the web UI (if you're able to): select [Gear Icon] -> Mycodo Logs -> Upgrade Log.
  • Sometimes issues may not immediately present themselves. It is not uncommon to be experiencing a database issue that was actually introduced several Mycodo versions ago, before the latest upgrade.
  • Because of the nature of how many versions the database can be in, correcting a database issue may be very difficult.

It may be much easier to delete your database and start fresh without any configuration. Use the following commands to rename your database and restart the web UI. If both commands are successful, refresh your web UI page in your browser in order to generate a new database and create a new Admin user.

mv /opt/Mycodo/databases/mycodo.db /opt/Mycodo/databases/mycodo.db.backup
 sudo service mycodoflask restart
-

Restoring a Backup Without the UI~

If the web UI is inaccessible, because of an error, for example, you can restore a backup from the command line. See Backup and Restore for more information.

More on Diagnosing issues~

Check out the Diagnosing Issues for more information about diagnosing issues.

\ No newline at end of file +

Restoring a Backup Without the UI~

If the web UI is inaccessible, because of an error, for example, you can restore a backup from the command line. See Backup and Restore for more information.

More on Diagnosing issues~

Check out the Diagnosing Issues for more information about diagnosing issues.

\ No newline at end of file diff --git a/Upgrade-Backup-Restore/index.html b/Upgrade-Backup-Restore/index.html index eb0b45d5f..70a0e6373 100644 --- a/Upgrade-Backup-Restore/index.html +++ b/Upgrade-Backup-Restore/index.html @@ -1,3 +1,3 @@ - Upgrade/Backup/Restore - Mycodo
Skip to content

Upgrade/Backup/Restore

Upgrading~

Page: [Gear Icon] -> Upgrade

If you already have Mycodo installed, you can perform an upgrade to the latest Mycodo Release by either using the Upgrade option in the web interface (recommended) or by issuing the following command in a terminal. A log of the upgrade process is created at /var/log/mycodo/mycodoupgrade.log and is also available from the [Gear Icon] -> Mycodo Logs page.

sudo mycodo-commands upgrade-mycodo
+ Upgrade/Backup/Restore - Mycodo      

Upgrade/Backup/Restore

Upgrading~

Page: [Gear Icon] -> Upgrade

If you already have Mycodo installed, you can perform an upgrade to the latest Mycodo Release by either using the Upgrade option in the web interface (recommended) or by issuing the following command in a terminal. A log of the upgrade process is created at /var/log/mycodo/mycodoupgrade.log and is also available from the [Gear Icon] -> Mycodo Logs page.

sudo mycodo-commands upgrade-mycodo
 

Backup-Restore~

Page: [Gear Icon] -> Backup Restore

A backup is made to /var/Mycodo-backups when the system is upgraded or instructed to do so from the web interface on the [Gear Icon] -> Backup Restore page.

If you need to restore a backup, this can be done on the [Gear Icon] -> Backup Restore page (recommended). Find the backup you would like restored and press the Restore button beside it. If you're unable to access the web interface, a restore can also be initialized through the command line. Use the following command to initialize a restore. The [backup_location] must be the full path to the backup to be restored (e.g. "/var/Mycodo-backups/Mycodo-backup-2018-03-11_21-19-15-5.6.4/" without quotes).

sudo mycodo-commands backup-restore [backup_location]
-
\ No newline at end of file +
\ No newline at end of file diff --git a/assets/javascripts/bundle.525ec568.min.js b/assets/javascripts/bundle.525ec568.min.js new file mode 100644 index 000000000..4b08eae40 --- /dev/null +++ b/assets/javascripts/bundle.525ec568.min.js @@ -0,0 +1,16 @@ +"use strict";(()=>{var Wi=Object.create;var gr=Object.defineProperty;var Di=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,Ni=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable;var io=(e,t,r)=>t in e?gr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t)=>{for(var r in t||(t={}))yr.call(t,r)&&io(e,r,t[r]);if(Vt)for(var r of Vt(t))ao.call(t,r)&&io(e,r,t[r]);return e};var so=(e,t)=>{var r={};for(var o in e)yr.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&Vt)for(var o of Vt(e))t.indexOf(o)<0&&ao.call(e,o)&&(r[o]=e[o]);return r};var xr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zi=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Vi(t))!yr.call(e,n)&&n!==r&&gr(e,n,{get:()=>t[n],enumerable:!(o=Di(t,n))||o.enumerable});return e};var Mt=(e,t,r)=>(r=e!=null?Wi(Ni(e)):{},zi(t||!e||!e.__esModule?gr(r,"default",{value:e,enumerable:!0}):r,e));var co=(e,t,r)=>new Promise((o,n)=>{var i=p=>{try{s(r.next(p))}catch(c){n(c)}},a=p=>{try{s(r.throw(p))}catch(c){n(c)}},s=p=>p.done?o(p.value):Promise.resolve(p.value).then(i,a);s((r=r.apply(e,t)).next())});var lo=xr((Er,po)=>{(function(e,t){typeof Er=="object"&&typeof po!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(Er,function(){"use strict";function e(r){var o=!0,n=!1,i=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(k){return!!(k&&k!==document&&k.nodeName!=="HTML"&&k.nodeName!=="BODY"&&"classList"in k&&"contains"in k.classList)}function p(k){var ft=k.type,qe=k.tagName;return!!(qe==="INPUT"&&a[ft]&&!k.readOnly||qe==="TEXTAREA"&&!k.readOnly||k.isContentEditable)}function c(k){k.classList.contains("focus-visible")||(k.classList.add("focus-visible"),k.setAttribute("data-focus-visible-added",""))}function l(k){k.hasAttribute("data-focus-visible-added")&&(k.classList.remove("focus-visible"),k.removeAttribute("data-focus-visible-added"))}function f(k){k.metaKey||k.altKey||k.ctrlKey||(s(r.activeElement)&&c(r.activeElement),o=!0)}function u(k){o=!1}function d(k){s(k.target)&&(o||p(k.target))&&c(k.target)}function y(k){s(k.target)&&(k.target.classList.contains("focus-visible")||k.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout(function(){n=!1},100),l(k.target))}function L(k){document.visibilityState==="hidden"&&(n&&(o=!0),X())}function X(){document.addEventListener("mousemove",J),document.addEventListener("mousedown",J),document.addEventListener("mouseup",J),document.addEventListener("pointermove",J),document.addEventListener("pointerdown",J),document.addEventListener("pointerup",J),document.addEventListener("touchmove",J),document.addEventListener("touchstart",J),document.addEventListener("touchend",J)}function te(){document.removeEventListener("mousemove",J),document.removeEventListener("mousedown",J),document.removeEventListener("mouseup",J),document.removeEventListener("pointermove",J),document.removeEventListener("pointerdown",J),document.removeEventListener("pointerup",J),document.removeEventListener("touchmove",J),document.removeEventListener("touchstart",J),document.removeEventListener("touchend",J)}function J(k){k.target.nodeName&&k.target.nodeName.toLowerCase()==="html"||(o=!1,te())}document.addEventListener("keydown",f,!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",L,!0),X(),r.addEventListener("focus",d,!0),r.addEventListener("blur",y,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var qr=xr((hy,On)=>{"use strict";/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var $a=/["'&<>]/;On.exports=Pa;function Pa(e){var t=""+e,r=$a.exec(t);if(!r)return t;var o,n="",i=0,a=0;for(i=r.index;i{/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */(function(t,r){typeof It=="object"&&typeof Yr=="object"?Yr.exports=r():typeof define=="function"&&define.amd?define([],r):typeof It=="object"?It.ClipboardJS=r():t.ClipboardJS=r()})(It,function(){return function(){var e={686:function(o,n,i){"use strict";i.d(n,{default:function(){return Ui}});var a=i(279),s=i.n(a),p=i(370),c=i.n(p),l=i(817),f=i.n(l);function u(V){try{return document.execCommand(V)}catch(A){return!1}}var d=function(A){var M=f()(A);return u("cut"),M},y=d;function L(V){var A=document.documentElement.getAttribute("dir")==="rtl",M=document.createElement("textarea");M.style.fontSize="12pt",M.style.border="0",M.style.padding="0",M.style.margin="0",M.style.position="absolute",M.style[A?"right":"left"]="-9999px";var F=window.pageYOffset||document.documentElement.scrollTop;return M.style.top="".concat(F,"px"),M.setAttribute("readonly",""),M.value=V,M}var X=function(A,M){var F=L(A);M.container.appendChild(F);var D=f()(F);return u("copy"),F.remove(),D},te=function(A){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},F="";return typeof A=="string"?F=X(A,M):A instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(A==null?void 0:A.type)?F=X(A.value,M):(F=f()(A),u("copy")),F},J=te;function k(V){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(M){return typeof M}:k=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},k(V)}var ft=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=A.action,F=M===void 0?"copy":M,D=A.container,Y=A.target,$e=A.text;if(F!=="copy"&&F!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Y!==void 0)if(Y&&k(Y)==="object"&&Y.nodeType===1){if(F==="copy"&&Y.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(F==="cut"&&(Y.hasAttribute("readonly")||Y.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if($e)return J($e,{container:D});if(Y)return F==="cut"?y(Y):J(Y,{container:D})},qe=ft;function Fe(V){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(M){return typeof M}:Fe=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},Fe(V)}function ki(V,A){if(!(V instanceof A))throw new TypeError("Cannot call a class as a function")}function no(V,A){for(var M=0;M0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof D.action=="function"?D.action:this.defaultAction,this.target=typeof D.target=="function"?D.target:this.defaultTarget,this.text=typeof D.text=="function"?D.text:this.defaultText,this.container=Fe(D.container)==="object"?D.container:document.body}},{key:"listenClick",value:function(D){var Y=this;this.listener=c()(D,"click",function($e){return Y.onClick($e)})}},{key:"onClick",value:function(D){var Y=D.delegateTarget||D.currentTarget,$e=this.action(Y)||"copy",Dt=qe({action:$e,container:this.container,target:this.target(Y),text:this.text(Y)});this.emit(Dt?"success":"error",{action:$e,text:Dt,trigger:Y,clearSelection:function(){Y&&Y.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(D){return vr("action",D)}},{key:"defaultTarget",value:function(D){var Y=vr("target",D);if(Y)return document.querySelector(Y)}},{key:"defaultText",value:function(D){return vr("text",D)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(D){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return J(D,Y)}},{key:"cut",value:function(D){return y(D)}},{key:"isSupported",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Y=typeof D=="string"?[D]:D,$e=!!document.queryCommandSupported;return Y.forEach(function(Dt){$e=$e&&!!document.queryCommandSupported(Dt)}),$e}}]),M}(s()),Ui=Fi},828:function(o){var n=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function a(s,p){for(;s&&s.nodeType!==n;){if(typeof s.matches=="function"&&s.matches(p))return s;s=s.parentNode}}o.exports=a},438:function(o,n,i){var a=i(828);function s(l,f,u,d,y){var L=c.apply(this,arguments);return l.addEventListener(u,L,y),{destroy:function(){l.removeEventListener(u,L,y)}}}function p(l,f,u,d,y){return typeof l.addEventListener=="function"?s.apply(null,arguments):typeof u=="function"?s.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(L){return s(L,f,u,d,y)}))}function c(l,f,u,d){return function(y){y.delegateTarget=a(y.target,f),y.delegateTarget&&d.call(l,y)}}o.exports=p},879:function(o,n){n.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},n.nodeList=function(i){var a=Object.prototype.toString.call(i);return i!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in i&&(i.length===0||n.node(i[0]))},n.string=function(i){return typeof i=="string"||i instanceof String},n.fn=function(i){var a=Object.prototype.toString.call(i);return a==="[object Function]"}},370:function(o,n,i){var a=i(879),s=i(438);function p(u,d,y){if(!u&&!d&&!y)throw new Error("Missing required arguments");if(!a.string(d))throw new TypeError("Second argument must be a String");if(!a.fn(y))throw new TypeError("Third argument must be a Function");if(a.node(u))return c(u,d,y);if(a.nodeList(u))return l(u,d,y);if(a.string(u))return f(u,d,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function c(u,d,y){return u.addEventListener(d,y),{destroy:function(){u.removeEventListener(d,y)}}}function l(u,d,y){return Array.prototype.forEach.call(u,function(L){L.addEventListener(d,y)}),{destroy:function(){Array.prototype.forEach.call(u,function(L){L.removeEventListener(d,y)})}}}function f(u,d,y){return s(document.body,u,d,y)}o.exports=p},817:function(o){function n(i){var a;if(i.nodeName==="SELECT")i.focus(),a=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var s=i.hasAttribute("readonly");s||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),s||i.removeAttribute("readonly"),a=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var p=window.getSelection(),c=document.createRange();c.selectNodeContents(i),p.removeAllRanges(),p.addRange(c),a=p.toString()}return a}o.exports=n},279:function(o){function n(){}n.prototype={on:function(i,a,s){var p=this.e||(this.e={});return(p[i]||(p[i]=[])).push({fn:a,ctx:s}),this},once:function(i,a,s){var p=this;function c(){p.off(i,c),a.apply(s,arguments)}return c._=a,this.on(i,c,s)},emit:function(i){var a=[].slice.call(arguments,1),s=((this.e||(this.e={}))[i]||[]).slice(),p=0,c=s.length;for(p;p0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],a;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function q(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o1||p(d,L)})},y&&(n[d]=y(n[d])))}function p(d,y){try{c(o[d](y))}catch(L){u(i[0][3],L)}}function c(d){d.value instanceof nt?Promise.resolve(d.value.v).then(l,f):u(i[0][2],d)}function l(d){p("next",d)}function f(d){p("throw",d)}function u(d,y){d(y),i.shift(),i.length&&p(i[0][0],i[0][1])}}function uo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof he=="function"?he(e):e[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(i){r[i]=e[i]&&function(a){return new Promise(function(s,p){a=e[i](a),n(s,p,a.done,a.value)})}}function n(i,a,s,p){Promise.resolve(p).then(function(c){i({value:c,done:s})},a)}}function H(e){return typeof e=="function"}function ut(e){var t=function(o){Error.call(o),o.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var zt=ut(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: +`+r.map(function(o,n){return n+1+") "+o.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=r}});function Qe(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ue=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,o,n,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=he(a),p=s.next();!p.done;p=s.next()){var c=p.value;c.remove(this)}}catch(L){t={error:L}}finally{try{p&&!p.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(H(l))try{l()}catch(L){i=L instanceof zt?L.errors:[L]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var u=he(f),d=u.next();!d.done;d=u.next()){var y=d.value;try{ho(y)}catch(L){i=i!=null?i:[],L instanceof zt?i=q(q([],N(i)),N(L.errors)):i.push(L)}}}catch(L){o={error:L}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}}if(i)throw new zt(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)ho(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Qe(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Qe(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var Tr=Ue.EMPTY;function qt(e){return e instanceof Ue||e&&"closed"in e&&H(e.remove)&&H(e.add)&&H(e.unsubscribe)}function ho(e){H(e)?e():e.unsubscribe()}var Pe={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var dt={setTimeout:function(e,t){for(var r=[],o=2;o0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var o=this,n=this,i=n.hasError,a=n.isStopped,s=n.observers;return i||a?Tr:(this.currentObservers=null,s.push(r),new Ue(function(){o.currentObservers=null,Qe(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var o=this,n=o.hasError,i=o.thrownError,a=o.isStopped;n?r.error(i):a&&r.complete()},t.prototype.asObservable=function(){var r=new j;return r.source=this,r},t.create=function(r,o){return new To(r,o)},t}(j);var To=function(e){oe(t,e);function t(r,o){var n=e.call(this)||this;return n.destination=r,n.source=o,n}return t.prototype.next=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,r)},t.prototype.error=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,r)},t.prototype.complete=function(){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||o===void 0||o.call(r)},t.prototype._subscribe=function(r){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(r))!==null&&n!==void 0?n:Tr},t}(g);var _r=function(e){oe(t,e);function t(r){var o=e.call(this)||this;return o._value=r,o}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var o=e.prototype._subscribe.call(this,r);return!o.closed&&r.next(this._value),o},t.prototype.getValue=function(){var r=this,o=r.hasError,n=r.thrownError,i=r._value;if(o)throw n;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(g);var At={now:function(){return(At.delegate||Date).now()},delegate:void 0};var Ct=function(e){oe(t,e);function t(r,o,n){r===void 0&&(r=1/0),o===void 0&&(o=1/0),n===void 0&&(n=At);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(r){var o=this,n=o.isStopped,i=o._buffer,a=o._infiniteTimeWindow,s=o._timestampProvider,p=o._windowTime;n||(i.push(r),!a&&i.push(s.now()+p)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(r),n=this,i=n._infiniteTimeWindow,a=n._buffer,s=a.slice(),p=0;p0?e.prototype.schedule.call(this,r,o):(this.delay=o,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,o){return o>0||this.closed?e.prototype.execute.call(this,r,o):this._execute(r,o)},t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!=null&&n>0||n==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.flush(this),0)},t}(gt);var Lo=function(e){oe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(yt);var kr=new Lo(Oo);var Mo=function(e){oe(t,e);function t(r,o){var n=e.call(this,r,o)||this;return n.scheduler=r,n.work=o,n}return t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!==null&&n>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.actions.push(this),r._scheduled||(r._scheduled=vt.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,o,n){var i;if(n===void 0&&(n=0),n!=null?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,o,n);var a=r.actions;o!=null&&((i=a[a.length-1])===null||i===void 0?void 0:i.id)!==o&&(vt.cancelAnimationFrame(o),r._scheduled=void 0)},t}(gt);var _o=function(e){oe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var o=this._scheduled;this._scheduled=void 0;var n=this.actions,i;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while((r=n[0])&&r.id===o&&n.shift());if(this._active=!1,i){for(;(r=n[0])&&r.id===o&&n.shift();)r.unsubscribe();throw i}},t}(yt);var me=new _o(Mo);var S=new j(function(e){return e.complete()});function Yt(e){return e&&H(e.schedule)}function Hr(e){return e[e.length-1]}function Xe(e){return H(Hr(e))?e.pop():void 0}function ke(e){return Yt(Hr(e))?e.pop():void 0}function Bt(e,t){return typeof Hr(e)=="number"?e.pop():t}var xt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Gt(e){return H(e==null?void 0:e.then)}function Jt(e){return H(e[bt])}function Xt(e){return Symbol.asyncIterator&&H(e==null?void 0:e[Symbol.asyncIterator])}function Zt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Zi(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var er=Zi();function tr(e){return H(e==null?void 0:e[er])}function rr(e){return fo(this,arguments,function(){var r,o,n,i;return Nt(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,nt(r.read())];case 3:return o=a.sent(),n=o.value,i=o.done,i?[4,nt(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,nt(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function or(e){return H(e==null?void 0:e.getReader)}function U(e){if(e instanceof j)return e;if(e!=null){if(Jt(e))return ea(e);if(xt(e))return ta(e);if(Gt(e))return ra(e);if(Xt(e))return Ao(e);if(tr(e))return oa(e);if(or(e))return na(e)}throw Zt(e)}function ea(e){return new j(function(t){var r=e[bt]();if(H(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ta(e){return new j(function(t){for(var r=0;r=2;return function(o){return o.pipe(e?b(function(n,i){return e(n,i,o)}):le,Te(1),r?De(t):Qo(function(){return new ir}))}}function jr(e){return e<=0?function(){return S}:E(function(t,r){var o=[];t.subscribe(T(r,function(n){o.push(n),e=2,!0))}function pe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new g}:t,o=e.resetOnError,n=o===void 0?!0:o,i=e.resetOnComplete,a=i===void 0?!0:i,s=e.resetOnRefCountZero,p=s===void 0?!0:s;return function(c){var l,f,u,d=0,y=!1,L=!1,X=function(){f==null||f.unsubscribe(),f=void 0},te=function(){X(),l=u=void 0,y=L=!1},J=function(){var k=l;te(),k==null||k.unsubscribe()};return E(function(k,ft){d++,!L&&!y&&X();var qe=u=u!=null?u:r();ft.add(function(){d--,d===0&&!L&&!y&&(f=Ur(J,p))}),qe.subscribe(ft),!l&&d>0&&(l=new at({next:function(Fe){return qe.next(Fe)},error:function(Fe){L=!0,X(),f=Ur(te,n,Fe),qe.error(Fe)},complete:function(){y=!0,X(),f=Ur(te,a),qe.complete()}}),U(k).subscribe(l))})(c)}}function Ur(e,t){for(var r=[],o=2;oe.next(document)),e}function P(e,t=document){return Array.from(t.querySelectorAll(e))}function R(e,t=document){let r=fe(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function fe(e,t=document){return t.querySelector(e)||void 0}function Ie(){var e,t,r,o;return(o=(r=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.activeElement)!=null?r:document.activeElement)!=null?o:void 0}var wa=O(h(document.body,"focusin"),h(document.body,"focusout")).pipe(_e(1),Q(void 0),m(()=>Ie()||document.body),G(1));function et(e){return wa.pipe(m(t=>e.contains(t)),K())}function $t(e,t){return C(()=>O(h(e,"mouseenter").pipe(m(()=>!0)),h(e,"mouseleave").pipe(m(()=>!1))).pipe(t?Ht(r=>Le(+!r*t)):le,Q(e.matches(":hover"))))}function Jo(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)Jo(e,r)}function x(e,t,...r){let o=document.createElement(e);if(t)for(let n of Object.keys(t))typeof t[n]!="undefined"&&(typeof t[n]!="boolean"?o.setAttribute(n,t[n]):o.setAttribute(n,""));for(let n of r)Jo(o,n);return o}function sr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function Tt(e){let t=x("script",{src:e});return C(()=>(document.head.appendChild(t),O(h(t,"load"),h(t,"error").pipe(v(()=>$r(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(m(()=>{}),_(()=>document.head.removeChild(t)),Te(1))))}var Xo=new g,Ta=C(()=>typeof ResizeObserver=="undefined"?Tt("https://unpkg.com/resize-observer-polyfill"):I(void 0)).pipe(m(()=>new ResizeObserver(e=>e.forEach(t=>Xo.next(t)))),v(e=>O(Ye,I(e)).pipe(_(()=>e.disconnect()))),G(1));function ce(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ge(e){let t=e;for(;t.clientWidth===0&&t.parentElement;)t=t.parentElement;return Ta.pipe(w(r=>r.observe(t)),v(r=>Xo.pipe(b(o=>o.target===t),_(()=>r.unobserve(t)))),m(()=>ce(e)),Q(ce(e)))}function St(e){return{width:e.scrollWidth,height:e.scrollHeight}}function cr(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}function Zo(e){let t=[],r=e.parentElement;for(;r;)(e.clientWidth>r.clientWidth||e.clientHeight>r.clientHeight)&&t.push(r),r=(e=r).parentElement;return t.length===0&&t.push(document.documentElement),t}function Ve(e){return{x:e.offsetLeft,y:e.offsetTop}}function en(e){let t=e.getBoundingClientRect();return{x:t.x+window.scrollX,y:t.y+window.scrollY}}function tn(e){return O(h(window,"load"),h(window,"resize")).pipe(Me(0,me),m(()=>Ve(e)),Q(Ve(e)))}function pr(e){return{x:e.scrollLeft,y:e.scrollTop}}function Ne(e){return O(h(e,"scroll"),h(window,"scroll"),h(window,"resize")).pipe(Me(0,me),m(()=>pr(e)),Q(pr(e)))}var rn=new g,Sa=C(()=>I(new IntersectionObserver(e=>{for(let t of e)rn.next(t)},{threshold:0}))).pipe(v(e=>O(Ye,I(e)).pipe(_(()=>e.disconnect()))),G(1));function tt(e){return Sa.pipe(w(t=>t.observe(e)),v(t=>rn.pipe(b(({target:r})=>r===e),_(()=>t.unobserve(e)),m(({isIntersecting:r})=>r))))}function on(e,t=16){return Ne(e).pipe(m(({y:r})=>{let o=ce(e),n=St(e);return r>=n.height-o.height-t}),K())}var lr={drawer:R("[data-md-toggle=drawer]"),search:R("[data-md-toggle=search]")};function nn(e){return lr[e].checked}function Je(e,t){lr[e].checked!==t&&lr[e].click()}function ze(e){let t=lr[e];return h(t,"change").pipe(m(()=>t.checked),Q(t.checked))}function Oa(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function La(){return O(h(window,"compositionstart").pipe(m(()=>!0)),h(window,"compositionend").pipe(m(()=>!1))).pipe(Q(!1))}function an(){let e=h(window,"keydown").pipe(b(t=>!(t.metaKey||t.ctrlKey)),m(t=>({mode:nn("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),b(({mode:t,type:r})=>{if(t==="global"){let o=Ie();if(typeof o!="undefined")return!Oa(o,r)}return!0}),pe());return La().pipe(v(t=>t?S:e))}function ye(){return new URL(location.href)}function lt(e,t=!1){if(B("navigation.instant")&&!t){let r=x("a",{href:e.href});document.body.appendChild(r),r.click(),r.remove()}else location.href=e.href}function sn(){return new g}function cn(){return location.hash.slice(1)}function pn(e){let t=x("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function Ma(e){return O(h(window,"hashchange"),e).pipe(m(cn),Q(cn()),b(t=>t.length>0),G(1))}function ln(e){return Ma(e).pipe(m(t=>fe(`[id="${t}"]`)),b(t=>typeof t!="undefined"))}function Pt(e){let t=matchMedia(e);return ar(r=>t.addListener(()=>r(t.matches))).pipe(Q(t.matches))}function mn(){let e=matchMedia("print");return O(h(window,"beforeprint").pipe(m(()=>!0)),h(window,"afterprint").pipe(m(()=>!1))).pipe(Q(e.matches))}function Nr(e,t){return e.pipe(v(r=>r?t():S))}function zr(e,t){return new j(r=>{let o=new XMLHttpRequest;return o.open("GET",`${e}`),o.responseType="blob",o.addEventListener("load",()=>{o.status>=200&&o.status<300?(r.next(o.response),r.complete()):r.error(new Error(o.statusText))}),o.addEventListener("error",()=>{r.error(new Error("Network error"))}),o.addEventListener("abort",()=>{r.complete()}),typeof(t==null?void 0:t.progress$)!="undefined"&&(o.addEventListener("progress",n=>{var i;if(n.lengthComputable)t.progress$.next(n.loaded/n.total*100);else{let a=(i=o.getResponseHeader("Content-Length"))!=null?i:0;t.progress$.next(n.loaded/+a*100)}}),t.progress$.next(5)),o.send(),()=>o.abort()})}function je(e,t){return zr(e,t).pipe(v(r=>r.text()),m(r=>JSON.parse(r)),G(1))}function fn(e,t){let r=new DOMParser;return zr(e,t).pipe(v(o=>o.text()),m(o=>r.parseFromString(o,"text/html")),G(1))}function un(e,t){let r=new DOMParser;return zr(e,t).pipe(v(o=>o.text()),m(o=>r.parseFromString(o,"text/xml")),G(1))}function dn(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function hn(){return O(h(window,"scroll",{passive:!0}),h(window,"resize",{passive:!0})).pipe(m(dn),Q(dn()))}function bn(){return{width:innerWidth,height:innerHeight}}function vn(){return h(window,"resize",{passive:!0}).pipe(m(bn),Q(bn()))}function gn(){return z([hn(),vn()]).pipe(m(([e,t])=>({offset:e,size:t})),G(1))}function mr(e,{viewport$:t,header$:r}){let o=t.pipe(ee("size")),n=z([o,r]).pipe(m(()=>Ve(e)));return z([r,t,n]).pipe(m(([{height:i},{offset:a,size:s},{x:p,y:c}])=>({offset:{x:a.x-p,y:a.y-c+i},size:s})))}function _a(e){return h(e,"message",t=>t.data)}function Aa(e){let t=new g;return t.subscribe(r=>e.postMessage(r)),t}function yn(e,t=new Worker(e)){let r=_a(t),o=Aa(t),n=new g;n.subscribe(o);let i=o.pipe(Z(),ie(!0));return n.pipe(Z(),Re(r.pipe(W(i))),pe())}var Ca=R("#__config"),Ot=JSON.parse(Ca.textContent);Ot.base=`${new URL(Ot.base,ye())}`;function xe(){return Ot}function B(e){return Ot.features.includes(e)}function Ee(e,t){return typeof t!="undefined"?Ot.translations[e].replace("#",t.toString()):Ot.translations[e]}function Se(e,t=document){return R(`[data-md-component=${e}]`,t)}function ae(e,t=document){return P(`[data-md-component=${e}]`,t)}function ka(e){let t=R(".md-typeset > :first-child",e);return h(t,"click",{once:!0}).pipe(m(()=>R(".md-typeset",e)),m(r=>({hash:__md_hash(r.innerHTML)})))}function xn(e){if(!B("announce.dismiss")||!e.childElementCount)return S;if(!e.hidden){let t=R(".md-typeset",e);__md_hash(t.innerHTML)===__md_get("__announce")&&(e.hidden=!0)}return C(()=>{let t=new g;return t.subscribe(({hash:r})=>{e.hidden=!0,__md_set("__announce",r)}),ka(e).pipe(w(r=>t.next(r)),_(()=>t.complete()),m(r=>$({ref:e},r)))})}function Ha(e,{target$:t}){return t.pipe(m(r=>({hidden:r!==e})))}function En(e,t){let r=new g;return r.subscribe(({hidden:o})=>{e.hidden=o}),Ha(e,t).pipe(w(o=>r.next(o)),_(()=>r.complete()),m(o=>$({ref:e},o)))}function Rt(e,t){return t==="inline"?x("div",{class:"md-tooltip md-tooltip--inline",id:e,role:"tooltip"},x("div",{class:"md-tooltip__inner md-typeset"})):x("div",{class:"md-tooltip",id:e,role:"tooltip"},x("div",{class:"md-tooltip__inner md-typeset"}))}function wn(...e){return x("div",{class:"md-tooltip2",role:"tooltip"},x("div",{class:"md-tooltip2__inner md-typeset"},e))}function Tn(e,t){if(t=t?`${t}_annotation_${e}`:void 0,t){let r=t?`#${t}`:void 0;return x("aside",{class:"md-annotation",tabIndex:0},Rt(t),x("a",{href:r,class:"md-annotation__index",tabIndex:-1},x("span",{"data-md-annotation-id":e})))}else return x("aside",{class:"md-annotation",tabIndex:0},Rt(t),x("span",{class:"md-annotation__index",tabIndex:-1},x("span",{"data-md-annotation-id":e})))}function Sn(e){return x("button",{class:"md-clipboard md-icon",title:Ee("clipboard.copy"),"data-clipboard-target":`#${e} > code`})}var Ln=Mt(qr());function Qr(e,t){let r=t&2,o=t&1,n=Object.keys(e.terms).filter(p=>!e.terms[p]).reduce((p,c)=>[...p,x("del",null,(0,Ln.default)(c))," "],[]).slice(0,-1),i=xe(),a=new URL(e.location,i.base);B("search.highlight")&&a.searchParams.set("h",Object.entries(e.terms).filter(([,p])=>p).reduce((p,[c])=>`${p} ${c}`.trim(),""));let{tags:s}=xe();return x("a",{href:`${a}`,class:"md-search-result__link",tabIndex:-1},x("article",{class:"md-search-result__article md-typeset","data-md-score":e.score.toFixed(2)},r>0&&x("div",{class:"md-search-result__icon md-icon"}),r>0&&x("h1",null,e.title),r<=0&&x("h2",null,e.title),o>0&&e.text.length>0&&e.text,e.tags&&x("nav",{class:"md-tags"},e.tags.map(p=>{let c=s?p in s?`md-tag-icon md-tag--${s[p]}`:"md-tag-icon":"";return x("span",{class:`md-tag ${c}`},p)})),o>0&&n.length>0&&x("p",{class:"md-search-result__terms"},Ee("search.result.term.missing"),": ",...n)))}function Mn(e){let t=e[0].score,r=[...e],o=xe(),n=r.findIndex(l=>!`${new URL(l.location,o.base)}`.includes("#")),[i]=r.splice(n,1),a=r.findIndex(l=>l.scoreQr(l,1)),...p.length?[x("details",{class:"md-search-result__more"},x("summary",{tabIndex:-1},x("div",null,p.length>0&&p.length===1?Ee("search.result.more.one"):Ee("search.result.more.other",p.length))),...p.map(l=>Qr(l,1)))]:[]];return x("li",{class:"md-search-result__item"},c)}function _n(e){return x("ul",{class:"md-source__facts"},Object.entries(e).map(([t,r])=>x("li",{class:`md-source__fact md-source__fact--${t}`},typeof r=="number"?sr(r):r)))}function Kr(e){let t=`tabbed-control tabbed-control--${e}`;return x("div",{class:t,hidden:!0},x("button",{class:"tabbed-button",tabIndex:-1,"aria-hidden":"true"}))}function An(e){return x("div",{class:"md-typeset__scrollwrap"},x("div",{class:"md-typeset__table"},e))}function Ra(e){var o;let t=xe(),r=new URL(`../${e.version}/`,t.base);return x("li",{class:"md-version__item"},x("a",{href:`${r}`,class:"md-version__link"},e.title,((o=t.version)==null?void 0:o.alias)&&e.aliases.length>0&&x("span",{class:"md-version__alias"},e.aliases[0])))}function Cn(e,t){var o;let r=xe();return e=e.filter(n=>{var i;return!((i=n.properties)!=null&&i.hidden)}),x("div",{class:"md-version"},x("button",{class:"md-version__current","aria-label":Ee("select.version")},t.title,((o=r.version)==null?void 0:o.alias)&&t.aliases.length>0&&x("span",{class:"md-version__alias"},t.aliases[0])),x("ul",{class:"md-version__list"},e.map(Ra)))}var Ia=0;function ja(e){let t=z([et(e),$t(e)]).pipe(m(([o,n])=>o||n),K()),r=C(()=>Zo(e)).pipe(ne(Ne),pt(1),He(t),m(()=>en(e)));return t.pipe(Ae(o=>o),v(()=>z([t,r])),m(([o,n])=>({active:o,offset:n})),pe())}function Fa(e,t){let{content$:r,viewport$:o}=t,n=`__tooltip2_${Ia++}`;return C(()=>{let i=new g,a=new _r(!1);i.pipe(Z(),ie(!1)).subscribe(a);let s=a.pipe(Ht(c=>Le(+!c*250,kr)),K(),v(c=>c?r:S),w(c=>c.id=n),pe());z([i.pipe(m(({active:c})=>c)),s.pipe(v(c=>$t(c,250)),Q(!1))]).pipe(m(c=>c.some(l=>l))).subscribe(a);let p=a.pipe(b(c=>c),re(s,o),m(([c,l,{size:f}])=>{let u=e.getBoundingClientRect(),d=u.width/2;if(l.role==="tooltip")return{x:d,y:8+u.height};if(u.y>=f.height/2){let{height:y}=ce(l);return{x:d,y:-16-y}}else return{x:d,y:16+u.height}}));return z([s,i,p]).subscribe(([c,{offset:l},f])=>{c.style.setProperty("--md-tooltip-host-x",`${l.x}px`),c.style.setProperty("--md-tooltip-host-y",`${l.y}px`),c.style.setProperty("--md-tooltip-x",`${f.x}px`),c.style.setProperty("--md-tooltip-y",`${f.y}px`),c.classList.toggle("md-tooltip2--top",f.y<0),c.classList.toggle("md-tooltip2--bottom",f.y>=0)}),a.pipe(b(c=>c),re(s,(c,l)=>l),b(c=>c.role==="tooltip")).subscribe(c=>{let l=ce(R(":scope > *",c));c.style.setProperty("--md-tooltip-width",`${l.width}px`),c.style.setProperty("--md-tooltip-tail","0px")}),a.pipe(K(),ve(me),re(s)).subscribe(([c,l])=>{l.classList.toggle("md-tooltip2--active",c)}),z([a.pipe(b(c=>c)),s]).subscribe(([c,l])=>{l.role==="dialog"?(e.setAttribute("aria-controls",n),e.setAttribute("aria-haspopup","dialog")):e.setAttribute("aria-describedby",n)}),a.pipe(b(c=>!c)).subscribe(()=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-describedby"),e.removeAttribute("aria-haspopup")}),ja(e).pipe(w(c=>i.next(c)),_(()=>i.complete()),m(c=>$({ref:e},c)))})}function mt(e,{viewport$:t},r=document.body){return Fa(e,{content$:new j(o=>{let n=e.title,i=wn(n);return o.next(i),e.removeAttribute("title"),r.append(i),()=>{i.remove(),e.setAttribute("title",n)}}),viewport$:t})}function Ua(e,t){let r=C(()=>z([tn(e),Ne(t)])).pipe(m(([{x:o,y:n},i])=>{let{width:a,height:s}=ce(e);return{x:o-i.x+a/2,y:n-i.y+s/2}}));return et(e).pipe(v(o=>r.pipe(m(n=>({active:o,offset:n})),Te(+!o||1/0))))}function kn(e,t,{target$:r}){let[o,n]=Array.from(e.children);return C(()=>{let i=new g,a=i.pipe(Z(),ie(!0));return i.subscribe({next({offset:s}){e.style.setProperty("--md-tooltip-x",`${s.x}px`),e.style.setProperty("--md-tooltip-y",`${s.y}px`)},complete(){e.style.removeProperty("--md-tooltip-x"),e.style.removeProperty("--md-tooltip-y")}}),tt(e).pipe(W(a)).subscribe(s=>{e.toggleAttribute("data-md-visible",s)}),O(i.pipe(b(({active:s})=>s)),i.pipe(_e(250),b(({active:s})=>!s))).subscribe({next({active:s}){s?e.prepend(o):o.remove()},complete(){e.prepend(o)}}),i.pipe(Me(16,me)).subscribe(({active:s})=>{o.classList.toggle("md-tooltip--active",s)}),i.pipe(pt(125,me),b(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:s})=>s)).subscribe({next(s){s?e.style.setProperty("--md-tooltip-0",`${-s}px`):e.style.removeProperty("--md-tooltip-0")},complete(){e.style.removeProperty("--md-tooltip-0")}}),h(n,"click").pipe(W(a),b(s=>!(s.metaKey||s.ctrlKey))).subscribe(s=>{s.stopPropagation(),s.preventDefault()}),h(n,"mousedown").pipe(W(a),re(i)).subscribe(([s,{active:p}])=>{var c;if(s.button!==0||s.metaKey||s.ctrlKey)s.preventDefault();else if(p){s.preventDefault();let l=e.parentElement.closest(".md-annotation");l instanceof HTMLElement?l.focus():(c=Ie())==null||c.blur()}}),r.pipe(W(a),b(s=>s===o),Ge(125)).subscribe(()=>e.focus()),Ua(e,t).pipe(w(s=>i.next(s)),_(()=>i.complete()),m(s=>$({ref:e},s)))})}function Wa(e){return e.tagName==="CODE"?P(".c, .c1, .cm",e):[e]}function Da(e){let t=[];for(let r of Wa(e)){let o=[],n=document.createNodeIterator(r,NodeFilter.SHOW_TEXT);for(let i=n.nextNode();i;i=n.nextNode())o.push(i);for(let i of o){let a;for(;a=/(\(\d+\))(!)?/.exec(i.textContent);){let[,s,p]=a;if(typeof p=="undefined"){let c=i.splitText(a.index);i=c.splitText(s.length),t.push(c)}else{i.textContent=s,t.push(i);break}}}}return t}function Hn(e,t){t.append(...Array.from(e.childNodes))}function fr(e,t,{target$:r,print$:o}){let n=t.closest("[id]"),i=n==null?void 0:n.id,a=new Map;for(let s of Da(t)){let[,p]=s.textContent.match(/\((\d+)\)/);fe(`:scope > li:nth-child(${p})`,e)&&(a.set(p,Tn(p,i)),s.replaceWith(a.get(p)))}return a.size===0?S:C(()=>{let s=new g,p=s.pipe(Z(),ie(!0)),c=[];for(let[l,f]of a)c.push([R(".md-typeset",f),R(`:scope > li:nth-child(${l})`,e)]);return o.pipe(W(p)).subscribe(l=>{e.hidden=!l,e.classList.toggle("md-annotation-list",l);for(let[f,u]of c)l?Hn(f,u):Hn(u,f)}),O(...[...a].map(([,l])=>kn(l,t,{target$:r}))).pipe(_(()=>s.complete()),pe())})}function $n(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return $n(t)}}function Pn(e,t){return C(()=>{let r=$n(e);return typeof r!="undefined"?fr(r,e,t):S})}var Rn=Mt(Br());var Va=0;function In(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return In(t)}}function Na(e){return ge(e).pipe(m(({width:t})=>({scrollable:St(e).width>t})),ee("scrollable"))}function jn(e,t){let{matches:r}=matchMedia("(hover)"),o=C(()=>{let n=new g,i=n.pipe(jr(1));n.subscribe(({scrollable:c})=>{c&&r?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")});let a=[];if(Rn.default.isSupported()&&(e.closest(".copy")||B("content.code.copy")&&!e.closest(".no-copy"))){let c=e.closest("pre");c.id=`__code_${Va++}`;let l=Sn(c.id);c.insertBefore(l,e),B("content.tooltips")&&a.push(mt(l,{viewport$}))}let s=e.closest(".highlight");if(s instanceof HTMLElement){let c=In(s);if(typeof c!="undefined"&&(s.classList.contains("annotate")||B("content.code.annotate"))){let l=fr(c,e,t);a.push(ge(s).pipe(W(i),m(({width:f,height:u})=>f&&u),K(),v(f=>f?l:S)))}}return P(":scope > span[id]",e).length&&e.classList.add("md-code__content"),Na(e).pipe(w(c=>n.next(c)),_(()=>n.complete()),m(c=>$({ref:e},c)),Re(...a))});return B("content.lazy")?tt(e).pipe(b(n=>n),Te(1),v(()=>o)):o}function za(e,{target$:t,print$:r}){let o=!0;return O(t.pipe(m(n=>n.closest("details:not([open])")),b(n=>e===n),m(()=>({action:"open",reveal:!0}))),r.pipe(b(n=>n||!o),w(()=>o=e.open),m(n=>({action:n?"open":"close"}))))}function Fn(e,t){return C(()=>{let r=new g;return r.subscribe(({action:o,reveal:n})=>{e.toggleAttribute("open",o==="open"),n&&e.scrollIntoView()}),za(e,t).pipe(w(o=>r.next(o)),_(()=>r.complete()),m(o=>$({ref:e},o)))})}var Un=".node circle,.node ellipse,.node path,.node polygon,.node rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}marker{fill:var(--md-mermaid-edge-color)!important}.edgeLabel .label rect{fill:#0000}.label{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.label foreignObject{line-height:normal;overflow:visible}.label div .edgeLabel{color:var(--md-mermaid-label-fg-color)}.edgeLabel,.edgeLabel p,.label div .edgeLabel{background-color:var(--md-mermaid-label-bg-color)}.edgeLabel,.edgeLabel p{fill:var(--md-mermaid-label-bg-color);color:var(--md-mermaid-edge-color)}.edgePath .path,.flowchart-link{stroke:var(--md-mermaid-edge-color);stroke-width:.05rem}.edgePath .arrowheadPath{fill:var(--md-mermaid-edge-color);stroke:none}.cluster rect{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}.cluster span{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}g #flowchart-circleEnd,g #flowchart-circleStart,g #flowchart-crossEnd,g #flowchart-crossStart,g #flowchart-pointEnd,g #flowchart-pointStart{stroke:none}g.classGroup line,g.classGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.classGroup text{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.classLabel .box{fill:var(--md-mermaid-label-bg-color);background-color:var(--md-mermaid-label-bg-color);opacity:1}.classLabel .label{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node .divider{stroke:var(--md-mermaid-node-fg-color)}.relation{stroke:var(--md-mermaid-edge-color)}.cardinality{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.cardinality text{fill:inherit!important}defs #classDiagram-compositionEnd,defs #classDiagram-compositionStart,defs #classDiagram-dependencyEnd,defs #classDiagram-dependencyStart,defs #classDiagram-extensionEnd,defs #classDiagram-extensionStart{fill:var(--md-mermaid-edge-color)!important;stroke:var(--md-mermaid-edge-color)!important}defs #classDiagram-aggregationEnd,defs #classDiagram-aggregationStart{fill:var(--md-mermaid-label-bg-color)!important;stroke:var(--md-mermaid-edge-color)!important}g.stateGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.stateGroup .state-title{fill:var(--md-mermaid-label-fg-color)!important;font-family:var(--md-mermaid-font-family)}g.stateGroup .composit{fill:var(--md-mermaid-label-bg-color)}.nodeLabel,.nodeLabel p{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}a .nodeLabel{text-decoration:underline}.node circle.state-end,.node circle.state-start,.start-state{fill:var(--md-mermaid-edge-color);stroke:none}.end-state-inner,.end-state-outer{fill:var(--md-mermaid-edge-color)}.end-state-inner,.node circle.state-end{stroke:var(--md-mermaid-label-bg-color)}.transition{stroke:var(--md-mermaid-edge-color)}[id^=state-fork] rect,[id^=state-join] rect{fill:var(--md-mermaid-edge-color)!important;stroke:none!important}.statediagram-cluster.statediagram-cluster .inner{fill:var(--md-default-bg-color)}.statediagram-cluster rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.statediagram-state rect.divider{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}defs #statediagram-barbEnd{stroke:var(--md-mermaid-edge-color)}.attributeBoxEven,.attributeBoxOdd{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityBox{fill:var(--md-mermaid-label-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityLabel{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.relationshipLabelBox{fill:var(--md-mermaid-label-bg-color);fill-opacity:1;background-color:var(--md-mermaid-label-bg-color);opacity:1}.relationshipLabel{fill:var(--md-mermaid-label-fg-color)}.relationshipLine{stroke:var(--md-mermaid-edge-color)}defs #ONE_OR_MORE_END *,defs #ONE_OR_MORE_START *,defs #ONLY_ONE_END *,defs #ONLY_ONE_START *,defs #ZERO_OR_MORE_END *,defs #ZERO_OR_MORE_START *,defs #ZERO_OR_ONE_END *,defs #ZERO_OR_ONE_START *{stroke:var(--md-mermaid-edge-color)!important}defs #ZERO_OR_MORE_END circle,defs #ZERO_OR_MORE_START circle{fill:var(--md-mermaid-label-bg-color)}.actor{fill:var(--md-mermaid-sequence-actor-bg-color);stroke:var(--md-mermaid-sequence-actor-border-color)}text.actor>tspan{fill:var(--md-mermaid-sequence-actor-fg-color);font-family:var(--md-mermaid-font-family)}line{stroke:var(--md-mermaid-sequence-actor-line-color)}.actor-man circle,.actor-man line{fill:var(--md-mermaid-sequence-actorman-bg-color);stroke:var(--md-mermaid-sequence-actorman-line-color)}.messageLine0,.messageLine1{stroke:var(--md-mermaid-sequence-message-line-color)}.note{fill:var(--md-mermaid-sequence-note-bg-color);stroke:var(--md-mermaid-sequence-note-border-color)}.loopText,.loopText>tspan,.messageText,.noteText>tspan{stroke:none;font-family:var(--md-mermaid-font-family)!important}.messageText{fill:var(--md-mermaid-sequence-message-fg-color)}.loopText,.loopText>tspan{fill:var(--md-mermaid-sequence-loop-fg-color)}.noteText>tspan{fill:var(--md-mermaid-sequence-note-fg-color)}#arrowhead path{fill:var(--md-mermaid-sequence-message-line-color);stroke:none}.loopLine{fill:var(--md-mermaid-sequence-loop-bg-color);stroke:var(--md-mermaid-sequence-loop-border-color)}.labelBox{fill:var(--md-mermaid-sequence-label-bg-color);stroke:none}.labelText,.labelText>span{fill:var(--md-mermaid-sequence-label-fg-color);font-family:var(--md-mermaid-font-family)}.sequenceNumber{fill:var(--md-mermaid-sequence-number-fg-color)}rect.rect{fill:var(--md-mermaid-sequence-box-bg-color);stroke:none}rect.rect+text.text{fill:var(--md-mermaid-sequence-box-fg-color)}defs #sequencenumber{fill:var(--md-mermaid-sequence-number-bg-color)!important}";var Gr,Qa=0;function Ka(){return typeof mermaid=="undefined"||mermaid instanceof Element?Tt("https://unpkg.com/mermaid@11/dist/mermaid.min.js"):I(void 0)}function Wn(e){return e.classList.remove("mermaid"),Gr||(Gr=Ka().pipe(w(()=>mermaid.initialize({startOnLoad:!1,themeCSS:Un,sequence:{actorFontSize:"16px",messageFontSize:"16px",noteFontSize:"16px"}})),m(()=>{}),G(1))),Gr.subscribe(()=>co(this,null,function*(){e.classList.add("mermaid");let t=`__mermaid_${Qa++}`,r=x("div",{class:"mermaid"}),o=e.textContent,{svg:n,fn:i}=yield mermaid.render(t,o),a=r.attachShadow({mode:"closed"});a.innerHTML=n,e.replaceWith(r),i==null||i(a)})),Gr.pipe(m(()=>({ref:e})))}var Dn=x("table");function Vn(e){return e.replaceWith(Dn),Dn.replaceWith(An(e)),I({ref:e})}function Ya(e){let t=e.find(r=>r.checked)||e[0];return O(...e.map(r=>h(r,"change").pipe(m(()=>R(`label[for="${r.id}"]`))))).pipe(Q(R(`label[for="${t.id}"]`)),m(r=>({active:r})))}function Nn(e,{viewport$:t,target$:r}){let o=R(".tabbed-labels",e),n=P(":scope > input",e),i=Kr("prev");e.append(i);let a=Kr("next");return e.append(a),C(()=>{let s=new g,p=s.pipe(Z(),ie(!0));z([s,ge(e),tt(e)]).pipe(W(p),Me(1,me)).subscribe({next([{active:c},l]){let f=Ve(c),{width:u}=ce(c);e.style.setProperty("--md-indicator-x",`${f.x}px`),e.style.setProperty("--md-indicator-width",`${u}px`);let d=pr(o);(f.xd.x+l.width)&&o.scrollTo({left:Math.max(0,f.x-16),behavior:"smooth"})},complete(){e.style.removeProperty("--md-indicator-x"),e.style.removeProperty("--md-indicator-width")}}),z([Ne(o),ge(o)]).pipe(W(p)).subscribe(([c,l])=>{let f=St(o);i.hidden=c.x<16,a.hidden=c.x>f.width-l.width-16}),O(h(i,"click").pipe(m(()=>-1)),h(a,"click").pipe(m(()=>1))).pipe(W(p)).subscribe(c=>{let{width:l}=ce(o);o.scrollBy({left:l*c,behavior:"smooth"})}),r.pipe(W(p),b(c=>n.includes(c))).subscribe(c=>c.click()),o.classList.add("tabbed-labels--linked");for(let c of n){let l=R(`label[for="${c.id}"]`);l.replaceChildren(x("a",{href:`#${l.htmlFor}`,tabIndex:-1},...Array.from(l.childNodes))),h(l.firstElementChild,"click").pipe(W(p),b(f=>!(f.metaKey||f.ctrlKey)),w(f=>{f.preventDefault(),f.stopPropagation()})).subscribe(()=>{history.replaceState({},"",`#${l.htmlFor}`),l.click()})}return B("content.tabs.link")&&s.pipe(Ce(1),re(t)).subscribe(([{active:c},{offset:l}])=>{let f=c.innerText.trim();if(c.hasAttribute("data-md-switching"))c.removeAttribute("data-md-switching");else{let u=e.offsetTop-l.y;for(let y of P("[data-tabs]"))for(let L of P(":scope > input",y)){let X=R(`label[for="${L.id}"]`);if(X!==c&&X.innerText.trim()===f){X.setAttribute("data-md-switching",""),L.click();break}}window.scrollTo({top:e.offsetTop-u});let d=__md_get("__tabs")||[];__md_set("__tabs",[...new Set([f,...d])])}}),s.pipe(W(p)).subscribe(()=>{for(let c of P("audio, video",e))c.pause()}),Ya(n).pipe(w(c=>s.next(c)),_(()=>s.complete()),m(c=>$({ref:e},c)))}).pipe(Ke(se))}function zn(e,{viewport$:t,target$:r,print$:o}){return O(...P(".annotate:not(.highlight)",e).map(n=>Pn(n,{target$:r,print$:o})),...P("pre:not(.mermaid) > code",e).map(n=>jn(n,{target$:r,print$:o})),...P("pre.mermaid",e).map(n=>Wn(n)),...P("table:not([class])",e).map(n=>Vn(n)),...P("details",e).map(n=>Fn(n,{target$:r,print$:o})),...P("[data-tabs]",e).map(n=>Nn(n,{viewport$:t,target$:r})),...P("[title]",e).filter(()=>B("content.tooltips")).map(n=>mt(n,{viewport$:t})))}function Ba(e,{alert$:t}){return t.pipe(v(r=>O(I(!0),I(!1).pipe(Ge(2e3))).pipe(m(o=>({message:r,active:o})))))}function qn(e,t){let r=R(".md-typeset",e);return C(()=>{let o=new g;return o.subscribe(({message:n,active:i})=>{e.classList.toggle("md-dialog--active",i),r.textContent=n}),Ba(e,t).pipe(w(n=>o.next(n)),_(()=>o.complete()),m(n=>$({ref:e},n)))})}var Ga=0;function Ja(e,t){document.body.append(e);let{width:r}=ce(e);e.style.setProperty("--md-tooltip-width",`${r}px`),e.remove();let o=cr(t),n=typeof o!="undefined"?Ne(o):I({x:0,y:0}),i=O(et(t),$t(t)).pipe(K());return z([i,n]).pipe(m(([a,s])=>{let{x:p,y:c}=Ve(t),l=ce(t),f=t.closest("table");return f&&t.parentElement&&(p+=f.offsetLeft+t.parentElement.offsetLeft,c+=f.offsetTop+t.parentElement.offsetTop),{active:a,offset:{x:p-s.x+l.width/2-r/2,y:c-s.y+l.height+8}}}))}function Qn(e){let t=e.title;if(!t.length)return S;let r=`__tooltip_${Ga++}`,o=Rt(r,"inline"),n=R(".md-typeset",o);return n.innerHTML=t,C(()=>{let i=new g;return i.subscribe({next({offset:a}){o.style.setProperty("--md-tooltip-x",`${a.x}px`),o.style.setProperty("--md-tooltip-y",`${a.y}px`)},complete(){o.style.removeProperty("--md-tooltip-x"),o.style.removeProperty("--md-tooltip-y")}}),O(i.pipe(b(({active:a})=>a)),i.pipe(_e(250),b(({active:a})=>!a))).subscribe({next({active:a}){a?(e.insertAdjacentElement("afterend",o),e.setAttribute("aria-describedby",r),e.removeAttribute("title")):(o.remove(),e.removeAttribute("aria-describedby"),e.setAttribute("title",t))},complete(){o.remove(),e.removeAttribute("aria-describedby"),e.setAttribute("title",t)}}),i.pipe(Me(16,me)).subscribe(({active:a})=>{o.classList.toggle("md-tooltip--active",a)}),i.pipe(pt(125,me),b(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:a})=>a)).subscribe({next(a){a?o.style.setProperty("--md-tooltip-0",`${-a}px`):o.style.removeProperty("--md-tooltip-0")},complete(){o.style.removeProperty("--md-tooltip-0")}}),Ja(o,e).pipe(w(a=>i.next(a)),_(()=>i.complete()),m(a=>$({ref:e},a)))}).pipe(Ke(se))}function Xa({viewport$:e}){if(!B("header.autohide"))return I(!1);let t=e.pipe(m(({offset:{y:n}})=>n),Be(2,1),m(([n,i])=>[nMath.abs(i-n.y)>100),m(([,[n]])=>n),K()),o=ze("search");return z([e,o]).pipe(m(([{offset:n},i])=>n.y>400&&!i),K(),v(n=>n?r:I(!1)),Q(!1))}function Kn(e,t){return C(()=>z([ge(e),Xa(t)])).pipe(m(([{height:r},o])=>({height:r,hidden:o})),K((r,o)=>r.height===o.height&&r.hidden===o.hidden),G(1))}function Yn(e,{header$:t,main$:r}){return C(()=>{let o=new g,n=o.pipe(Z(),ie(!0));o.pipe(ee("active"),He(t)).subscribe(([{active:a},{hidden:s}])=>{e.classList.toggle("md-header--shadow",a&&!s),e.hidden=s});let i=ue(P("[title]",e)).pipe(b(()=>B("content.tooltips")),ne(a=>Qn(a)));return r.subscribe(o),t.pipe(W(n),m(a=>$({ref:e},a)),Re(i.pipe(W(n))))})}function Za(e,{viewport$:t,header$:r}){return mr(e,{viewport$:t,header$:r}).pipe(m(({offset:{y:o}})=>{let{height:n}=ce(e);return{active:o>=n}}),ee("active"))}function Bn(e,t){return C(()=>{let r=new g;r.subscribe({next({active:n}){e.classList.toggle("md-header__title--active",n)},complete(){e.classList.remove("md-header__title--active")}});let o=fe(".md-content h1");return typeof o=="undefined"?S:Za(o,t).pipe(w(n=>r.next(n)),_(()=>r.complete()),m(n=>$({ref:e},n)))})}function Gn(e,{viewport$:t,header$:r}){let o=r.pipe(m(({height:i})=>i),K()),n=o.pipe(v(()=>ge(e).pipe(m(({height:i})=>({top:e.offsetTop,bottom:e.offsetTop+i})),ee("bottom"))));return z([o,n,t]).pipe(m(([i,{top:a,bottom:s},{offset:{y:p},size:{height:c}}])=>(c=Math.max(0,c-Math.max(0,a-p,i)-Math.max(0,c+p-s)),{offset:a-i,height:c,active:a-i<=p})),K((i,a)=>i.offset===a.offset&&i.height===a.height&&i.active===a.active))}function es(e){let t=__md_get("__palette")||{index:e.findIndex(o=>matchMedia(o.getAttribute("data-md-color-media")).matches)},r=Math.max(0,Math.min(t.index,e.length-1));return I(...e).pipe(ne(o=>h(o,"change").pipe(m(()=>o))),Q(e[r]),m(o=>({index:e.indexOf(o),color:{media:o.getAttribute("data-md-color-media"),scheme:o.getAttribute("data-md-color-scheme"),primary:o.getAttribute("data-md-color-primary"),accent:o.getAttribute("data-md-color-accent")}})),G(1))}function Jn(e){let t=P("input",e),r=x("meta",{name:"theme-color"});document.head.appendChild(r);let o=x("meta",{name:"color-scheme"});document.head.appendChild(o);let n=Pt("(prefers-color-scheme: light)");return C(()=>{let i=new g;return i.subscribe(a=>{if(document.body.setAttribute("data-md-color-switching",""),a.color.media==="(prefers-color-scheme)"){let s=matchMedia("(prefers-color-scheme: light)"),p=document.querySelector(s.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");a.color.scheme=p.getAttribute("data-md-color-scheme"),a.color.primary=p.getAttribute("data-md-color-primary"),a.color.accent=p.getAttribute("data-md-color-accent")}for(let[s,p]of Object.entries(a.color))document.body.setAttribute(`data-md-color-${s}`,p);for(let s=0;sa.key==="Enter"),re(i,(a,s)=>s)).subscribe(({index:a})=>{a=(a+1)%t.length,t[a].click(),t[a].focus()}),i.pipe(m(()=>{let a=Se("header"),s=window.getComputedStyle(a);return o.content=s.colorScheme,s.backgroundColor.match(/\d+/g).map(p=>(+p).toString(16).padStart(2,"0")).join("")})).subscribe(a=>r.content=`#${a}`),i.pipe(ve(se)).subscribe(()=>{document.body.removeAttribute("data-md-color-switching")}),es(t).pipe(W(n.pipe(Ce(1))),ct(),w(a=>i.next(a)),_(()=>i.complete()),m(a=>$({ref:e},a)))})}function Xn(e,{progress$:t}){return C(()=>{let r=new g;return r.subscribe(({value:o})=>{e.style.setProperty("--md-progress-value",`${o}`)}),t.pipe(w(o=>r.next({value:o})),_(()=>r.complete()),m(o=>({ref:e,value:o})))})}var Jr=Mt(Br());function ts(e){e.setAttribute("data-md-copying","");let t=e.closest("[data-copy]"),r=t?t.getAttribute("data-copy"):e.innerText;return e.removeAttribute("data-md-copying"),r.trimEnd()}function Zn({alert$:e}){Jr.default.isSupported()&&new j(t=>{new Jr.default("[data-clipboard-target], [data-clipboard-text]",{text:r=>r.getAttribute("data-clipboard-text")||ts(R(r.getAttribute("data-clipboard-target")))}).on("success",r=>t.next(r))}).pipe(w(t=>{t.trigger.focus()}),m(()=>Ee("clipboard.copied"))).subscribe(e)}function ei(e,t){return e.protocol=t.protocol,e.hostname=t.hostname,e}function rs(e,t){let r=new Map;for(let o of P("url",e)){let n=R("loc",o),i=[ei(new URL(n.textContent),t)];r.set(`${i[0]}`,i);for(let a of P("[rel=alternate]",o)){let s=a.getAttribute("href");s!=null&&i.push(ei(new URL(s),t))}}return r}function ur(e){return un(new URL("sitemap.xml",e)).pipe(m(t=>rs(t,new URL(e))),de(()=>I(new Map)))}function os(e,t){if(!(e.target instanceof Element))return S;let r=e.target.closest("a");if(r===null)return S;if(r.target||e.metaKey||e.ctrlKey)return S;let o=new URL(r.href);return o.search=o.hash="",t.has(`${o}`)?(e.preventDefault(),I(new URL(r.href))):S}function ti(e){let t=new Map;for(let r of P(":scope > *",e.head))t.set(r.outerHTML,r);return t}function ri(e){for(let t of P("[href], [src]",e))for(let r of["href","src"]){let o=t.getAttribute(r);if(o&&!/^(?:[a-z]+:)?\/\//i.test(o)){t[r]=t[r];break}}return I(e)}function ns(e){for(let o of["[data-md-component=announce]","[data-md-component=container]","[data-md-component=header-topic]","[data-md-component=outdated]","[data-md-component=logo]","[data-md-component=skip]",...B("navigation.tabs.sticky")?["[data-md-component=tabs]"]:[]]){let n=fe(o),i=fe(o,e);typeof n!="undefined"&&typeof i!="undefined"&&n.replaceWith(i)}let t=ti(document);for(let[o,n]of ti(e))t.has(o)?t.delete(o):document.head.appendChild(n);for(let o of t.values()){let n=o.getAttribute("name");n!=="theme-color"&&n!=="color-scheme"&&o.remove()}let r=Se("container");return We(P("script",r)).pipe(v(o=>{let n=e.createElement("script");if(o.src){for(let i of o.getAttributeNames())n.setAttribute(i,o.getAttribute(i));return o.replaceWith(n),new j(i=>{n.onload=()=>i.complete()})}else return n.textContent=o.textContent,o.replaceWith(n),S}),Z(),ie(document))}function oi({location$:e,viewport$:t,progress$:r}){let o=xe();if(location.protocol==="file:")return S;let n=ur(o.base);I(document).subscribe(ri);let i=h(document.body,"click").pipe(He(n),v(([p,c])=>os(p,c)),pe()),a=h(window,"popstate").pipe(m(ye),pe());i.pipe(re(t)).subscribe(([p,{offset:c}])=>{history.replaceState(c,""),history.pushState(null,"",p)}),O(i,a).subscribe(e);let s=e.pipe(ee("pathname"),v(p=>fn(p,{progress$:r}).pipe(de(()=>(lt(p,!0),S)))),v(ri),v(ns),pe());return O(s.pipe(re(e,(p,c)=>c)),s.pipe(v(()=>e),ee("pathname"),v(()=>e),ee("hash")),e.pipe(K((p,c)=>p.pathname===c.pathname&&p.hash===c.hash),v(()=>i),w(()=>history.back()))).subscribe(p=>{var c,l;history.state!==null||!p.hash?window.scrollTo(0,(l=(c=history.state)==null?void 0:c.y)!=null?l:0):(history.scrollRestoration="auto",pn(p.hash),history.scrollRestoration="manual")}),e.subscribe(()=>{history.scrollRestoration="manual"}),h(window,"beforeunload").subscribe(()=>{history.scrollRestoration="auto"}),t.pipe(ee("offset"),_e(100)).subscribe(({offset:p})=>{history.replaceState(p,"")}),s}var ni=Mt(qr());function ii(e){let t=e.separator.split("|").map(n=>n.replace(/(\(\?[!=<][^)]+\))/g,"").length===0?"\uFFFD":n).join("|"),r=new RegExp(t,"img"),o=(n,i,a)=>`${i}${a}`;return n=>{n=n.replace(/[\s*+\-:~^]+/g," ").trim();let i=new RegExp(`(^|${e.separator}|)(${n.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return a=>(0,ni.default)(a).replace(i,o).replace(/<\/mark>(\s+)]*>/img,"$1")}}function jt(e){return e.type===1}function dr(e){return e.type===3}function ai(e,t){let r=yn(e);return O(I(location.protocol!=="file:"),ze("search")).pipe(Ae(o=>o),v(()=>t)).subscribe(({config:o,docs:n})=>r.next({type:0,data:{config:o,docs:n,options:{suggest:B("search.suggest")}}})),r}function si(e){var l;let{selectedVersionSitemap:t,selectedVersionBaseURL:r,currentLocation:o,currentBaseURL:n}=e,i=(l=Xr(n))==null?void 0:l.pathname;if(i===void 0)return;let a=ss(o.pathname,i);if(a===void 0)return;let s=ps(t.keys());if(!t.has(s))return;let p=Xr(a,s);if(!p||!t.has(p.href))return;let c=Xr(a,r);if(c)return c.hash=o.hash,c.search=o.search,c}function Xr(e,t){try{return new URL(e,t)}catch(r){return}}function ss(e,t){if(e.startsWith(t))return e.slice(t.length)}function cs(e,t){let r=Math.min(e.length,t.length),o;for(o=0;oS)),o=r.pipe(m(n=>{let[,i]=t.base.match(/([^/]+)\/?$/);return n.find(({version:a,aliases:s})=>a===i||s.includes(i))||n[0]}));r.pipe(m(n=>new Map(n.map(i=>[`${new URL(`../${i.version}/`,t.base)}`,i]))),v(n=>h(document.body,"click").pipe(b(i=>!i.metaKey&&!i.ctrlKey),re(o),v(([i,a])=>{if(i.target instanceof Element){let s=i.target.closest("a");if(s&&!s.target&&n.has(s.href)){let p=s.href;return!i.target.closest(".md-version")&&n.get(p)===a?S:(i.preventDefault(),I(new URL(p)))}}return S}),v(i=>ur(i).pipe(m(a=>{var s;return(s=si({selectedVersionSitemap:a,selectedVersionBaseURL:i,currentLocation:ye(),currentBaseURL:t.base}))!=null?s:i})))))).subscribe(n=>lt(n,!0)),z([r,o]).subscribe(([n,i])=>{R(".md-header__topic").appendChild(Cn(n,i))}),e.pipe(v(()=>o)).subscribe(n=>{var a;let i=__md_get("__outdated",sessionStorage);if(i===null){i=!0;let s=((a=t.version)==null?void 0:a.default)||"latest";Array.isArray(s)||(s=[s]);e:for(let p of s)for(let c of n.aliases.concat(n.version))if(new RegExp(p,"i").test(c)){i=!1;break e}__md_set("__outdated",i,sessionStorage)}if(i)for(let s of ae("outdated"))s.hidden=!1})}function ls(e,{worker$:t}){let{searchParams:r}=ye();r.has("q")&&(Je("search",!0),e.value=r.get("q"),e.focus(),ze("search").pipe(Ae(i=>!i)).subscribe(()=>{let i=ye();i.searchParams.delete("q"),history.replaceState({},"",`${i}`)}));let o=et(e),n=O(t.pipe(Ae(jt)),h(e,"keyup"),o).pipe(m(()=>e.value),K());return z([n,o]).pipe(m(([i,a])=>({value:i,focus:a})),G(1))}function pi(e,{worker$:t}){let r=new g,o=r.pipe(Z(),ie(!0));z([t.pipe(Ae(jt)),r],(i,a)=>a).pipe(ee("value")).subscribe(({value:i})=>t.next({type:2,data:i})),r.pipe(ee("focus")).subscribe(({focus:i})=>{i&&Je("search",i)}),h(e.form,"reset").pipe(W(o)).subscribe(()=>e.focus());let n=R("header [for=__search]");return h(n,"click").subscribe(()=>e.focus()),ls(e,{worker$:t}).pipe(w(i=>r.next(i)),_(()=>r.complete()),m(i=>$({ref:e},i)),G(1))}function li(e,{worker$:t,query$:r}){let o=new g,n=on(e.parentElement).pipe(b(Boolean)),i=e.parentElement,a=R(":scope > :first-child",e),s=R(":scope > :last-child",e);ze("search").subscribe(l=>s.setAttribute("role",l?"list":"presentation")),o.pipe(re(r),Wr(t.pipe(Ae(jt)))).subscribe(([{items:l},{value:f}])=>{switch(l.length){case 0:a.textContent=f.length?Ee("search.result.none"):Ee("search.result.placeholder");break;case 1:a.textContent=Ee("search.result.one");break;default:let u=sr(l.length);a.textContent=Ee("search.result.other",u)}});let p=o.pipe(w(()=>s.innerHTML=""),v(({items:l})=>O(I(...l.slice(0,10)),I(...l.slice(10)).pipe(Be(4),Vr(n),v(([f])=>f)))),m(Mn),pe());return p.subscribe(l=>s.appendChild(l)),p.pipe(ne(l=>{let f=fe("details",l);return typeof f=="undefined"?S:h(f,"toggle").pipe(W(o),m(()=>f))})).subscribe(l=>{l.open===!1&&l.offsetTop<=i.scrollTop&&i.scrollTo({top:l.offsetTop})}),t.pipe(b(dr),m(({data:l})=>l)).pipe(w(l=>o.next(l)),_(()=>o.complete()),m(l=>$({ref:e},l)))}function ms(e,{query$:t}){return t.pipe(m(({value:r})=>{let o=ye();return o.hash="",r=r.replace(/\s+/g,"+").replace(/&/g,"%26").replace(/=/g,"%3D"),o.search=`q=${r}`,{url:o}}))}function mi(e,t){let r=new g,o=r.pipe(Z(),ie(!0));return r.subscribe(({url:n})=>{e.setAttribute("data-clipboard-text",e.href),e.href=`${n}`}),h(e,"click").pipe(W(o)).subscribe(n=>n.preventDefault()),ms(e,t).pipe(w(n=>r.next(n)),_(()=>r.complete()),m(n=>$({ref:e},n)))}function fi(e,{worker$:t,keyboard$:r}){let o=new g,n=Se("search-query"),i=O(h(n,"keydown"),h(n,"focus")).pipe(ve(se),m(()=>n.value),K());return o.pipe(He(i),m(([{suggest:s},p])=>{let c=p.split(/([\s-]+)/);if(s!=null&&s.length&&c[c.length-1]){let l=s[s.length-1];l.startsWith(c[c.length-1])&&(c[c.length-1]=l)}else c.length=0;return c})).subscribe(s=>e.innerHTML=s.join("").replace(/\s/g," ")),r.pipe(b(({mode:s})=>s==="search")).subscribe(s=>{switch(s.type){case"ArrowRight":e.innerText.length&&n.selectionStart===n.value.length&&(n.value=e.innerText);break}}),t.pipe(b(dr),m(({data:s})=>s)).pipe(w(s=>o.next(s)),_(()=>o.complete()),m(()=>({ref:e})))}function ui(e,{index$:t,keyboard$:r}){let o=xe();try{let n=ai(o.search,t),i=Se("search-query",e),a=Se("search-result",e);h(e,"click").pipe(b(({target:p})=>p instanceof Element&&!!p.closest("a"))).subscribe(()=>Je("search",!1)),r.pipe(b(({mode:p})=>p==="search")).subscribe(p=>{let c=Ie();switch(p.type){case"Enter":if(c===i){let l=new Map;for(let f of P(":first-child [href]",a)){let u=f.firstElementChild;l.set(f,parseFloat(u.getAttribute("data-md-score")))}if(l.size){let[[f]]=[...l].sort(([,u],[,d])=>d-u);f.click()}p.claim()}break;case"Escape":case"Tab":Je("search",!1),i.blur();break;case"ArrowUp":case"ArrowDown":if(typeof c=="undefined")i.focus();else{let l=[i,...P(":not(details) > [href], summary, details[open] [href]",a)],f=Math.max(0,(Math.max(0,l.indexOf(c))+l.length+(p.type==="ArrowUp"?-1:1))%l.length);l[f].focus()}p.claim();break;default:i!==Ie()&&i.focus()}}),r.pipe(b(({mode:p})=>p==="global")).subscribe(p=>{switch(p.type){case"f":case"s":case"/":i.focus(),i.select(),p.claim();break}});let s=pi(i,{worker$:n});return O(s,li(a,{worker$:n,query$:s})).pipe(Re(...ae("search-share",e).map(p=>mi(p,{query$:s})),...ae("search-suggest",e).map(p=>fi(p,{worker$:n,keyboard$:r}))))}catch(n){return e.hidden=!0,Ye}}function di(e,{index$:t,location$:r}){return z([t,r.pipe(Q(ye()),b(o=>!!o.searchParams.get("h")))]).pipe(m(([o,n])=>ii(o.config)(n.searchParams.get("h"))),m(o=>{var a;let n=new Map,i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT);for(let s=i.nextNode();s;s=i.nextNode())if((a=s.parentElement)!=null&&a.offsetHeight){let p=s.textContent,c=o(p);c.length>p.length&&n.set(s,c)}for(let[s,p]of n){let{childNodes:c}=x("span",null,p);s.replaceWith(...Array.from(c))}return{ref:e,nodes:n}}))}function fs(e,{viewport$:t,main$:r}){let o=e.closest(".md-grid"),n=o.offsetTop-o.parentElement.offsetTop;return z([r,t]).pipe(m(([{offset:i,height:a},{offset:{y:s}}])=>(a=a+Math.min(n,Math.max(0,s-i))-n,{height:a,locked:s>=i+n})),K((i,a)=>i.height===a.height&&i.locked===a.locked))}function Zr(e,o){var n=o,{header$:t}=n,r=so(n,["header$"]);let i=R(".md-sidebar__scrollwrap",e),{y:a}=Ve(i);return C(()=>{let s=new g,p=s.pipe(Z(),ie(!0)),c=s.pipe(Me(0,me));return c.pipe(re(t)).subscribe({next([{height:l},{height:f}]){i.style.height=`${l-2*a}px`,e.style.top=`${f}px`},complete(){i.style.height="",e.style.top=""}}),c.pipe(Ae()).subscribe(()=>{for(let l of P(".md-nav__link--active[href]",e)){if(!l.clientHeight)continue;let f=l.closest(".md-sidebar__scrollwrap");if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:d}=ce(f);f.scrollTo({top:u-d/2})}}}),ue(P("label[tabindex]",e)).pipe(ne(l=>h(l,"click").pipe(ve(se),m(()=>l),W(p)))).subscribe(l=>{let f=R(`[id="${l.htmlFor}"]`);R(`[aria-labelledby="${l.id}"]`).setAttribute("aria-expanded",`${f.checked}`)}),fs(e,r).pipe(w(l=>s.next(l)),_(()=>s.complete()),m(l=>$({ref:e},l)))})}function hi(e,t){if(typeof t!="undefined"){let r=`https://api.github.com/repos/${e}/${t}`;return st(je(`${r}/releases/latest`).pipe(de(()=>S),m(o=>({version:o.tag_name})),De({})),je(r).pipe(de(()=>S),m(o=>({stars:o.stargazers_count,forks:o.forks_count})),De({}))).pipe(m(([o,n])=>$($({},o),n)))}else{let r=`https://api.github.com/users/${e}`;return je(r).pipe(m(o=>({repositories:o.public_repos})),De({}))}}function bi(e,t){let r=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return st(je(`${r}/releases/permalink/latest`).pipe(de(()=>S),m(({tag_name:o})=>({version:o})),De({})),je(r).pipe(de(()=>S),m(({star_count:o,forks_count:n})=>({stars:o,forks:n})),De({}))).pipe(m(([o,n])=>$($({},o),n)))}function vi(e){let t=e.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i);if(t){let[,r,o]=t;return hi(r,o)}if(t=e.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i),t){let[,r,o]=t;return bi(r,o)}return S}var us;function ds(e){return us||(us=C(()=>{let t=__md_get("__source",sessionStorage);if(t)return I(t);if(ae("consent").length){let o=__md_get("__consent");if(!(o&&o.github))return S}return vi(e.href).pipe(w(o=>__md_set("__source",o,sessionStorage)))}).pipe(de(()=>S),b(t=>Object.keys(t).length>0),m(t=>({facts:t})),G(1)))}function gi(e){let t=R(":scope > :last-child",e);return C(()=>{let r=new g;return r.subscribe(({facts:o})=>{t.appendChild(_n(o)),t.classList.add("md-source__repository--active")}),ds(e).pipe(w(o=>r.next(o)),_(()=>r.complete()),m(o=>$({ref:e},o)))})}function hs(e,{viewport$:t,header$:r}){return ge(document.body).pipe(v(()=>mr(e,{header$:r,viewport$:t})),m(({offset:{y:o}})=>({hidden:o>=10})),ee("hidden"))}function yi(e,t){return C(()=>{let r=new g;return r.subscribe({next({hidden:o}){e.hidden=o},complete(){e.hidden=!1}}),(B("navigation.tabs.sticky")?I({hidden:!1}):hs(e,t)).pipe(w(o=>r.next(o)),_(()=>r.complete()),m(o=>$({ref:e},o)))})}function bs(e,{viewport$:t,header$:r}){let o=new Map,n=P(".md-nav__link",e);for(let s of n){let p=decodeURIComponent(s.hash.substring(1)),c=fe(`[id="${p}"]`);typeof c!="undefined"&&o.set(s,c)}let i=r.pipe(ee("height"),m(({height:s})=>{let p=Se("main"),c=R(":scope > :first-child",p);return s+.8*(c.offsetTop-p.offsetTop)}),pe());return ge(document.body).pipe(ee("height"),v(s=>C(()=>{let p=[];return I([...o].reduce((c,[l,f])=>{for(;p.length&&o.get(p[p.length-1]).tagName>=f.tagName;)p.pop();let u=f.offsetTop;for(;!u&&f.parentElement;)f=f.parentElement,u=f.offsetTop;let d=f.offsetParent;for(;d;d=d.offsetParent)u+=d.offsetTop;return c.set([...p=[...p,l]].reverse(),u)},new Map))}).pipe(m(p=>new Map([...p].sort(([,c],[,l])=>c-l))),He(i),v(([p,c])=>t.pipe(Fr(([l,f],{offset:{y:u},size:d})=>{let y=u+d.height>=Math.floor(s.height);for(;f.length;){let[,L]=f[0];if(L-c=u&&!y)f=[l.pop(),...f];else break}return[l,f]},[[],[...p]]),K((l,f)=>l[0]===f[0]&&l[1]===f[1])))))).pipe(m(([s,p])=>({prev:s.map(([c])=>c),next:p.map(([c])=>c)})),Q({prev:[],next:[]}),Be(2,1),m(([s,p])=>s.prev.length{let i=new g,a=i.pipe(Z(),ie(!0));if(i.subscribe(({prev:s,next:p})=>{for(let[c]of p)c.classList.remove("md-nav__link--passed"),c.classList.remove("md-nav__link--active");for(let[c,[l]]of s.entries())l.classList.add("md-nav__link--passed"),l.classList.toggle("md-nav__link--active",c===s.length-1)}),B("toc.follow")){let s=O(t.pipe(_e(1),m(()=>{})),t.pipe(_e(250),m(()=>"smooth")));i.pipe(b(({prev:p})=>p.length>0),He(o.pipe(ve(se))),re(s)).subscribe(([[{prev:p}],c])=>{let[l]=p[p.length-1];if(l.offsetHeight){let f=cr(l);if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:d}=ce(f);f.scrollTo({top:u-d/2,behavior:c})}}})}return B("navigation.tracking")&&t.pipe(W(a),ee("offset"),_e(250),Ce(1),W(n.pipe(Ce(1))),ct({delay:250}),re(i)).subscribe(([,{prev:s}])=>{let p=ye(),c=s[s.length-1];if(c&&c.length){let[l]=c,{hash:f}=new URL(l.href);p.hash!==f&&(p.hash=f,history.replaceState({},"",`${p}`))}else p.hash="",history.replaceState({},"",`${p}`)}),bs(e,{viewport$:t,header$:r}).pipe(w(s=>i.next(s)),_(()=>i.complete()),m(s=>$({ref:e},s)))})}function vs(e,{viewport$:t,main$:r,target$:o}){let n=t.pipe(m(({offset:{y:a}})=>a),Be(2,1),m(([a,s])=>a>s&&s>0),K()),i=r.pipe(m(({active:a})=>a));return z([i,n]).pipe(m(([a,s])=>!(a&&s)),K(),W(o.pipe(Ce(1))),ie(!0),ct({delay:250}),m(a=>({hidden:a})))}function Ei(e,{viewport$:t,header$:r,main$:o,target$:n}){let i=new g,a=i.pipe(Z(),ie(!0));return i.subscribe({next({hidden:s}){e.hidden=s,s?(e.setAttribute("tabindex","-1"),e.blur()):e.removeAttribute("tabindex")},complete(){e.style.top="",e.hidden=!0,e.removeAttribute("tabindex")}}),r.pipe(W(a),ee("height")).subscribe(({height:s})=>{e.style.top=`${s+16}px`}),h(e,"click").subscribe(s=>{s.preventDefault(),window.scrollTo({top:0})}),vs(e,{viewport$:t,main$:o,target$:n}).pipe(w(s=>i.next(s)),_(()=>i.complete()),m(s=>$({ref:e},s)))}function wi({document$:e,viewport$:t}){e.pipe(v(()=>P(".md-ellipsis")),ne(r=>tt(r).pipe(W(e.pipe(Ce(1))),b(o=>o),m(()=>r),Te(1))),b(r=>r.offsetWidth{let o=r.innerText,n=r.closest("a")||r;return n.title=o,B("content.tooltips")?mt(n,{viewport$:t}).pipe(W(e.pipe(Ce(1))),_(()=>n.removeAttribute("title"))):S})).subscribe(),B("content.tooltips")&&e.pipe(v(()=>P(".md-status")),ne(r=>mt(r,{viewport$:t}))).subscribe()}function Ti({document$:e,tablet$:t}){e.pipe(v(()=>P(".md-toggle--indeterminate")),w(r=>{r.indeterminate=!0,r.checked=!1}),ne(r=>h(r,"change").pipe(Dr(()=>r.classList.contains("md-toggle--indeterminate")),m(()=>r))),re(t)).subscribe(([r,o])=>{r.classList.remove("md-toggle--indeterminate"),o&&(r.checked=!1)})}function gs(){return/(iPad|iPhone|iPod)/.test(navigator.userAgent)}function Si({document$:e}){e.pipe(v(()=>P("[data-md-scrollfix]")),w(t=>t.removeAttribute("data-md-scrollfix")),b(gs),ne(t=>h(t,"touchstart").pipe(m(()=>t)))).subscribe(t=>{let r=t.scrollTop;r===0?t.scrollTop=1:r+t.offsetHeight===t.scrollHeight&&(t.scrollTop=r-1)})}function Oi({viewport$:e,tablet$:t}){z([ze("search"),t]).pipe(m(([r,o])=>r&&!o),v(r=>I(r).pipe(Ge(r?400:100))),re(e)).subscribe(([r,{offset:{y:o}}])=>{if(r)document.body.setAttribute("data-md-scrolllock",""),document.body.style.top=`-${o}px`;else{let n=-1*parseInt(document.body.style.top,10);document.body.removeAttribute("data-md-scrolllock"),document.body.style.top="",n&&window.scrollTo(0,n)}})}Object.entries||(Object.entries=function(e){let t=[];for(let r of Object.keys(e))t.push([r,e[r]]);return t});Object.values||(Object.values=function(e){let t=[];for(let r of Object.keys(e))t.push(e[r]);return t});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(e,t){typeof e=="object"?(this.scrollLeft=e.left,this.scrollTop=e.top):(this.scrollLeft=e,this.scrollTop=t)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...e){let t=this.parentNode;if(t){e.length===0&&t.removeChild(this);for(let r=e.length-1;r>=0;r--){let o=e[r];typeof o=="string"?o=document.createTextNode(o):o.parentNode&&o.parentNode.removeChild(o),r?t.insertBefore(this.previousSibling,o):t.replaceChild(o,this)}}}));function ys(){return location.protocol==="file:"?Tt(`${new URL("search/search_index.js",eo.base)}`).pipe(m(()=>__index),G(1)):je(new URL("search/search_index.json",eo.base))}document.documentElement.classList.remove("no-js");document.documentElement.classList.add("js");var ot=Go(),Ut=sn(),Lt=ln(Ut),to=an(),Oe=gn(),hr=Pt("(min-width: 960px)"),Mi=Pt("(min-width: 1220px)"),_i=mn(),eo=xe(),Ai=document.forms.namedItem("search")?ys():Ye,ro=new g;Zn({alert$:ro});var oo=new g;B("navigation.instant")&&oi({location$:Ut,viewport$:Oe,progress$:oo}).subscribe(ot);var Li;((Li=eo.version)==null?void 0:Li.provider)==="mike"&&ci({document$:ot});O(Ut,Lt).pipe(Ge(125)).subscribe(()=>{Je("drawer",!1),Je("search",!1)});to.pipe(b(({mode:e})=>e==="global")).subscribe(e=>{switch(e.type){case"p":case",":let t=fe("link[rel=prev]");typeof t!="undefined"&<(t);break;case"n":case".":let r=fe("link[rel=next]");typeof r!="undefined"&<(r);break;case"Enter":let o=Ie();o instanceof HTMLLabelElement&&o.click()}});wi({viewport$:Oe,document$:ot});Ti({document$:ot,tablet$:hr});Si({document$:ot});Oi({viewport$:Oe,tablet$:hr});var rt=Kn(Se("header"),{viewport$:Oe}),Ft=ot.pipe(m(()=>Se("main")),v(e=>Gn(e,{viewport$:Oe,header$:rt})),G(1)),xs=O(...ae("consent").map(e=>En(e,{target$:Lt})),...ae("dialog").map(e=>qn(e,{alert$:ro})),...ae("header").map(e=>Yn(e,{viewport$:Oe,header$:rt,main$:Ft})),...ae("palette").map(e=>Jn(e)),...ae("progress").map(e=>Xn(e,{progress$:oo})),...ae("search").map(e=>ui(e,{index$:Ai,keyboard$:to})),...ae("source").map(e=>gi(e))),Es=C(()=>O(...ae("announce").map(e=>xn(e)),...ae("content").map(e=>zn(e,{viewport$:Oe,target$:Lt,print$:_i})),...ae("content").map(e=>B("search.highlight")?di(e,{index$:Ai,location$:Ut}):S),...ae("header-title").map(e=>Bn(e,{viewport$:Oe,header$:rt})),...ae("sidebar").map(e=>e.getAttribute("data-md-type")==="navigation"?Nr(Mi,()=>Zr(e,{viewport$:Oe,header$:rt,main$:Ft})):Nr(hr,()=>Zr(e,{viewport$:Oe,header$:rt,main$:Ft}))),...ae("tabs").map(e=>yi(e,{viewport$:Oe,header$:rt})),...ae("toc").map(e=>xi(e,{viewport$:Oe,header$:rt,main$:Ft,target$:Lt})),...ae("top").map(e=>Ei(e,{viewport$:Oe,header$:rt,main$:Ft,target$:Lt})))),Ci=ot.pipe(v(()=>Es),Re(xs),G(1));Ci.subscribe();window.document$=ot;window.location$=Ut;window.target$=Lt;window.keyboard$=to;window.viewport$=Oe;window.tablet$=hr;window.screen$=Mi;window.print$=_i;window.alert$=ro;window.progress$=oo;window.component$=Ci;})(); +//# sourceMappingURL=bundle.525ec568.min.js.map + diff --git a/assets/javascripts/bundle.525ec568.min.js.map b/assets/javascripts/bundle.525ec568.min.js.map new file mode 100644 index 000000000..ef5d8d34a --- /dev/null +++ b/assets/javascripts/bundle.525ec568.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["node_modules/focus-visible/dist/focus-visible.js", "node_modules/escape-html/index.js", "node_modules/clipboard/dist/clipboard.js", "src/templates/assets/javascripts/bundle.ts", "node_modules/tslib/tslib.es6.mjs", "node_modules/rxjs/src/internal/util/isFunction.ts", "node_modules/rxjs/src/internal/util/createErrorClass.ts", "node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "node_modules/rxjs/src/internal/util/arrRemove.ts", "node_modules/rxjs/src/internal/Subscription.ts", "node_modules/rxjs/src/internal/config.ts", "node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "node_modules/rxjs/src/internal/util/noop.ts", "node_modules/rxjs/src/internal/NotificationFactories.ts", "node_modules/rxjs/src/internal/util/errorContext.ts", "node_modules/rxjs/src/internal/Subscriber.ts", "node_modules/rxjs/src/internal/symbol/observable.ts", "node_modules/rxjs/src/internal/util/identity.ts", "node_modules/rxjs/src/internal/util/pipe.ts", "node_modules/rxjs/src/internal/Observable.ts", "node_modules/rxjs/src/internal/util/lift.ts", "node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts", "node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "node_modules/rxjs/src/internal/Subject.ts", "node_modules/rxjs/src/internal/BehaviorSubject.ts", "node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "node_modules/rxjs/src/internal/ReplaySubject.ts", "node_modules/rxjs/src/internal/scheduler/Action.ts", "node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "node_modules/rxjs/src/internal/Scheduler.ts", "node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "node_modules/rxjs/src/internal/scheduler/async.ts", "node_modules/rxjs/src/internal/scheduler/QueueAction.ts", "node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts", "node_modules/rxjs/src/internal/scheduler/queue.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts", "node_modules/rxjs/src/internal/scheduler/animationFrame.ts", "node_modules/rxjs/src/internal/observable/empty.ts", "node_modules/rxjs/src/internal/util/isScheduler.ts", "node_modules/rxjs/src/internal/util/args.ts", "node_modules/rxjs/src/internal/util/isArrayLike.ts", "node_modules/rxjs/src/internal/util/isPromise.ts", "node_modules/rxjs/src/internal/util/isInteropObservable.ts", "node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "node_modules/rxjs/src/internal/symbol/iterator.ts", "node_modules/rxjs/src/internal/util/isIterable.ts", "node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "node_modules/rxjs/src/internal/observable/innerFrom.ts", "node_modules/rxjs/src/internal/util/executeSchedule.ts", "node_modules/rxjs/src/internal/operators/observeOn.ts", "node_modules/rxjs/src/internal/operators/subscribeOn.ts", "node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "node_modules/rxjs/src/internal/scheduled/scheduled.ts", "node_modules/rxjs/src/internal/observable/from.ts", "node_modules/rxjs/src/internal/observable/of.ts", "node_modules/rxjs/src/internal/observable/throwError.ts", "node_modules/rxjs/src/internal/util/EmptyError.ts", "node_modules/rxjs/src/internal/util/isDate.ts", "node_modules/rxjs/src/internal/operators/map.ts", "node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "node_modules/rxjs/src/internal/util/createObject.ts", "node_modules/rxjs/src/internal/observable/combineLatest.ts", "node_modules/rxjs/src/internal/operators/mergeInternals.ts", "node_modules/rxjs/src/internal/operators/mergeMap.ts", "node_modules/rxjs/src/internal/operators/mergeAll.ts", "node_modules/rxjs/src/internal/operators/concatAll.ts", "node_modules/rxjs/src/internal/observable/concat.ts", "node_modules/rxjs/src/internal/observable/defer.ts", "node_modules/rxjs/src/internal/observable/fromEvent.ts", "node_modules/rxjs/src/internal/observable/fromEventPattern.ts", "node_modules/rxjs/src/internal/observable/timer.ts", "node_modules/rxjs/src/internal/observable/merge.ts", "node_modules/rxjs/src/internal/observable/never.ts", "node_modules/rxjs/src/internal/util/argsOrArgArray.ts", "node_modules/rxjs/src/internal/operators/filter.ts", "node_modules/rxjs/src/internal/observable/zip.ts", "node_modules/rxjs/src/internal/operators/audit.ts", "node_modules/rxjs/src/internal/operators/auditTime.ts", "node_modules/rxjs/src/internal/operators/bufferCount.ts", "node_modules/rxjs/src/internal/operators/catchError.ts", "node_modules/rxjs/src/internal/operators/scanInternals.ts", "node_modules/rxjs/src/internal/operators/combineLatest.ts", "node_modules/rxjs/src/internal/operators/combineLatestWith.ts", "node_modules/rxjs/src/internal/operators/debounce.ts", "node_modules/rxjs/src/internal/operators/debounceTime.ts", "node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts", "node_modules/rxjs/src/internal/operators/take.ts", "node_modules/rxjs/src/internal/operators/ignoreElements.ts", "node_modules/rxjs/src/internal/operators/mapTo.ts", "node_modules/rxjs/src/internal/operators/delayWhen.ts", "node_modules/rxjs/src/internal/operators/delay.ts", "node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts", "node_modules/rxjs/src/internal/operators/throwIfEmpty.ts", "node_modules/rxjs/src/internal/operators/endWith.ts", "node_modules/rxjs/src/internal/operators/finalize.ts", "node_modules/rxjs/src/internal/operators/first.ts", "node_modules/rxjs/src/internal/operators/takeLast.ts", "node_modules/rxjs/src/internal/operators/merge.ts", "node_modules/rxjs/src/internal/operators/mergeWith.ts", "node_modules/rxjs/src/internal/operators/repeat.ts", "node_modules/rxjs/src/internal/operators/scan.ts", "node_modules/rxjs/src/internal/operators/share.ts", "node_modules/rxjs/src/internal/operators/shareReplay.ts", "node_modules/rxjs/src/internal/operators/skip.ts", "node_modules/rxjs/src/internal/operators/skipUntil.ts", "node_modules/rxjs/src/internal/operators/startWith.ts", "node_modules/rxjs/src/internal/operators/switchMap.ts", "node_modules/rxjs/src/internal/operators/takeUntil.ts", "node_modules/rxjs/src/internal/operators/takeWhile.ts", "node_modules/rxjs/src/internal/operators/tap.ts", "node_modules/rxjs/src/internal/operators/throttle.ts", "node_modules/rxjs/src/internal/operators/throttleTime.ts", "node_modules/rxjs/src/internal/operators/withLatestFrom.ts", "node_modules/rxjs/src/internal/operators/zip.ts", "node_modules/rxjs/src/internal/operators/zipWith.ts", "src/templates/assets/javascripts/browser/document/index.ts", "src/templates/assets/javascripts/browser/element/_/index.ts", "src/templates/assets/javascripts/browser/element/focus/index.ts", "src/templates/assets/javascripts/browser/element/hover/index.ts", "src/templates/assets/javascripts/utilities/h/index.ts", "src/templates/assets/javascripts/utilities/round/index.ts", "src/templates/assets/javascripts/browser/script/index.ts", "src/templates/assets/javascripts/browser/element/size/_/index.ts", "src/templates/assets/javascripts/browser/element/size/content/index.ts", "src/templates/assets/javascripts/browser/element/offset/_/index.ts", "src/templates/assets/javascripts/browser/element/offset/content/index.ts", "src/templates/assets/javascripts/browser/element/visibility/index.ts", "src/templates/assets/javascripts/browser/toggle/index.ts", "src/templates/assets/javascripts/browser/keyboard/index.ts", "src/templates/assets/javascripts/browser/location/_/index.ts", "src/templates/assets/javascripts/browser/location/hash/index.ts", "src/templates/assets/javascripts/browser/media/index.ts", "src/templates/assets/javascripts/browser/request/index.ts", "src/templates/assets/javascripts/browser/viewport/offset/index.ts", "src/templates/assets/javascripts/browser/viewport/size/index.ts", "src/templates/assets/javascripts/browser/viewport/_/index.ts", "src/templates/assets/javascripts/browser/viewport/at/index.ts", "src/templates/assets/javascripts/browser/worker/index.ts", "src/templates/assets/javascripts/_/index.ts", "src/templates/assets/javascripts/components/_/index.ts", "src/templates/assets/javascripts/components/announce/index.ts", "src/templates/assets/javascripts/components/consent/index.ts", "src/templates/assets/javascripts/templates/tooltip/index.tsx", "src/templates/assets/javascripts/templates/annotation/index.tsx", "src/templates/assets/javascripts/templates/clipboard/index.tsx", "src/templates/assets/javascripts/templates/search/index.tsx", "src/templates/assets/javascripts/templates/source/index.tsx", "src/templates/assets/javascripts/templates/tabbed/index.tsx", "src/templates/assets/javascripts/templates/table/index.tsx", "src/templates/assets/javascripts/templates/version/index.tsx", "src/templates/assets/javascripts/components/tooltip2/index.ts", "src/templates/assets/javascripts/components/content/annotation/_/index.ts", "src/templates/assets/javascripts/components/content/annotation/list/index.ts", "src/templates/assets/javascripts/components/content/annotation/block/index.ts", "src/templates/assets/javascripts/components/content/code/_/index.ts", "src/templates/assets/javascripts/components/content/details/index.ts", "src/templates/assets/javascripts/components/content/mermaid/index.css", "src/templates/assets/javascripts/components/content/mermaid/index.ts", "src/templates/assets/javascripts/components/content/table/index.ts", "src/templates/assets/javascripts/components/content/tabs/index.ts", "src/templates/assets/javascripts/components/content/_/index.ts", "src/templates/assets/javascripts/components/dialog/index.ts", "src/templates/assets/javascripts/components/tooltip/index.ts", "src/templates/assets/javascripts/components/header/_/index.ts", "src/templates/assets/javascripts/components/header/title/index.ts", "src/templates/assets/javascripts/components/main/index.ts", "src/templates/assets/javascripts/components/palette/index.ts", "src/templates/assets/javascripts/components/progress/index.ts", "src/templates/assets/javascripts/integrations/clipboard/index.ts", "src/templates/assets/javascripts/integrations/sitemap/index.ts", "src/templates/assets/javascripts/integrations/instant/index.ts", "src/templates/assets/javascripts/integrations/search/highlighter/index.ts", "src/templates/assets/javascripts/integrations/search/worker/message/index.ts", "src/templates/assets/javascripts/integrations/search/worker/_/index.ts", "src/templates/assets/javascripts/integrations/version/findurl/index.ts", "src/templates/assets/javascripts/integrations/version/index.ts", "src/templates/assets/javascripts/components/search/query/index.ts", "src/templates/assets/javascripts/components/search/result/index.ts", "src/templates/assets/javascripts/components/search/share/index.ts", "src/templates/assets/javascripts/components/search/suggest/index.ts", "src/templates/assets/javascripts/components/search/_/index.ts", "src/templates/assets/javascripts/components/search/highlight/index.ts", "src/templates/assets/javascripts/components/sidebar/index.ts", "src/templates/assets/javascripts/components/source/facts/github/index.ts", "src/templates/assets/javascripts/components/source/facts/gitlab/index.ts", "src/templates/assets/javascripts/components/source/facts/_/index.ts", "src/templates/assets/javascripts/components/source/_/index.ts", "src/templates/assets/javascripts/components/tabs/index.ts", "src/templates/assets/javascripts/components/toc/index.ts", "src/templates/assets/javascripts/components/top/index.ts", "src/templates/assets/javascripts/patches/ellipsis/index.ts", "src/templates/assets/javascripts/patches/indeterminate/index.ts", "src/templates/assets/javascripts/patches/scrollfix/index.ts", "src/templates/assets/javascripts/patches/scrolllock/index.ts", "src/templates/assets/javascripts/polyfills/index.ts"], + "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (factory());\n}(this, (function () { 'use strict';\n\n /**\n * Applies the :focus-visible polyfill at the given scope.\n * A scope in this case is either the top-level Document or a Shadow Root.\n *\n * @param {(Document|ShadowRoot)} scope\n * @see https://github.com/WICG/focus-visible\n */\n function applyFocusVisiblePolyfill(scope) {\n var hadKeyboardEvent = true;\n var hadFocusVisibleRecently = false;\n var hadFocusVisibleRecentlyTimeout = null;\n\n var inputTypesAllowlist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n };\n\n /**\n * Helper function for legacy browsers and iframes which sometimes focus\n * elements like document, body, and non-interactive SVG.\n * @param {Element} el\n */\n function isValidFocusTarget(el) {\n if (\n el &&\n el !== document &&\n el.nodeName !== 'HTML' &&\n el.nodeName !== 'BODY' &&\n 'classList' in el &&\n 'contains' in el.classList\n ) {\n return true;\n }\n return false;\n }\n\n /**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} el\n * @return {boolean}\n */\n function focusTriggersKeyboardModality(el) {\n var type = el.type;\n var tagName = el.tagName;\n\n if (tagName === 'INPUT' && inputTypesAllowlist[type] && !el.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !el.readOnly) {\n return true;\n }\n\n if (el.isContentEditable) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Add the `focus-visible` class to the given element if it was not added by\n * the author.\n * @param {Element} el\n */\n function addFocusVisibleClass(el) {\n if (el.classList.contains('focus-visible')) {\n return;\n }\n el.classList.add('focus-visible');\n el.setAttribute('data-focus-visible-added', '');\n }\n\n /**\n * Remove the `focus-visible` class from the given element if it was not\n * originally added by the author.\n * @param {Element} el\n */\n function removeFocusVisibleClass(el) {\n if (!el.hasAttribute('data-focus-visible-added')) {\n return;\n }\n el.classList.remove('focus-visible');\n el.removeAttribute('data-focus-visible-added');\n }\n\n /**\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n * @param {KeyboardEvent} e\n */\n function onKeyDown(e) {\n if (e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n\n if (isValidFocusTarget(scope.activeElement)) {\n addFocusVisibleClass(scope.activeElement);\n }\n\n hadKeyboardEvent = true;\n }\n\n /**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n * @param {Event} e\n */\n function onPointerDown(e) {\n hadKeyboardEvent = false;\n }\n\n /**\n * On `focus`, add the `focus-visible` class to the target if:\n * - the target received focus as a result of keyboard navigation, or\n * - the event target is an element that will likely require interaction\n * via the keyboard (e.g. a text box)\n * @param {Event} e\n */\n function onFocus(e) {\n // Prevent IE from focusing the document or HTML element.\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {\n addFocusVisibleClass(e.target);\n }\n }\n\n /**\n * On `blur`, remove the `focus-visible` class from the target.\n * @param {Event} e\n */\n function onBlur(e) {\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (\n e.target.classList.contains('focus-visible') ||\n e.target.hasAttribute('data-focus-visible-added')\n ) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {\n hadFocusVisibleRecently = false;\n }, 100);\n removeFocusVisibleClass(e.target);\n }\n }\n\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had .focus-visible.\n * @param {Event} e\n */\n function onVisibilityChange(e) {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n addInitialPointerMoveListeners();\n }\n }\n\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n * @param {Event} e\n */\n function onInitialPointerMove(e) {\n // Work around a Safari quirk that fires a mousemove on whenever the\n // window blurs, even if you're tabbing out of the page. \u00AF\\_(\u30C4)_/\u00AF\n if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {\n return;\n }\n\n hadKeyboardEvent = false;\n removeInitialPointerMoveListeners();\n }\n\n // For some kinds of state, we are interested in changes at the global scope\n // only. For example, global pointer input, global key presses and global\n // visibility change should affect the state at every scope:\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n\n addInitialPointerMoveListeners();\n\n // For focus and blur, we specifically care about state changes in the local\n // scope. This is because focus / blur events that originate from within a\n // shadow root are not re-dispatched from the host element if it was already\n // the active element in its own scope:\n scope.addEventListener('focus', onFocus, true);\n scope.addEventListener('blur', onBlur, true);\n\n // We detect that a node is a ShadowRoot by ensuring that it is a\n // DocumentFragment and also has a host property. This check covers native\n // implementation and polyfill implementation transparently. If we only cared\n // about the native implementation, we could just check if the scope was\n // an instance of a ShadowRoot.\n if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) {\n // Since a ShadowRoot is a special kind of DocumentFragment, it does not\n // have a root element to add a class to. So, we add this attribute to the\n // host element instead:\n scope.host.setAttribute('data-js-focus-visible', '');\n } else if (scope.nodeType === Node.DOCUMENT_NODE) {\n document.documentElement.classList.add('js-focus-visible');\n document.documentElement.setAttribute('data-js-focus-visible', '');\n }\n }\n\n // It is important to wrap all references to global window and document in\n // these checks to support server-side rendering use cases\n // @see https://github.com/WICG/focus-visible/issues/199\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n // Make the polyfill helper globally available. This can be used as a signal\n // to interested libraries that wish to coordinate with the polyfill for e.g.,\n // applying the polyfill to a shadow root:\n window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill;\n\n // Notify interested libraries of the polyfill's presence, in case the\n // polyfill was loaded lazily:\n var event;\n\n try {\n event = new CustomEvent('focus-visible-polyfill-ready');\n } catch (error) {\n // IE11 does not support using CustomEvent as a constructor directly:\n event = document.createEvent('CustomEvent');\n event.initCustomEvent('focus-visible-polyfill-ready', false, false, {});\n }\n\n window.dispatchEvent(event);\n }\n\n if (typeof document !== 'undefined') {\n // Apply the polyfill to the global document, so that no JavaScript\n // coordination is required to use the polyfill in the top-level document:\n applyFocusVisiblePolyfill(document);\n }\n\n})));\n", "/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n", "/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});", "/*\n * Copyright (c) 2016-2024 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport \"focus-visible\"\n\nimport {\n EMPTY,\n NEVER,\n Observable,\n Subject,\n defer,\n delay,\n filter,\n map,\n merge,\n mergeWith,\n shareReplay,\n switchMap\n} from \"rxjs\"\n\nimport { configuration, feature } from \"./_\"\nimport {\n at,\n getActiveElement,\n getOptionalElement,\n requestJSON,\n setLocation,\n setToggle,\n watchDocument,\n watchKeyboard,\n watchLocation,\n watchLocationTarget,\n watchMedia,\n watchPrint,\n watchScript,\n watchViewport\n} from \"./browser\"\nimport {\n getComponentElement,\n getComponentElements,\n mountAnnounce,\n mountBackToTop,\n mountConsent,\n mountContent,\n mountDialog,\n mountHeader,\n mountHeaderTitle,\n mountPalette,\n mountProgress,\n mountSearch,\n mountSearchHiglight,\n mountSidebar,\n mountSource,\n mountTableOfContents,\n mountTabs,\n watchHeader,\n watchMain\n} from \"./components\"\nimport {\n SearchIndex,\n setupClipboardJS,\n setupInstantNavigation,\n setupVersionSelector\n} from \"./integrations\"\nimport {\n patchEllipsis,\n patchIndeterminate,\n patchScrollfix,\n patchScrolllock\n} from \"./patches\"\nimport \"./polyfills\"\n\n/* ----------------------------------------------------------------------------\n * Functions - @todo refactor\n * ------------------------------------------------------------------------- */\n\n/**\n * Fetch search index\n *\n * @returns Search index observable\n */\nfunction fetchSearchIndex(): Observable {\n if (location.protocol === \"file:\") {\n return watchScript(\n `${new URL(\"search/search_index.js\", config.base)}`\n )\n .pipe(\n // @ts-ignore - @todo fix typings\n map(() => __index),\n shareReplay(1)\n )\n } else {\n return requestJSON(\n new URL(\"search/search_index.json\", config.base)\n )\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Application\n * ------------------------------------------------------------------------- */\n\n/* Yay, JavaScript is available */\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\n/* Set up navigation observables and subjects */\nconst document$ = watchDocument()\nconst location$ = watchLocation()\nconst target$ = watchLocationTarget(location$)\nconst keyboard$ = watchKeyboard()\n\n/* Set up media observables */\nconst viewport$ = watchViewport()\nconst tablet$ = watchMedia(\"(min-width: 960px)\")\nconst screen$ = watchMedia(\"(min-width: 1220px)\")\nconst print$ = watchPrint()\n\n/* Retrieve search index, if search is enabled */\nconst config = configuration()\nconst index$ = document.forms.namedItem(\"search\")\n ? fetchSearchIndex()\n : NEVER\n\n/* Set up Clipboard.js integration */\nconst alert$ = new Subject()\nsetupClipboardJS({ alert$ })\n\n/* Set up progress indicator */\nconst progress$ = new Subject()\n\n/* Set up instant navigation, if enabled */\nif (feature(\"navigation.instant\"))\n setupInstantNavigation({ location$, viewport$, progress$ })\n .subscribe(document$)\n\n/* Set up version selector */\nif (config.version?.provider === \"mike\")\n setupVersionSelector({ document$ })\n\n/* Always close drawer and search on navigation */\nmerge(location$, target$)\n .pipe(\n delay(125)\n )\n .subscribe(() => {\n setToggle(\"drawer\", false)\n setToggle(\"search\", false)\n })\n\n/* Set up global keyboard handlers */\nkeyboard$\n .pipe(\n filter(({ mode }) => mode === \"global\")\n )\n .subscribe(key => {\n switch (key.type) {\n\n /* Go to previous page */\n case \"p\":\n case \",\":\n const prev = getOptionalElement(\"link[rel=prev]\")\n if (typeof prev !== \"undefined\")\n setLocation(prev)\n break\n\n /* Go to next page */\n case \"n\":\n case \".\":\n const next = getOptionalElement(\"link[rel=next]\")\n if (typeof next !== \"undefined\")\n setLocation(next)\n break\n\n /* Expand navigation, see https://bit.ly/3ZjG5io */\n case \"Enter\":\n const active = getActiveElement()\n if (active instanceof HTMLLabelElement)\n active.click()\n }\n })\n\n/* Set up patches */\npatchEllipsis({ viewport$, document$ })\npatchIndeterminate({ document$, tablet$ })\npatchScrollfix({ document$ })\npatchScrolllock({ viewport$, tablet$ })\n\n/* Set up header and main area observable */\nconst header$ = watchHeader(getComponentElement(\"header\"), { viewport$ })\nconst main$ = document$\n .pipe(\n map(() => getComponentElement(\"main\")),\n switchMap(el => watchMain(el, { viewport$, header$ })),\n shareReplay(1)\n )\n\n/* Set up control component observables */\nconst control$ = merge(\n\n /* Consent */\n ...getComponentElements(\"consent\")\n .map(el => mountConsent(el, { target$ })),\n\n /* Dialog */\n ...getComponentElements(\"dialog\")\n .map(el => mountDialog(el, { alert$ })),\n\n /* Header */\n ...getComponentElements(\"header\")\n .map(el => mountHeader(el, { viewport$, header$, main$ })),\n\n /* Color palette */\n ...getComponentElements(\"palette\")\n .map(el => mountPalette(el)),\n\n /* Progress bar */\n ...getComponentElements(\"progress\")\n .map(el => mountProgress(el, { progress$ })),\n\n /* Search */\n ...getComponentElements(\"search\")\n .map(el => mountSearch(el, { index$, keyboard$ })),\n\n /* Repository information */\n ...getComponentElements(\"source\")\n .map(el => mountSource(el))\n)\n\n/* Set up content component observables */\nconst content$ = defer(() => merge(\n\n /* Announcement bar */\n ...getComponentElements(\"announce\")\n .map(el => mountAnnounce(el)),\n\n /* Content */\n ...getComponentElements(\"content\")\n .map(el => mountContent(el, { viewport$, target$, print$ })),\n\n /* Search highlighting */\n ...getComponentElements(\"content\")\n .map(el => feature(\"search.highlight\")\n ? mountSearchHiglight(el, { index$, location$ })\n : EMPTY\n ),\n\n /* Header title */\n ...getComponentElements(\"header-title\")\n .map(el => mountHeaderTitle(el, { viewport$, header$ })),\n\n /* Sidebar */\n ...getComponentElements(\"sidebar\")\n .map(el => el.getAttribute(\"data-md-type\") === \"navigation\"\n ? at(screen$, () => mountSidebar(el, { viewport$, header$, main$ }))\n : at(tablet$, () => mountSidebar(el, { viewport$, header$, main$ }))\n ),\n\n /* Navigation tabs */\n ...getComponentElements(\"tabs\")\n .map(el => mountTabs(el, { viewport$, header$ })),\n\n /* Table of contents */\n ...getComponentElements(\"toc\")\n .map(el => mountTableOfContents(el, {\n viewport$, header$, main$, target$\n })),\n\n /* Back-to-top button */\n ...getComponentElements(\"top\")\n .map(el => mountBackToTop(el, { viewport$, header$, main$, target$ }))\n))\n\n/* Set up component observables */\nconst component$ = document$\n .pipe(\n switchMap(() => content$),\n mergeWith(control$),\n shareReplay(1)\n )\n\n/* Subscribe to all components */\ncomponent$.subscribe()\n\n/* ----------------------------------------------------------------------------\n * Exports\n * ------------------------------------------------------------------------- */\n\nwindow.document$ = document$ /* Document observable */\nwindow.location$ = location$ /* Location subject */\nwindow.target$ = target$ /* Location target observable */\nwindow.keyboard$ = keyboard$ /* Keyboard observable */\nwindow.viewport$ = viewport$ /* Viewport observable */\nwindow.tablet$ = tablet$ /* Media tablet observable */\nwindow.screen$ = screen$ /* Media screen observable */\nwindow.print$ = print$ /* Media print observable */\nwindow.alert$ = alert$ /* Alert subject */\nwindow.progress$ = progress$ /* Progress indicator subject */\nwindow.component$ = component$ /* Component observable */\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n /** @nocollapse */\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n next(value?: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new observable\n * @nocollapse\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param operator the operator defining the operation to take on the observable\n * @return a new observable with the Operator applied\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {Subscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next a handler for each value emitted by the observable\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @method toPromise\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n onFinalize?: () => void\n): Subscriber {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture necessary state from the operator function itself.\n */\nexport class OperatorSubscriber extends Subscriber {\n /**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional finalization logic here. This will only be called on finalization if the\n * subscriber itself is not already closed. This is called after all other finalization logic is executed.\n * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe.\n * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription\n * to the resulting observable does not actually disconnect from the source if there are active subscriptions\n * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!)\n */\n constructor(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n private onFinalize?: () => void,\n private shouldUnsubscribe?: () => boolean\n ) {\n // It's important - for performance reasons - that all of this class's\n // members are initialized and that they are always initialized in the same\n // order. This will ensure that all OperatorSubscriber instances have the\n // same hidden class in V8. This, in turn, will help keep the number of\n // hidden classes involved in property accesses within the base class as\n // low as possible. If the number of hidden classes involved exceeds four,\n // the property accesses will become megamorphic and performance penalties\n // will be incurred - i.e. inline caches won't be used.\n //\n // The reasons for ensuring all instances have the same hidden class are\n // further discussed in this blog post from Benedikt Meurer:\n // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/\n super(destination);\n this._next = onNext\n ? function (this: OperatorSubscriber, value: T) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (this: OperatorSubscriber, err: any) {\n try {\n onError(err);\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function (this: OperatorSubscriber) {\n try {\n onComplete();\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n\n unsubscribe() {\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n // Execute additional teardown if we have any and we didn't already do so.\n !closed && this.onFinalize?.();\n }\n }\n}\n", "import { Subscription } from '../Subscription';\n\ninterface AnimationFrameProvider {\n schedule(callback: FrameRequestCallback): Subscription;\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n delegate:\n | {\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n }\n | undefined;\n}\n\nexport const animationFrameProvider: AnimationFrameProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n // Clear the cancel function. The request has been fulfilled, so\n // attempting to cancel the request upon unsubscription would be\n // pointless.\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel?.(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n", "import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject extends Observable implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @nocollapse\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => {\n return new AnonymousSubject(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift(operator: Operator): Observable {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return {Observable} Observable that the Subject casts to\n */\n asObservable(): Observable {\n const observable: any = new Observable();\n observable.source = this;\n return observable;\n }\n}\n\n/**\n * @class AnonymousSubject\n */\nexport class AnonymousSubject extends Subject {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer,\n source?: Observable\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n", "import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n *\n * @class BehaviorSubject\n */\nexport class BehaviorSubject extends Subject {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n return this.getValue();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n\n getValue(): T {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n", "import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject extends Subject {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param bufferSize The size of the buffer to replay on subscription\n * @param windowTime The amount of time the buffered items will stay buffered\n * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action\n */\nexport class Action extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n", "import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction extends Action {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n", "import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return {number} A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\n/**\n *\n * Async Scheduler\n *\n * Schedule task as if you used setTimeout(task, duration)\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asapScheduler} scheduler.\n *\n * ## Examples\n * Use async scheduler to delay task\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * const task = () => console.log('it works!');\n *\n * asyncScheduler.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n * ```\n *\n * Use async scheduler to repeat task in intervals\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * asyncScheduler.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n * ```\n */\n\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\n\n/**\n * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.\n */\nexport const async = asyncScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { QueueScheduler } from './QueueScheduler';\nimport { SchedulerAction } from '../types';\nimport { TimerHandle } from './timerHandle';\n\nexport class QueueAction extends AsyncAction {\n constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n\n public execute(state: T, delay: number): any {\n return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay);\n }\n\n protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n\n // Otherwise flush the scheduler starting with this action.\n scheduler.flush(this);\n\n // HACK: In the past, this was returning `void`. However, `void` isn't a valid\n // `TimerHandle`, and generally the return value here isn't really used. So the\n // compromise is to return `0` which is both \"falsy\" and a valid `TimerHandle`,\n // as opposed to refactoring every other instanceo of `requestAsyncId`.\n return 0;\n }\n}\n", "import { AsyncScheduler } from './AsyncScheduler';\n\nexport class QueueScheduler extends AsyncScheduler {\n}\n", "import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\n\n/**\n *\n * Queue Scheduler\n *\n * Put every next task on a queue, instead of executing it immediately\n *\n * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.\n *\n * When used without delay, it schedules given task synchronously - executes it right when\n * it is scheduled. However when called recursively, that is when inside the scheduled task,\n * another task is scheduled with queue scheduler, instead of executing immediately as well,\n * that task will be put on a queue and wait for current one to finish.\n *\n * This means that when you execute task with `queue` scheduler, you are sure it will end\n * before any other task scheduled with that scheduler will start.\n *\n * ## Examples\n * Schedule recursively first, then do something\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(() => {\n * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue\n *\n * console.log('first');\n * });\n *\n * // Logs:\n * // \"first\"\n * // \"second\"\n * ```\n *\n * Reschedule itself recursively\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(function(state) {\n * if (state !== 0) {\n * console.log('before', state);\n * this.schedule(state - 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * console.log('after', state);\n * }\n * }, 0, 3);\n *\n * // In scheduler that runs recursively, you would expect:\n * // \"before\", 3\n * // \"before\", 2\n * // \"before\", 1\n * // \"after\", 1\n * // \"after\", 2\n * // \"after\", 3\n *\n * // But with queue it logs:\n * // \"before\", 3\n * // \"after\", 3\n * // \"before\", 2\n * // \"after\", 2\n * // \"before\", 1\n * // \"after\", 1\n * ```\n */\n\nexport const queueScheduler = new QueueScheduler(QueueAction);\n\n/**\n * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.\n */\nexport const queue = queueScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nimport { SchedulerAction } from '../types';\nimport { animationFrameProvider } from './animationFrameProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AnimationFrameAction extends AsyncAction {\n constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n\n protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested animation frame and set the scheduled flag to\n // undefined so the next AnimationFrameAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n animationFrameProvider.cancelAnimationFrame(id as number);\n scheduler._scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AnimationFrameScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n\n/**\n *\n * Animation Frame Scheduler\n *\n * Perform task when `window.requestAnimationFrame` would fire\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * ## Example\n * Schedule div height animation\n * ```ts\n * // html:
\n * import { animationFrameScheduler } from 'rxjs';\n *\n * const div = document.querySelector('div');\n *\n * animationFrameScheduler.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see a div element growing in height\n * ```\n */\n\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\n\n/**\n * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.\n */\nexport const animationFrame = animationFrameScheduler;\n", "import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * Just emits 'complete', and nothing else.\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n", "export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');", "import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike {\n return isFunction(value?.then);\n}\n", "import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable {\n return isFunction(input[Symbol_observable]);\n}\n", "import { isFunction } from './isFunction';\n\nexport function isAsyncIterable(obj: any): obj is AsyncIterable {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n", "/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n", "export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n", "import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable {\n return isFunction(input?.[Symbol_iterator]);\n}\n", "import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an