The value 'z:P2.7' is not valid for PIN"

Good Evening!
I´m new to klipper but I do love it already! I installed Klipper on a Raspberry Pi4 with Voron 2.4 Hardware.
Now I have the following Question:

I want to switch ON and OFF manually my exhaust fan via the LCD menu.
The section in printer.cfg is:

[heater_fan exhaust_fan]
##	Exhaust fan - Z board, HE0 Connector
pin: z:P2.7
max_power: 1.0
shutdown_speed: 0.0
kick_start_time: 5.0
heater: heater_bed
heater_temp: 60
fan_speed: 1.0

The menu.cfg part is:

[menu __main __controlfans __exfanonoff]    
type: input
enable: {'heater_fan exhaust_fan' in printer}
name: Exhaust:   {'ON ' if menu.input else 'OFF'}
input: {printer['heater_fan exhaust_fan'].speed}
input_min: 0
input_max: 1
input_step: 1
gcode:
    SET_PIN PIN=z:P2.7 VALUE={1 if menu.input else 0}

The exhaust fan works temperature dependent, but the manual switch over the lcd menu does not work.
Pressing the associated menu entry I get the following error:
“Printer reported a serious error: !! The value ‘z:P2.7’ is not valid for PIN”

How can I switch the fan manually ON and maintain the temperature dependend funtionallity depending on heater: heated bed?
Regards
repman

Please post your Klipper log to see the entire config and error message. Somewhere you need to define z

Sorry, I missed the log-File:
klippy.log (72.9 KB)

Thanks for your help!

Hmm, no idea.

Try defining a separate pin, like (Configuration reference - Klipper documentation):

[output_pin myFan]
pin: z:P2.7

and reference this in your SET_PIN

Infortunately not!

Printer has reported a serious error:!! pin P2.7 used multiple times in config

So the pin is already defined in

[heater_fan exhaust_fan]

How do I access it in my menu.cfg?
Regards

[output_pin myFan]
pin: z:P2.7

Try putting this first and use it in all subsequent instances like [heater_fan exhaust_fan] and your menu.cfg.
No guarantee tho, since I never tried.

Thanks for your advice and excuse my lack of knowledge.
I defined now:

[output_pin exFan]
pin: z:P2.7
pwm: true
shutdown_value: 0
value: 1
cycle_time: 0.01

How to I use that now in the heater_fan section:

[heater_fan exhaust_fan]
##	Exhaust fan - Z board, HE0 Connector
pin: ?????
max_power: 1.0
shutdown_speed: 0.0
kick_start_time: 5.0
heater: heater_bed
heater_temp: 60
fan_speed: 1.0
[heater_fan exhaust_fan]
pin: exFan

doesn’t work?

Unfortunately not:

`Printer has reported a serious error: !! Pin 'exFan' ist not a valid name on mcu 'mcu'`

Sorry, then I’m out of ideas for now.

Nevertheless thanks for your time!
If I will find a solution I come back und write it here.
Regards
repman

Last idea:
Instead of SET_PIN PIN in your menu.cfg, try SET_FAN_SPEED. Ref: G-Codes - Klipper documentation