plugin/enclosure/outputs API Only Returns Regular Outputs #403
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
The plugin/enclosure/outputs API only returns outputs of type "regular".
To Reproduce

With only "non-regular" outputs,
http://octopi/plugin/enclosure/outputscurrently yields,
[]Note that I can successfully access a specific regular output,
http://octopi/plugin/enclosure/outputs/1which yields,
{"active_low": true, "alarm_set_temp": 0, "auto_shutdown": false, "auto_startup": false, "controlled_io": null, "controlled_io_set_value": "low", "default_duty_cycle": 0, "default_ledstrip_color": "", "default_neopixel_color": "", "duty_a": 0, "duty_b": 0, "duty_cycle": 0, "gcode": "", "gpio_pin": "12", "gpio_status": true, "hide_btn_ui": false, "index_id": 1, "label": "Dryer 1", "ledstrip_color": "rgb(0,0,0)", "ledstrip_gpio_clk": "", "ledstrip_gpio_dat": "", "linked_temp_sensor": 2, "microcontroller_address": 0, "neopixel_brightness": 255, "neopixel_color": "rgb(0,0,0)", "neopixel_count": 0, "new_duty_cycle": "", "new_ledstrip_color": "", "new_neopixel_color": "", "output_type": "temp_hum_control", "pwm_frequency": 50, "pwm_status": 50, "pwm_temperature_linked": false, "shell_script": "", "show_on_navbar": true, "shutdown_on_failed": false, "shutdown_time": 0, "startup_time": 0, "startup_with_server": false, "temp_ctr_deadband": 0, "temp_ctr_default_value": 0, "temp_ctr_max_temp": "30", "temp_ctr_new_set_value": "", "temp_ctr_set_value": 0, "temp_ctr_type": "heater", "temperature_a": 0, "temperature_b": 0, "toggle_timer": false, "toggle_timer_off": 0, "toggle_timer_on": 0, "current_value": false}Expected behavior
After removing the check for output_type = "regular"
http://octopi/plugin/enclosure/outputsyields,
[{"index_id": 1, "label": "Dryer 1", "GPIO_Pin": 12, "State": " OFF "}]Additional context
I am attempting to programmatically identify all of the Temperature / Humidity Control outputs and the corresponding temperature sensor (linked_temp_sensor) and maximum temperature (temp_ctr_max_temp). Using the linked_temp_sensor, I can access the corresponding actual temperature and humidity using,
http://octopi/plugin/enclosure/inputs/2allowing me to display the entire state of the "enclosures" (which may include one or more filament dryers) including target and actual temperature and humidity,