Connecting my gas fireplace

I can’t remember if I changed anything, but here is the code that I am currently using:

 /**
     *  Fortrezz MIMOlite
     *
     *  Author: Based on SmartThings code
     *  Date: 2014-03-6
     */
    
    // for the UI
    metadata {
    	// Automatically generated. Make future change here.
    	definition (name: "Mimo lite", author: "carlos@carlossaldarriaga.com") {
    		capability "Polling"
    		capability "Refresh"
    		capability "Switch"
    		capability "Contact Sensor"
    	}
    
    	// simulator metadata
    	simulator {
        	status "on":  "command: 2003, payload: FF"
    		status "off": "command: 2003, payload: 00"
    
    		// reply messages
    		reply "2001FF,delay 100,2502": "command: 2503, payload: FF"
    		reply "200100,delay 100,2502": "command: 2503, payload: 00"
    
    		// status messages
    		status "open":  "command: 2001, payload: FF"
    		status "closed": "command: 2001, payload: 00"
    	}
    
    	// UI tile definitions
    	tiles {
            standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
    			state "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821"
    			state "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
            }
            standardTile("contact", "device.contact", inactiveLabel: false) {
    			state "open", label: '${name}', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
    			state "closed", label: '${name}', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
    		}
            standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
    			state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
    		}
            valueTile("alarm", "device.alarm", inactiveLabel: false) {
    			state "alarm", label:'${currentValue}'
    		}
    
    
    		main (["switch", "contact"])
    		details(["switch", "contact", "refresh", "alarm"])
    	}
    }
    
    def parse(String description) {
    	def result = null
    	def cmd = zwave.parse(description, [0x20: 1, 0x84: 1, 0x30: 1, 0x70: 1])
    	if (cmd) {
    		result = createEvent(zwaveEvent(cmd))
    	}
    	log.debug "Parse returned ${result?.descriptionText}"
    	return result
    }
    
    def sensorValueEvent(Short value) {
    	if (value) {
    		createEvent(name: "contact", value: "open", descriptionText: "$device.displayName is open")
    	} else {
    		createEvent(name: "contact", value: "closed", descriptionText: "$device.displayName is closed")
    	}
    }
    
    def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
    	[name: "switch", value: cmd.value ? "on" : "off", type: "physical"]
    }
    
    
    def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd)
    {
    	sensorValueEvent(cmd.value)
    }
    
    def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
    	[name: "switch", value: cmd.value ? "on" : "off", type: "digital"]
    }
    
    def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)
    {
    	sensorValueEvent(cmd.sensorValue)
    }
    
    def zwaveEvent(physicalgraph.zwave.commands.alarmv1.AlarmReport cmd)
    {
    	sensorValueEvent(cmd.sensorState)
    }
    
    def zwaveEvent(physicalgraph.zwave.Command cmd) {
    	// Handles all Z-Wave commands we aren't interested in
    	[:]
    }
    
    def on() {
    	delayBetween([
    		zwave.basicV1.basicSet(value: 0xFF).format(),
    		zwave.switchBinaryV1.switchBinaryGet().format()
    	])
    }
    
    def off() {
    	delayBetween([
    		zwave.basicV1.basicSet(value: 0x00).format(),
    		zwave.switchBinaryV1.switchBinaryGet().format()
    	])
    }
    
    def poll() {
    	zwave.switchBinaryV1.switchBinaryGet().format()
    }
    
    def refresh() {
    	zwave.switchBinaryV1.switchBinaryGet().format()
    }
1 Like

The Device needs the Capabilities: Contact Sensor, Polling, Refresh, Switch

Leave the Jumper on P5

I recall that I turned the wall switch upside down because closing the contact actually turned the fireplace off and opening it turned it on. I believe that this could be fixed in the code somehow but it was easier for me to flip the switch over.

1 Like

Thanks Hans. For some reason I still couldn’t get it to work with your device type, but it is working with this quick app. I’m sure there was a much simpler way, but this works. Its based on the let there be light app.

 /**
 *  Let There Be Fire!
 *  Turn your MIMOlite fireplace on when the open/close sensor opens and off when the sensor closes.
 *
 *  Author: SmartThings
 */
definition(
    name: "Let There Be Fire!",
    namespace: "smartthings",
    author: "SmartThings",
    description: "Turn your MIMOlite fireplace on when the open/close sensor opens and off when the sensor closes.",
    category: "Convenience",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/light_contact-outlet.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/light_contact-outlet@2x.png"
)

preferences {
	section("When the MIMO sensor opens/closes...") {
		input "contact1", "capability.contactSensor", title: "Where?"
	}
	section("Turn on/off a MIMOlite fireplace...") {
		input "switch1", "capability.switch"
	}
}

def installed() {
	subscribe(contact1, "contact", contactHandler)
}

def updated() {
	unsubscribe()
	subscribe(contact1, "contact", contactHandler)
}

def contactHandler(evt) {
	log.debug "$evt.value"
	if (evt.value == "closed") {
		switch1.on()
	} else if (evt.value == "open") {
		switch1.off()
	}
}
2 Likes

I’ve really wanted to do exactly this! However I have read that it is against building code to mix line and low voltage in the same box. This is especially scary to me since we are dealing with the fireplace here. Does anyone have any knowledge if building inspectors will have a problem with this setup, is it up to electrical code and / or it is safe?

Thanks!
Amir

There is no line voltage in the box. The Mimo device is powered by a low voltage dc transformer, mounted remotely in my case. The wall switch just completes the circuit for the mimo (low power).

No problem Jkohlen. I like your implementation better I’ll probably change mine if I ever need to tinker with it again.

@urbanerosion. Hans–first, thanks for the info on doing this implementation with the Mimo, SUPER helpful. One thing I was curious about, you mentioned that doing the installation “in-line” would create status problems in ST… I’m curious, if you didn’t do this in-line, then how did you do it?

Maybe I’m mis-understanding that that means, especially w/o diagrams it’s hard to describe, but I’m assuming that doing the install involves wiring the two low-voltage wires to the +/- and then pulling in a live line to the pwr or PO connector? It also sounds like you had to buy an AC to DC converter? By remote converter what did you mean? The following is what I was thinking about using: http://goo.gl/maItHu

Basically I have a fireplace switch right next to another outlet box containing AC power. I’m thinking about running power from one box to the other, but it appears I’d need a DC converter to power Mimo, and then make sure Mimo is wired correctly to the switch (TBD on my understanding of Inline vs. The Method you used). Is that right?

Thanks in advance.

I was trying to do this same thing with my fireplace and have hit the same issues you have.

I want ST to be able to control the thing, but I also want a wall switch for the fireplace to function. Currently, I have a simple light switch that completes a low voltage circuit that turns the fireplace on and off. I could put in an Evolve LFM-20 to control the fireplace, but then the wall switch won’t really work.

It really seems that what we need is GE 12722 as a wall switch that actually acts as an isolated contact switch like the evolve. Someone must make that?

Use a remotec zfm80…
it’s a dry contact relay, that has contacts for an external switch.
So you can trigger from the push button switch on the device, or an external switch or via zwave…

I used the remote zfm80, a linear auxiliary wall switch, and the big switch app from smartthings.

Additionally, I used a custom device type for the zfm that activates the built in ability to turn off the switch after a given length of time. I chose two hours.

Given that the fireplace is in a remote vacation rental, I’ll be adding a temperature sensor nearby to verify that the pilot is ready to go for guests and as added verification that the fireplace is actually on/off.

Do you even need any additional switch with the ZFM80? It looks like it alone would be fine

Not if you like the looks of the provided one. It’s also a bit larger than the normal décora faceplate, requiring a little dremel action.
I mounted mine behind the fireplace grill (where all the controls are), since there was ac there.
That way you don’t have to fish power to the device location.

Nope, you don’t need an external, additional switch, but in my case I had a nice switch that’s built into the side of the of the fireplace surround and I don’t have a nice “pretty” place to the ZFM80, so have the option to add in an external switch is a great extra.

The relay is pretty smart too. If I turn on the fireplace via SmartThings the physical external switch says “off” of course. If I flip the switch on then, it still knows that the fire place is on so don’t turn it off. I have to flip the switch physically off again, and of course vis versa is the physical switch of on and I turn it off via SmartThings.

This way the switch doesn’t get out of sync with the relay.

You can solve this issue by replacing the existing switch with a ‘momentary’ switch and configuring the parameters of the zfm as such.

It’s not really an issue though… and again the benefit here is NOT replacing the physical switch. It’s a very nice little switch on the side of the framing.

The zfm80 supports the toggle switch just fine, it works like any other three way in your house with the zwave switch being the other leg.

So, exactly how is this put into the circuit for the fireplace with the low voltage wall switch in place?

There are two wires that connect your existing switch to the gas valve. You cut them in half and connect the switch side to the switch input of the remotec. The ends that are connected to the gas valve are then connected to the dry contacts on the remotec. You cut up an extension cord in half, use that to connect the remotec 120vac input to a ac source in your fireplace.

I used a wemo maker on my low voltage fireplace and have the maker box on the wall over where the switch was. it has a button on it for on/off and works with IFTTT. since I haven’t had the fireplace on since winter, I might have to look at adding it to my smartthings. probably do a virtual switch and have it control the fireplace thru IFTTT.

Yeah, what @Mike_Maxwell said…

Here’s how I did mine (excuse the spelling there… should be low voltage switch… no spell check in paint!) :

  1. Disconnect the low voltage switch from the gas fireplace.

  2. Connect new wires from the Remotec Relay’s controlled contacts (the middle two on the ZFM-80) to the spot where the old low voltage switch was connected on the fireplace.

  3. Next optionally reconnect the wires from the old low voltage switch to the top two contacts on the ZFM-80.

  4. Finally, connect house power to the bottom two contacts of the ZFM-80… the easiest way is how I and Mike suggest: Cur a power cord off some old appliance that doesn’t work or cut the extension end off an extension cord (the end where you plug other things into it), and wire that up to the relay. Then you can just plug it into an outlet rather than having to physically wire it up.

I put my relay in a plastic electrical box that you can buy cheap at any hardware store, then ran the wires out of the back of that to provide some level of protection. Then I put the unit way in the back of my fireplace behind the gas insert. But the gas fire place needs power the contractor who installed it wired in an outlet back there as well so he could plug in the fire place. The relay just gets plugged in next to it.

Final note: Step 4 is NOT optional. You NEED main house power to the relay to power the z-wave radio. Without that it wouldn’t work.

4 Likes