Gas Logs / Fireplace control

http://skytechpg.com/skytech/assets/instructions/2_Valve-Systems/1_AFLMF-Series/RCAF-LMF-V_Instr.pdf

This system is a 305MHz remote control and receiver combo that opens and closes the natural gas valve using a solenoid. Here’s a photo of the printed circuit board. It has a very small RF section on the left, the EM78P156 8-bit microprocessor in the middle, and a pair of SDM8401 transistors switching the 6VDC and GROUND between the red and black output wires at the upper right.

I replaced the SkyTech unit altogether with an ESPHome device using ESP32 and dual 3v3 SPDT relays. Found the below diagram, wired it up, and now there is +6VDC on one ESPHome switch for 5 seconds and -6VDC on the other ESPHome switch for 5 seconds. HIGHER and LOWER settings are achieved by closing the relays for just 600 milliseconds.

This is the ESPHome YAML configuration:

esphome:
  name: fireplace
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "my-wifi-name"
  password: "my-wifi-password"
  power_save_mode: none

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "1234567"

ota:
  password: "1234567"

switch:
  - platform: gpio
    id: relay01
    pin: 25
    restore_mode: ALWAYS_OFF 

  - platform: gpio
    id: relay02
    pin: 27
    restore_mode: ALWAYS_OFF 

  - platform: template
    id: off_switch
    name: "Fireplace OFF"
    icon: "mdi-close-octagon"
    turn_on_action:
    - switch.turn_on: relay01
    - delay: 5000ms
    - switch.turn_off: relay01
    restore_state: off
  
  - platform: template
    id: on_switch
    name: "Fireplace ON"
    icon: "mdi:fireplace"
    turn_on_action:
    - switch.turn_on: relay02
    - delay: 5000ms
    - switch.turn_off: relay02
    restore_state: off
    
  - platform: template
    id: low_switch
    name: "Fireplace LOWER"
    icon: "mdi:arrow-down"
    turn_on_action:
    - switch.turn_on: relay01
    - delay: 600ms
    - switch.turn_off: relay01
    restore_state: off
  
  - platform: template
    id: high_switch
    name: "Fireplace HIGHER"
    icon: "mdi:arrow-up"
    turn_on_action:
    - switch.turn_on: relay02
    - delay: 600ms
    - switch.turn_off: relay02
    restore_state: off

And this is the Lovelace code for the Home Assistant web page:

      - entities:
          - entity: switch.fireplace_on
          - entity: switch.fireplace_higher
          - entity: switch.fireplace_lower
          - entity: switch.fireplace_off
        show_header_toggle: false
        title: Fireplace
        type: entities

Which provides this lovely set of momentary switches:

Fireplace Panel

One of the greatest things about integrating this with ESPHome and Home Assistant is the ability to create Rhasspy voice commands and HA automations to voice control it.

These are the Rhasspy sentence definitions:

[ChangeFireplaceState]
state = ( on | off | higher | lower ) {state}
(turn | switch) <state> [the] fireplace
(turn | switch) [the] fireplace <state>
fireplace <state>

This is the HA Automation YAML code:

- id: '0999'
  alias: "Rhasspy Change Fireplace State"
  trigger:
    platform: event
    event_type: rhasspy_ChangeFireplaceState
  action:
    service_template: 'switch.turn_on'
    data_template:
      entity_id: 'switch.fireplace_{{ trigger.event.data["state"] }}'

Has this been reliable for you? I’m considering something similar.

It has been very reliable. Some caveats learned along the way: check the status of your alarm system before allowing the automation to execute. If your alarm system says “Armed - Away” then nobody should be home, and the automation should NEVER execute. Also check the status of a room occupancy sensor before allowing the automation to execute. If nobody is in the room, it really should not execute.

Spouse has a bad habit of leaving the television on when we went out of the house, and Rhasspy often tried to execute random automations, based on false positives generated by noise from the television set. :frowning:

I think I have a very similar remote and control module for my gas fireplace. Mine does not have a high or low just on of off.

So if I just want to be able to turn the fireplace on or off with a relay do I just need a relay to provide 6 volts on or off to the solenoid?

I am also considering just replacing the 3 position switch (on, remote, off) with a relay system so the remote can still work at time but then I could override the remote when desired by turning the switch to off.

Thoughts?

You have to wire the +6 VDC through a pair of relays (provides polarity reversal) as shown above. Re-read my original post in detail. +6 VDC turns the motor one way to open the valve, and thus, the fireplace is on/high. -6 VDC turns the motor the other way to close the valve, and thus the fireplace is off. High and Low settings are simply a number of milliseconds higher or lower, where the valve is partially opened or closed.

1 Like

more pics of my board

In your second picture, the two integrated circuits shown at the bottom serve the same purpose as relays. They are transistors to switch the +6VDC out to the valve motor. Note the B- and B+ on the printed circuit board.

This ESP8266 dual-relay board is currently doing the work for my fireplace.

I stopped through our local stove shop yesterday, and they all use SkyTech units for control. Love to see this has already been automated. I don’t have any ESPHome devices yet, so I’ll have to start play with that. Where’s your 6V supply coming from? Are you using AA batteries? Not having to depend on mains power is crucial.

EDIT: I know that the control of the fireplace is by its nature momentary–just opening or closing the solenoid valve for some amount of time–but have you done anything to establish a “state” of the fireplace? All I can think of is if there’s been any raise or on command sent after an off command… then set a fireplace state template sensor to on… and vice versa with the off. I’d like to be able to use the state of the fireplace to do things.

i kept the battery pack for the 6v power supply.

Adding a template sensor would be fairly straight-forward. Any time the “on” button is pushed, set the template sensor to on/true/lit. Any time the “off” button is pushed, set the template sensor to off/false/extinguished.