Automation Hat Mini relay not working

I am trying to get my Automation Hat Mini to work and have installed all of the software. I can run the example scripts for the inputs, outputs and analog ionuts and these all seem to work. There wasn’t an example for the relay for the mini so created my own couple of versions to try and get the relay to work, but it doesn’t seem to be switching. Any suggestions?

Test 1
import time

import automationhat

while True:
automationhat.relay.on()
print(“Relay on”)
time.sleep(1)
automationhat.relay.off()
print(“Relay off”)
time.sleep(1)

Test 2

import time

import automationhat

while True:
automationhat.relay.on()
print(“Relay on”)
time.sleep(1)
automationhat.relay.off()
print(“Relay off”)
time.sleep(1)

Try automationhat.relay.one.on() or automationhat.relay.toggle()
automation-hat/REFERENCE.md at master · pimoroni/automation-hat · GitHub

Tried this

import time

import automationhat

while True:
    automationhat.relay.one.toggle()
    print("Relay on")
    time.sleep(1)
    automationhat.relay.one.toggle()
    print("Relay off")
    time.sleep(1)

and also this

import time

import automationhat

while True:
    automationhat.relay.one.on()
    print("Relay on")
    time.sleep(1)
    automationhat.relay.one.off()
    print("Relay off")
    time.sleep(1)

But still no luck, any other suggestions?

GPIO 16 is the relay pin, you could try setting it high or low?
Automation HAT Mini at Raspberry Pi GPIO Pinout

Thanks for that, I’ve tried running it just by turning that pin on and still no luck. I tested it by putting an LED on the output to make sure it was working and the LED would turn on and off. This was the code I used, just to double check I haven’t missed something. I’m assuming the Relay doesn’t need a load on the output contacts to get it to switch?

from time import sleep

from gpiozero import OutputDevice

relay = OutputDevice(16)

relay.off()

while True:
    relay.on()
    print("Relay On")
    sleep(0.5)
    relay.off()
    print("Relay Off")
    sleep(0.5)

Kind of sounds like a dud relay.
Is the automation mini plugged directly into the Pi, no jumpers or ribbon cable?
If it’s a Pi Zero, did you solder on the header?