Gas logs / fireplace - Skytech RCAF-LMF-V

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. Before I tear into the PCB looking for contact points, has anyone else interfaced to similar motor/solenoid/valve configurations? Thanks in advance!

1 Like

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. After looking at it a while, I could probably do away with the unit altogether, replacing it with my own ESPHome setup using dual relays.

Now I need to figure out how to reverse/swap the 6VDC and GROUND using only two relays?

That didn’t take too terribly long. :wink: Found the below diagram and wired it up, and boom, I’ve got +6VDC on one ESPHome switch for 6 seconds and -6VDC on the other ESPHome switch for 6 seconds. Now if only I didn’t need to run out to get more AA batteries. :grimacing:

For the benefit of other ESPHome users, here’s the 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 fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Fireplace Fallback Hotspot"
    password: "my-failsafe-password"

captive_portal:

# 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:fireplace"
    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:fireplace"
    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:fireplace"
    turn_on_action:
    - switch.turn_on: relay02
    - delay: 600ms
    - switch.turn_off: relay02
    restore_state: off

@FredTheFrog Your reverse engineering skills are awesome. Thanks for sharing. I have been trying to do the same with TS/R-2A model receiver since the remote lost a fight with some water, but now frustration has got the better of me. This receiver is wired so bizarrely I cant figure out is could possibly work even with the remote (pre bath). Manufactures wiring diagram. Have you got any pointer for how I can figure out what type of trigger the unit is sending to start / stop the burners?

Some of the strange happenings

  • Battery box is empty - wire connected directly from the heater PCB to positive terminal in box ( I assume to power the receiver but the negative is not connected at all.
  • One of the screw connectors (mine are MS not MOT as in your picture) is grounded to the fireplace - i assume this is the negative.
  • Only 2 wires connect back to the PCB (ignoring the wire to the + terminal) to control the 4 possible states (Off, low, mid, high).
  • Those 2 wires are soldered together and in the same terminal on the control box.
  • Looking at the fires PCB - The violet wire on “P2” appears to be connected to a diode bridge so i assume DC power.

No stress if your not interested in going over it all, i am starting to think just replacing and using the remote is a good idea for my skill level :slight_smile:

Have more photos and diagrams but new user so i cant upload more than 1.

Is there any way possible to show the internals/circuit board? The power supply is simply 4 x 1.5V = 6VDC.

I found the owners manual, link available here.

If I had to guess, I’d say your unit is the same as mine, except mine has no thermostat in the configuration. You could use an ESP8266 board with two relays to provide the +6VDC/-6VDC to the gas control valve.

Have you got any pointer for how I can figure out what type of trigger the unit is sending to start / stop the burners?

The unit turns on/off the flow of natural gas / propane to the logs. It has a small DC-voltage motor affixed to a valve, typically affixed to a larger aluminum valve block. Also connected here are the thermocouple and the pilot flame supply line. Whether it turns them on or off depends on the polarity of the voltage supplied. +6VDC runs the valve motor open, and turns them on. -6VDC runs the valve motor closed, and turns them off. How high or low the level is determined by how long the voltage is supplied.

In my YAML above, 5000ms (five seconds) is all that is needed to turn the valve fully open or fully closed. Shorter durations of 600ms (.6 seconds) turn the valve slightly more open or slightly more closed.

I’ve replaced the older ESP-01 dual-relay board with a newer ESP-12f four-relay board, as the older board was becoming unreliable. :frowning: The advantage is the newer board directly controls the relays through GPIO pins, whereas the older board used a UART and another microprocessor and indirectly controlled the relays using sequences of hex data bytes.

These are the GPIO pin assignments for each of the four relays:

#
# GPIO14 - Relay 1
# GPIO16 - Relay 2
# GPIO13 - Relay 3
# GPIO12 - Relay 4
#

The primary reason I put in a propane stove is so I have heat when the electricity goes out. With that in mind 1) my HA has a limited run time without power, and 2) I want to still be able to use the SkyTech remote when the power is out. I have a generator but don’t want to depend on that. I think what I’ll do is run this device through mains-powered relays so that when the power is on, the stove is controlled via HA, and when it’s off, the stove reverts to SkyTech remote operation. I’ll want to keep the SkyTech receiver powered so it doesn’t lose its RF pairing. I hear that can be a pain to deal with, though I’ve never had to pair my own remote.

Maybe I can use the two unused channels on the board linked in the previous post. I’ll be giving this a try in the next few weeks.

1 Like

Sounds excellent!! Please do share your wiring for those extra two relays when you’ve got it working to your liking.

I was thinking something like this…

Relays 1 and 2 are energized on startup and stay energized as long as the ESP board has power. Relays 3 and 4 do the same thing as your relays 1 and 2… I chose to move them because I read that this board can energize relay 1 momentarily during startup.

This is assuming that the SkyTech RF receiver module delivers the same +6V/-6V that your ESP device does.

EDIT: I’ve just learned that my remote system delivers a 750mV signal. I’m not sure what that protocol looks like, so I’ll have to do some research.

EDIT 2: OK… I thought millivolt was much more complicated than it actually is. It couldn’t be simpler: it’s just a dry contact that closes to turn the stove on. I thought I had to account for a flame up/flame down signal, but that’s done manually at the stove and not with the SkyTech remote. I’ve confirmed with a multimeter on the receiver.

I’m going to use a Zooz ZEN51 in parallel with the remote receiver terminals.

This is exactly what I have been trying to do myself. Tested it on a breadboard and it does work. Did you use an external power supply on the relays or did you use the 5vcd from the EPS. Not sure if 5vdc will be enough, as the solenoid is rated for 6vdc, but maybe so. Without testing it not sure.

I would also like to turn this into a true HVAC control system. I have already found ways to maybe do this. Still early in progress and research.

It looks like this solenoid will trigger reliably down to +/-4.7vdc. This saved me from having a separate 6v P/S for the solenoid relays. I used a very tiny P/S that converts 120VAC to 5VDC at 2 amps. So small I was able to mount it to the board with a single A/C power cord. Works well! Still on the bench testing it before actually installing it. The ESPHome script needs to be able to monitor the STATE. With two switches, one for on (+voltage) and one for off (-voltage). There has to be a better way to do this. Maybe set it up as a climate device? Can I use the room temp sensors I already have or would I need to build it into this unit?


The P/S is the small board on the upper right, receiving line voltage.

@lexridge I had to do this with a mmwave combo pir sensor. Worked as occupancy but should work as binary possibly Both the PIR and mmwave sensor had to be off for the room occupancy value change to clear. Same logic should work, state only off when both relays are 9ff unless I’m misunderstanding what you want o.accomplish and something I watched yesterday said relay states can be tricky.

  • platform: template
    name: waves occupancy
    id: occupancy
    device_class: occupancy
    filters:
    • delayed_off: “10s”
      lambda: |-
      if ( id(mmwave).state or id(pir_motion_sensor).state) {
      return true;
      }
      else if (id(mmwave).state == 0 and id(pir_motion_sensor).state == 0) {
      return false;
      }
      else {
      return id(occupancy).state;
      }

Thanks for your reply James. I did finally figure this out with the help of @ tom_l in this thread.

https://community.home-assistant.io/t/how-to-keep-track-of-state-of-dual-momentary-relays-on-one-device-gas-logs-controller/

I’m also using a template. I tried using lambda but because of the relays only staying on for 2s, the lovelace buttons followed it. I wanted only one button to control it. Not one for on and another for off. Using optimistic mode solved this but also prevents the controller from being controlled externally via remote, push buttons, etc. Too easy to get things out of sync.

What I now have works very well and I have been testing it most of the day connected to the real gas logs, using an ESPHome temperature sensor w/automation to control it. While I feel this solution is pretty reliable I want to take it one step further and add a IR temp sensor to it soon. The type that are used in infra-red thermometers. I just want to be sure 100% sure the state is always correct. Also added the on board LED to turn on with ON state which is very helpful.

Here is the code we came up with:

output:
  - platform: gpio
    id: board_led
    pin: D4 #GPIO2 Built in LED
    inverted: true


light:
  - platform: binary
#    name: "On-board LED"
    id: onboard_led
    output: board_led 


switch:
  - platform: gpio
    name: "Gas Logs Relay" #Positive polarity +5vdc
    id: gaslogsrelay
    pin: D2 #GPIO2
    restore_mode: ALWAYS_OFF
    interlock: [gaslogsrelayneg]
    on_turn_on:
    - delay: 3000ms
    - switch.turn_off: gaslogsrelay
    

  - platform: gpio
    name: "Gas Logs Relay Neg" #Negative polarity -5vdc
    id: gaslogsrelayneg
    pin: D3 #GPIO4
    restore_mode: ALWAYS_OFF
    interlock: [gaslogsrelay]
    on_turn_on:
    - delay: 3000ms
    - switch.turn_off: gaslogsrelayneg

  
  - platform: template
    name: "Fireplace Switching"
    optimistic: true 
    turn_on_action:
      - switch.turn_on: gaslogsrelay
      - light.turn_on: onboard_led
    turn_off_action:
      - switch.turn_on: gaslogsrelayneg
      - light.turn_off: onboard_led

BTW, thanks for the introduction to mmWave sensors. These things look incredibly cool! I will be keeping these in mind for future projects.

1 Like

I also have a Skytech fireplace remote hooked to my propane Thelin stove.

I just used a MHcozy wifi relay to make this usable through y Home Assistant and Alexa.

The battery box connection for the Skytech has open piggy back connections available for connecting THTP and TH blade connectors. I simply wired the MHCozy to two female terminal connectors of the correct size and attached them to the piggy back connector.

I now have control of my propane stove through both the Skytech and Home Assistant. I am able to also automate operation now using interior and exterior thermostats.

2 Likes

I ended up setting up a generic thermostat entry in my configuration.yaml. It works very nicely for the most part. However I have not been able to set up any automations to change from HEAT to OFF whenever I am not home or by time. Hopefully I can figure this out soon.

climate:
  - platform: generic_thermostat
    name: Gaslogs Thermostat
    heater: switch.gas_logs_hvac_fireplace_switching
    target_sensor: sensor.livingroom_temperature
    precision: 0.1
    min_cycle_duration: 00:01
    cold_tolerance: 1.0
    hot_tolerance: 0.1
    initial_hvac_mode: "off"
    min_temp: 55
    max_temp: 75