mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Updated configuration examples to match changes of the component (#6239)
* Updated configuration examples to match changes of the component * Adding port configuration documentation * Updated octoprint documentation to reflect components changes * configuration variable type tweak * added more keys descriptions * typo fix * Documentation tweaks after feedback
This commit is contained in:
parent
4e69548db7
commit
e401e101fe
@ -13,26 +13,8 @@ ha_release: 0.19
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
|
||||
The `octoprint` binary sensor platform let you monitor if your 3D printer is printing or if there was a printing error.
|
||||
The `octoprint` sensor platform let you monitor various states of your 3D printer and its print jobs.
|
||||
|
||||
<p class='note'>
|
||||
You must have the [OctoPrint component](/components/octoprint/) configured to use this sensor.
|
||||
You must have the [OctoPrint component](/components/octoprint/) configured to use this binary sensor. After configuring that component, binary sensors automatically appear.
|
||||
</p>
|
||||
|
||||
To set it up, add the following information to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: octoprint
|
||||
monitored_conditions:
|
||||
- Printing
|
||||
- Printing Error
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **monitored_conditions** array (*Required*): States to monitor.
|
||||
- **Printing**: State of the printer.
|
||||
- **Printing Error**: Error while printing.
|
||||
- **name** (*Optional*): The name of the sensor. Default is 'OctoPrint'.
|
||||
|
@ -14,25 +14,113 @@ ha_release: 0.19
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
[OctoPrint](http://octoprint.org/) is a web interface for your 3D printer. This is the main component to integrate OctoPrint sensors, you will have to setup sensors and binary sensors separately.
|
||||
[OctoPrint](http://octoprint.org/) is a web interface for your 3D printer. This is the main component to integrate OctoPrint sensors.
|
||||
|
||||
## {% linkable_title Base Configuration %}
|
||||
|
||||
To get started with the OctoPrint API, please follow the directions on their [site](http://docs.octoprint.org/en/master/api/general.html). Once OctoPrint is configured you will need to add your API key and host to your `configuration.yaml`.
|
||||
|
||||
|
||||
```yaml
|
||||
octoprint:
|
||||
host: YOUR_OCTOPRINT_HOST
|
||||
api_key: YOUR_API_KEY
|
||||
bed: false
|
||||
number_of_tools: 1
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
{% configuration %}
|
||||
octoprint:
|
||||
type: list
|
||||
required: true
|
||||
keys:
|
||||
host:
|
||||
description: IP address or hostname of Octoprint host.
|
||||
required: true
|
||||
type: string
|
||||
api_key:
|
||||
description: The retrieved api key.
|
||||
required: true
|
||||
type: string
|
||||
name:
|
||||
description: The name for this printer, must be unique if multiple printers are defined.
|
||||
required: false
|
||||
type: string
|
||||
default: 'OctoPrint'
|
||||
port:
|
||||
description: The port of the Octoprint server.
|
||||
required: false
|
||||
type: integer
|
||||
default: 80
|
||||
ssl:
|
||||
description: Enable or disable SSL
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
bed:
|
||||
description: If the printer has a heated bed.
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
number_of_tools:
|
||||
description: Number of temperature adjustable tools. i.e. nozzle.
|
||||
required: false
|
||||
type: integer
|
||||
default: 1
|
||||
sensors:
|
||||
description: Configuration for the sensors
|
||||
required: false
|
||||
type: map
|
||||
keys:
|
||||
monitored_conditions:
|
||||
description: The sensors to activate
|
||||
type: list
|
||||
default: all (`Current State`, `Temperatures`, `Job Percentage`, `Time Elapsed`, `Time Remaining`)
|
||||
keys:
|
||||
"Current State":
|
||||
description: Text of current state.
|
||||
"Temperatures":
|
||||
description: Temperatures of all available tools, eg. `print`, `head`, `print bed`, etc. These will be displayed as `tool0`, `tool1`, or `toolN` please refer to your OctoPrint frontend to associate the tool number with an actual device.
|
||||
"Job Percentage":
|
||||
description: Percentage of the job.
|
||||
"Time Elapsed":
|
||||
description: Time elapsed on current print job, in seconds.
|
||||
"Time Remaining":
|
||||
description: Time remaining on current print job, in seconds.
|
||||
binary_sensors:
|
||||
description: Configuration for the binary sensors
|
||||
required: false
|
||||
type: map
|
||||
keys:
|
||||
monitored_conditions:
|
||||
description: The sensors to activate
|
||||
type: list
|
||||
default: all (`Printing`, `Printing Error`)
|
||||
keys:
|
||||
"Printing":
|
||||
description: State of the printer.
|
||||
"Printing Error":
|
||||
description: Error while printing.
|
||||
{% endconfiguration %}
|
||||
|
||||
- **host** (*Required*): IP address or hostname of Octoprint host.
|
||||
- **api_key** (*Required*): The retrieved api key.
|
||||
- **bed** (*Optional*): If the printer has a heated bed.
|
||||
- **number_of_tools** (*Optional*): Number of temperature adjustable tools. i.e. nozzle.
|
||||
<p class='note'>
|
||||
If you are tracking temperature it is recommended to set `bed` and/or `number_of_tools` in your octoprint configuration. This will allow the octoprint sensors to load if the printer is offline during Home Assistant startup.
|
||||
</p>
|
||||
|
||||
Example with multiple printers:
|
||||
|
||||
```yaml
|
||||
octoprint:
|
||||
- host: YOUR_OCTOPRINT_HOST
|
||||
api_key: YOUR_API_KEY
|
||||
name: PRINTER_NAME_1
|
||||
number_of_tools: 2
|
||||
sensors:
|
||||
monitored_conditions:
|
||||
- 'Current State'
|
||||
- 'Job Percentage'
|
||||
- host: YOUR_OCTOPRINT_HOST
|
||||
api_key: YOUR_API_KEY
|
||||
name: PRINTER_NAME_2
|
||||
number_of_tools: 1
|
||||
```
|
||||
|
||||
If the OctoPrint host is equipped with a web camera it is possible to add this as well.
|
||||
|
||||
|
@ -17,34 +17,5 @@ ha_iot_class: "Local Polling"
|
||||
The `octoprint` sensor platform let you monitor various states of your 3D printer and its print jobs.
|
||||
|
||||
<p class='note'>
|
||||
You must have the [OctoPrint component](/components/octoprint/) configured to use this sensor.
|
||||
</p>
|
||||
|
||||
To set it up, add the following information to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: octoprint
|
||||
name: OctoPrint
|
||||
monitored_conditions:
|
||||
- Current State
|
||||
- Temperatures
|
||||
- Job Percentage
|
||||
- Time Elapsed
|
||||
- Time Remaining
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): The name of the sensor. Default is 'OctoPrint'.
|
||||
- **monitored_conditions** array (*Required*): States to monitor.
|
||||
- **Current State**: Text of current state.
|
||||
- **Temperatures**: Temperatures of all available tools, eg. `print`, `head`, `print bed`, etc. These will be displayed as `tool0`, `tool1`, or `toolN` please refer to your OctoPrint frontend to associate the tool number with an actual device.
|
||||
- **Job Percentage**: Percentage of the job.
|
||||
- **Time Elapsed**: Time elapsed on current print job, in seconds.
|
||||
- **Time Remaining**: Time remaining on current print job, in seconds.
|
||||
|
||||
<p class='note'>
|
||||
If you are tracking temperature it is recommended to set `bed` and/or `number_of_tools` in your octoprint configuration. This will allow the octoprint sensors to load if the printer is offline during Home Assistant startup.
|
||||
You must have the [OctoPrint component](/components/octoprint/) configured to use this sensor. After configuring that component, sensors automatically appear.
|
||||
</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user