A tradesperson kneeling among the trusses in a roof space, beside an exhaust fan and its silver duct lying on the insulation.

A roof-space fan that runs when the roof gets hot

How it works

The Shelly 1 Gen4 switches the fan, and the Shelly Plus Add-on clips onto it and reads a DS18B20 temperature probe. The relay stays below the ceiling, behind the fan's wall switch, and only the probe's 3 m lead runs up into the roof space.

Two actions on the relay do the switching. Every minute it reads the probe: above 35 °C it turns the fan on, and below 30 °C it turns it off. The 5 °C gap stops the fan from flicking on and off around one temperature. Both actions run on the relay itself, so the fan keeps working if the internet drops out.

  1. Shelly app main controls for a device named Roof fan, switched on, with Roof space reading 42.1 °C. 01

    The probe

    Hangs in the roof space and reads the air temperature every minute.

  2. Shelly's photo of a Shelly Plus Add-on clipped onto the back of a Shelly relay, held in two hands. 02

    Shelly relay

    Turns the fan on above 35 °C and off below 30 °C.

  3. 03

    Your roof-space fan

    Runs when the roof is hot, and stays off when it isn't.

What it looks like on your phone

  • Running. The roof space passed 35 °C, so the relay switched the fan on.

  • The two actions. On above 35 °C and off below 30 °C, both running on the relay itself.

Step by step

How you'll set it up

Add the device to Wi-Fi from your phone, or straight from a browser.

  1. Fit the Shelly below the ceiling

    The relay goes behind the fan's wall switch, not in the roof space. Mains comes in on L and N, a short bridge feeds I, O runs to the fan, and the wall switch lands on SW, so it still turns the fan on and off.

    Wire map 1 Gen4
    • Active (supply) L
    • Neutral N
    • Bridge from L I
    • Exhaust fan O
    • Wall switch SW
    Circuit overview
    LN230 V~ 50 Hz1Exhaust fan2Wall switchOISWLNShelly 1 Gen4
    1Exhaust fan2Wall switch
    Active (supply)Neutral / 0 VSwitched loadSwitch signal / dry contact

    In Australia, fixed 230 V wiring is licensed-electrician work. Use these diagrams to plan the job and brief your electrician.

    Showing the whole circuit

    Shelly 1 Gen4

    100%
    LN230 V~ 50 Hz1Exhaust fan2Wall switchOISWLNShelly 1 Gen4
    1Exhaust fan2Wall switch

    Select a terminal to follow its wiring.

  2. Clip the Add-on onto the relay

    With the power off, line the Shelly Plus Add-on's pins up with the port on the relay and press it home until the brackets lock. Take care not to bend a pin: a bent pin stops the Add-on reading anything.

  3. Wire the probe to the Add-on

    On the probe, the red wire goes to VCC, yellow to DATA and black to GND, all on the Add-on's 1-Wire side.

    Wire map Plus Add-on
    • Red (power) VCC
    • Yellow (data) DATA
    • Black (ground) GND
    Circuit overview
    3.3 V from the ShellyProbe1-Wire sideAnalogue sideShelly Plus Add-onVCCDATAGND
    Red: power (VCC)Yellow: data (DATA)Black: ground (GND)

    In Australia, fixed 230 V wiring is licensed-electrician work. Use these diagrams to plan the job and brief your electrician.

    Showing the whole circuit

    Shelly Plus Add-on

    100%
    3.3 V from the ShellyProbe1-Wire sideAnalogue sideShelly Plus Add-onVCCDATAGND

    Select a terminal to follow its wiring.

  4. Run the probe into the roof space

    Feed the probe up through the top of the wall into the roof space. Let it hang in the open air, clear of the roof sheet and the insulation, so it reads the air the fan moves.

  5. Add the Shelly in the app

    Add the relay in the Shelly Smart Control app and name it Roof fan.

  6. Turn on the Sensor Add-on

    Open Add-on peripherals, expand Manage add-on feature, choose Sensor Add-on, then tap Save and reboot. In the web interface, open Add-on, choose Sensor Add-on and click Save and reboot.

  7. Add the probe

    Tap Add peripheral, choose Temperature (DS18B20), tick the probe it finds and tap Add peripheral. The Shelly reboots once more. Name the reading Roof space. In the web interface, click +, choose Temperature (DS18B20), tick the probe and click Add and reboot.

  8. Turn the fan on when it's hot

    In Add-on peripherals, open Actions and tap Add action. Choose Roof space, name the action Fan on when hot and leave Set active time off. For When, choose Temperature measurement, then More than and 35, and tap Next. Under Local Actions, tap Add local action, set the output to on and tap Save. In the web interface, open Actions, click Create action and pick Roof space. Set Event to Temperature measurement every 60s, add the condition New temperature in Celsius greater than 35, add an action to execute that sets Roof fan on, and click Save.

  9. Turn it off when it cools

    Add a second action the same way, named Fan off when cool, with Less than and 30 and the output set to off. In the web interface, the condition is New temperature in Celsius less than 30.

  10. Check it's set

    Add-on peripherals now shows Roof space with its reading, and Actions lists Fan on when hot, above 35 °C, and Fan off when cool, below 30 °C. The fan starts the next time the roof space passes 35 °C.

Frequently asked questions

Should I use the Shelly app or Home Assistant?

If you don't run Home Assistant, use the Shelly app: it needs no hub, and the actions run on the relay. If Home Assistant already runs your home, put the fan there, so the roof temperature sits alongside your other automations.

Why can't the relay go in the roof space?

The Shelly 1 Gen4 and the Plus Add-on are rated to 40 °C, and a roof space gets well past that on a summer afternoon. That's why the probe comes on a 3 m lead: the relay stays below the ceiling and only the probe goes up.

Do I need an electrician?

Yes. The fan runs from 240 V mains, and connecting anything to fixed wiring is licensed electrical work in Australia.

Will it work with my existing fan?

If the fan runs from 240 V mains through a switch, yes. The relay switches up to 16 A. Shelly lists fans as inductive loads that need an RC snubber, so ask your electrician to fit one with the relay.

Can I use a Shelly Plus Uni instead?

It reads the same probe, but its outputs are limited to 30 V and 300 mA, so it can't switch a 240 V fan itself. You'd still need a relay for the fan, so the Shelly 1 Gen4 and Add-on is the simpler kit.

What temperatures should I use?

35 °C on and 30 °C off is a starting point. Change the two numbers to suit your roof, and keep a few degrees between them so the fan doesn't switch on and off around one temperature.

What happens if the internet drops out?

Nothing changes. The two actions run on the relay itself, so the fan still follows the roof temperature. You just can't check it from outside the house until the connection is back.

Why does the Shelly 1PM Gen4 help?

It measures the power the fan draws. Open it in the app on a hot day: if the fan is switched on but drawing nothing, it has stopped.

Does it still run if Home Assistant is off?

No. The two automations live in Home Assistant, so the fan won't follow the temperature while it's down. The wall switch still works, because it's wired to the relay.

Still need a hand?

We answer most messages within one business day. If your question is about an existing order, have your order number ready. It speeds things up.

Contact us