I’ve made a “firetruck” bed for my son, with blinking lights, sirens, etc.
BOM
8 x 16mm push button momentary reset, custom engravings:
- White (2), A8 (high beam icon) and M7 (low beam icon),
- Yellow (2), E9 (arrow icon), M1 (alarm signal)
- Blue (1), G2 (alarm light icon),
- Green (1), B1 (engine icon),
- Red (1), F3 (phone icon),
8 x Socket 16mm push button
1 x T-Relay 5V 8 Channel Relay – LILYGO®
1 x T-U2T – LILYGO®
1 x Relay
1 x PCF8574 IO expansion module
2 x Orange Blinker
2 x Strobe light (has been ordered, hasn’t arrived yet, so it’s not on the images)
2 x Headlights
2 x Ikea Kura bed
3 x Ikea Snudda bed (wheels and steeringwheel)
1 x Ewent EW3907 ATX PC Power Supply 500 W
Red, Black and White foil for the panels and wheels (you don’t see the white yet on the images, it’s to create a ladder on the top panel).
1 x White and 1x Blue reflective tape for the lower left panel (has yet to be ordered)
1 x Google Nest
Plenty of electrical wire
Hints and tips for building
- I’ve used two Ikea beds and combined them, The posts for the top bed are glued with dowels. For the right side of the stairs I’ve used a round slat that goes through the girder.
- The PSU won’t work unless you short the green wire with one of the black wires, when powered on you’ve got your 12v, 5v and 3.3v so you can power almost anything you would like to connect to the Relay board,
- Compile your own Tasmota build because you need to include the PCF8574 module,
- Connect the pushbuttons to the IO expansion module,
- Connect the additional relay to the Relay board (you’ll need it because the strobe lights have the ability to change pattern)
PCF8574 module setup:
D0: Pushbutton M7
D1: Pushbutton A8
D2: Pushbutton E9 (blinker left)
D3: Pushbutton E9 (blinker right)
D4: Pushbutton G2
D5: Pushbutton B1
D6: Pushbutton F3
D7: Pushbutton M1
Relay board:
Relay1: Headlights (angel eyes) + Pushbutton M7
Relay2: Headlights (low and highbeam) + Pushbutton A8
Relay3: Blinker (left) + Pushbutton E9
Relay4: Blinker (right) + Pushbutton E9
Relay5: Strobe lights + Pushbutton G2
Relay6: Strobe lights (pattern selection)
Relay7: Pushbutton B1
Relay8: Pushbutton F3
Relay9 (added relay): Pushbutton M1
Tasmota settings:
backlog blinkcount 5; blinktime 5
Tasmota Rules:
Rule1 turns on or off the engine light
Rule1 ON PCF8574-1_INP#D5=0 DO Power7 2 ENDON
Rule2 turns on or off Rule3 and turns off all lights when the engine is turned off
Rule2 ON Power7#State=0 DO Backlog Rule3 OFF; Power0 OFF ENDON ON Power7#State=1 DO Rule3 on ENDON
Rule3 turns on or off a relay when a button has been pressed
Rule3 ON PCF8574-1_INP#D0=0 DO Power1 2 ENDON ON PCF8574-1_INP#D1=0 DO Power2 2 ENDON ON PCF8574-1_INP#D2=0 DO Power3 3 ENDON ON PCF8574-1_INP#D3=0 DO Power4 3 ENDON ON PCF8574-1_INP#D4=0 DO Power5 2 ENDON ON PCF8574-1_INP#D6=0 DO Power8 2 ENDON ON PCF8574-1_INP#D7=0 DO Backlog Power9 3; Power3 3;Power4 3 ENDON
HA Automation:
alias: Firetruck
description: ""
trigger:
- platform: state
entity_id:
- switch.tasmota_firetruck_switch_relay_7
from: "off"
to: "on"
id: Dispatch
- platform: state
entity_id:
- switch.tasmota_firetruck_switch_relay_4
from: "off"
to: "on"
id: Lights
- platform: state
entity_id:
- switch.tasmota_firetruck_switch_relay_6
from: "off"
id: Engine on
to: "on"
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Dispatch
sequence:
- service: tts.cloud_say
entity_id: media_player.google_nest
data_template:
message: >
{{ ('Line1',
'Line2',
'Line3',
'Line4'
)|random }}
cache: false
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota_firetruck_switch_relay_7
- conditions:
- condition: trigger
id: Lights
sequence:
- service: media_player.play_media
target:
entity_id: media_player.google_nest
data:
media_content_id: /media/local/firetruck_siren.mp3
media_content_type: audio/mp3
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota_firetruck_switch_relay_4
- conditions:
- condition: trigger
id: Engine on
sequence:
- service: media_player.play_media
target:
entity_id: media_player.google_nest
data:
media_content_id: /media/local/engine_on.mp3
media_content_type: audio/mp3
mode: single
It’s still a work in progress, but I hope to have given some inspiration to those that are thinking of building a firetruck bed