Napoleon eFIRE-enabled Fireplaces (Work in Progress)

I’ve been able to use the integration a bit more now and it works without any problems in daily use here as well.

My wife requested a feature where you can set the initial flame height. Because 6 is too much 85% of the time. So I’m looking to implement that as configurable in an option flow.

Also, to make it work with voice assistants (e.g. “OK Google, turn on the fireplace”) I had to delete the “Flame” name from the switch entity that controls the flame. So I’m wondering whether the entity should do that by default. Quoting from the developer manual:

If the entity represents a single main feature of a device the entity should typically have its name property return None. The “main feature” of a device would for example be the LightEntity of a smart light bulb.

Any thoughts from the testers?

While its stretching the entity model a bit, we have a few other integrations using a light entity for fire places where the brightness maps to flame brightness/heigh, as this established pattern does work well, it might be a better fit than a switch entity.

Alright, I just pushed some changes to the main branch that implement the flame setting as a light entity. My initial testing suggests that it is much easier to handle from voice assistants this way (i.e. Google Assistant can actually set flame height).
No release made yet, so HACS may not see the changes until I make the release. Still doing some testing.

A few more fixes went in as well. Most notably I changed the way the flame is turned on and off in the bonaparte library. With this change the blower and flame can be controlled independently. Previously the blower would turn off when the flame is turned off.

Thank You

Late to the game here. The HA for me is not that close to the fireplace. How is the bluetooth to the fireplace extended?

I use M5Stack Atom devices as Bluetooth Proxies with ESPHome.

I use a slightly modified config to use the LED on them as well: M5Stack Atom Lite ESPHome BT Proxy Configuration · GitHub

Using a tiny USB-A to USB-C adapter to keep everything neat.

1 Like

Thank You - ordered, need to wait the 14 business days to deliver it now.

Just released the version that has the flame component as a light entity as version 0.2.0.

I have found this to work much better than the separate flame and flame_height entities, especially with voice assistants and turning on the flame to a specific level.
Please let me know if you have any issues with this version and sorry for breaking any automations you may have had with the old entity schema :grimacing:

Want to make sure it works well and has a good UX before I go for submission into core.

My wife requested a feature where you can set the initial flame height. Because 6 is too much 85% of the time. So I’m looking to implement that as configurable in an option flow.

This is hilarious - my wife asked the exact same question. I told her it’s unlikely because it’s just a dude in Canada writing it, but here we are :laughing:

Just updated to the newest version and updated the card to reflect the new entities – still working great on my end!

Great!

The spouse acceptance factor, where applicable, is certainly one the prime objectives for any home automator :wink:

Being that dude from Canada, I find it slightly amusing that I’m a 35 minute drive from Napoleon headquarters, yet I’m thinking they have no idea what I’m up to :stuck_out_tongue:
Even have a friend that used to work there, but more on the HR side.

That being said, with the light entity you can now pretty easily ask you assistant “Hey Assistant, set the fireplace to 20%” which will turn it on to Level 1.

The levels are translated to % values, as required by HA entities. So you will see the behaviour that when you set it to 20% to turn on at Level 1 the entity reports back 16% “brightness” (which is 1 divided by 6) instead.

1 Like

One quirk I’ve noticed with the latest update:

I can now set flame height in any increment of 5, so 0, 5, …, up to 100.

If I set it to ‘5’, it’s a low enough value to actually turn the flame entity off entirely.

Before I believe it had increments of 17 (so roughly 6 stages), which meant stage 1 == 17, which was still in an “on” state for the flame.

Have you noticed the same? Intuitively it feels strange that 5 would turn it off, rather than set it to to the lowest setting.

Also, I generally liked that the blower would go off when flame was off – I don’t see much use in having the blower on with no flame, and I could see myself accidentally leaving the blower on without realizing as the lower settings are very quiet. But this is more of a personal preference thing and I could see others disagreeing with this one.

Yes, that’s a proper bug. Fixed in the latest version. Good find, thanks!

The previous situation was that you couldn’t control the blower independently from the flame even if you wanted to.

Nitty gritty, rather lengthy implementation details here, if you're interested.

The Napoleon BLE controller actually has this interlocked internally.
The BLE controller maintains its own notion of fireplace on/off state that isn’t always in sync with the ProFlame 2 IFC that controls the burners.
Under the hood the on/off commands in the BLE protocol actually control more than just flame state (namely IFC power state, flame height and blower setting). At the same time, the BLE controller also prevents you from just setting flame state without previously using the turn on command. This is something the IFC on the other hand will gladly accept on its serial interface. The BLE controller’s turn on command forces IFC power state to on (1), flame to 6 (maximum) and blower to 0 (off). The off command sets all those values to 0.
This is also the reason why the valves get busy when you turn the fireplace on to a different level than maximum. The BLE on command sets them to 6 (max) and then the library immediately sets them to the desired level shortly after. Directly talking to the IFC via serial doesn’t have this problem. Setting the flame height from 0 to 3 turns on the burner and opens the valve to the halfway setpoint without opening them up all the way first and then cycling back to 3.
The way the python library works around some of the aforementioned behaviours is by simply ignoring the BLE controller’s notion of power state and inferring power state exclusively from the flame height or blower speed settings. This has proven to be the most reliable: If these values are non-zero on the BLE controller the respective feature is physically on in some way shape or form.
If you connected the eFIRE app to a BLE controller that thinks the fireplace is on (in it’s mind) but the flame height is actually 0 (which in the IFCs mind is off) the UI will glitch slightly as it does not expect the flame height to be 0 on a fireplace that is “on” in the mind of the BLE controller. But that is fixed as soon as you change any setting in the app.
I thought it didn’t matter because you can’t connect using the app anyway as long as the fireplace is controlled by Home Assistant.

One use-case that I found myself wanting this for is to keep the blower on for another 15 minutes or so after turning off the flame to distribute the residual heat from the fireplace in the room.
Technically, you could restore the old behaviour with an automation that triggers on a state change of the flame entity from on to off and turns off the blower. I do exactly that with a 15 minute delay :wink:

1 Like

That’s a good point – just set up an automation to turn blower off if it’s running for 15 mins when flame is off.

Awesome work all around, loving the integration!

I am just wondering if I might be able to get some help @FelixKa?

My devices will connect and usually be able to fire off one command successfully but then the connection seems to timeout. I can get the device to be responsive again by reloading the device/integration.

Here are some debug logs:

2023-10-26 16:49:11.315 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration napoleon_efire which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-26 16:49:24.308 INFO (MainThread) [homeassistant.setup] Setting up napoleon_efire
2023-10-26 16:49:24.308 INFO (MainThread) [homeassistant.setup] Setup of domain napoleon_efire took 0.0 seconds
2023-10-26 16:49:24.311 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Great Room Fireplace (050F)' for napoleon_efire integration not ready yet: Could not find eFIRE fireplace controller with address BC:14:EF:9D:05:0F; Retrying in background
2023-10-26 16:49:52.521 DEBUG (MainThread) [custom_components.napoleon_efire] Fireplace NAP_FPC_050F initialized. Feature set: {'night_light', 'aux', 'blower'}
2023-10-26 16:49:53.744 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Old state: None
2023-10-26 16:49:53.744 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] New state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:49:53.744 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 0.193 seconds (success: True)
2023-10-26 16:49:53.745 INFO (MainThread) [homeassistant.components.fan] Setting up fan.napoleon_efire
2023-10-26 16:49:53.745 INFO (MainThread) [homeassistant.components.light] Setting up light.napoleon_efire
2023-10-26 16:49:53.746 INFO (MainThread) [homeassistant.components.switch] Setting up switch.napoleon_efire
2023-10-26 16:50:23.439 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Old state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:50:23.439 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] New state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:50:23.439 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 0.134 seconds (success: True)
2023-10-26 16:50:53.498 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Old state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:50:53.498 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] New state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:50:53.498 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 0.193 seconds (success: True)
2023-10-26 16:51:03.815 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Old state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=6, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:51:03.816 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] New state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=6, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:51:03.816 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 0.141 seconds (success: True)
2023-10-26 16:51:33.463 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Old state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=6, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:51:33.463 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] New state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=6, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:51:33.463 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 0.158 seconds (success: True)
2023-10-26 16:52:02.284 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Old state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:52:02.284 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] New state: FireplaceState(aux=False, ble_version='8', blower_speed=0, bt_power=False, flame_height=0, ifc_power=True, led_color=(0, 0, 0), led_mode=<LedMode.HOLD: 2>, led=False, mcu_version='1.14', night_light_brightness=0, pilot=False, remote_in_use=False, split_flow=False, thermostat=False, time_left=(0, 0, 0), timer=False)
2023-10-26 16:52:02.284 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 0.224 seconds (success: True)
2023-10-26 16:52:45.942 ERROR (MainThread) [custom_components.napoleon_efire.coordinator] Timeout fetching napoleon_efire data
2023-10-26 16:52:45.942 DEBUG (MainThread) [custom_components.napoleon_efire.coordinator] Finished fetching napoleon_efire data in 15.001 seconds (success: False)

Some background info - I am using 3 different Olimex ESP32 PoE-iso Bluetooth Proxies (placed throughout the house). Initially when I paired the eFire controller with the Olimex device, I had disabled the two ESP32 devices that weren’t close to the fireplace. I also bought one of the M5Stack Atom Lite devices you linked and had it within 3 feet of the fireplace (wasn’t sure if it was a range issue) but this did not resolve it.

Additionally, I took the batteries out of the remote to ensure it wasn’t somehow causing issues.

Either way, thank you so much for your hard work on this integration!!!

I might need to add some more debug logging to the library to figure out what is going on there.
But the controller timing out without the Bluetooth stack noticing the device is out of range or otherwise unavailable is a case I haven’t seen so far.
I do run 3 M5Stack Atom Lite BLE Proxies in my house and I am not seeing this issue. But 2 of the 3 can’t see the fireplace, so that may be different.
I’ll see if I can reproduce the error by installing another Atom closer to the fireplace.


WOW


Thank You


Above is my flow so far. This is EXACTLY what I wanted and needed in getting the fireplace Automated.

The basic flow is that the HELPER “Fireplace” is exposed to the cloud and is the trigger to turn on the fireplace. The Automation is used to set everything I want to ON, or OFF based on it’s state. This way the NSPannel Switch or ALEXA can trigger it. Also the Automation to keep the house heated at specific times all use one HELPER.

The Second Helper is to trigger an on or off based on the temperatures, but only if it is on, so that the Timer Automations just need to set that HELPER on or off. If the house gets cold and it is not a specific time that I want to heat the house (AKA the middle of the night) then the automation of TEMPERATURE will trigger, but will not turn on the FIRPLACE Helper as the Helper FIREPLACE_TEMP_ON is not on.

Need to work on a few other items, as I want the NIGHT_LIGHTS on any time the fireplace could come on. So when Helper FIREPLACE is on, and if Helper FIREPLACE_TEMP_ON is set to on. This way if the FLAME is OFF but the automations COULD TURN ON the fireplace the NIGHTLIGHT will give me a visual indication that the fireplace could come on.


Once again Thank You

1 Like

Wow, that is a very sophisticated automation. I like the idea of the night light providing the visual indication.
I’m glad the integration can make all of this work for you. Let me know whether it works well enough.
People enjoying my work is the best motivation, so I thank you for sharing this!

Thank you so much!! I cannot wait to be able to use this integration! Currently relying on a SwitchBot Bot on the remote to toggle the fireplace on or off. Although as mentioned, I took the batteries out of the remote when using this integration.

Cleaned up my Automation Flow.

Helpers

  • “Napoleon Temperature” - used to set the desired house temperature.
  • “Fireplace” - Used as the Master SWITCH for the fireplace
  • “Fireplace Override Temperature Schedule” - Master switch to turn off the timed Automations

Scenes, I used two for On and Off, this way I can call them from the Automation.

Automations:

  • Two for the NIGHTLIGHT to be on when the fireplace WILL COME ON if the temperature is correct
  • Two for the BLOWER to come on and off after 5 minutes of on or off
  • One to check to see if the house is COLD (based on a temperature sensor) and the setting of the helper
  • One to check to see if the house is WARM (based on a temperature sensor) and the setting of the helper
  • For each time set an On and Off based on the time of day

Other items:

I wanted the ability to just turn on the fireplace when I felt cold. The Time-of-day Automations end by setting the helper Napoleon_Temperature to 80F. This way if I just trigger the helper FIREPLACE, it will probably come on, as the house is not that temp.

I wanted the ability to speak to ALEXA, so I expose FIREPLACE and Napoleon Temperature to the cloud. I need to find a name for the temperature as ALEXA got confused with Fireplace Temperature… so Napoleon work.

 Alexa, Napoleon Temperature to 78

will set the temperature for the Automations to react to. Like wise when the Time of day for automations are not active,

Alexa, Turn on the Fireplace

will trigger the fireplace to come on as the automations left Napoleon Temperature at 80F

All built with the GUI, can share anything that people want.

Thank You again for this integration.

1 Like

Felix, thank you for pulling this integration together. I have a non-Napoleon fireplace that has the Proflame IFC and remote that I wanted to integrate into homeassistant. I used a couple of different RF remotes like the broadlink and bond attempting to integrate but was intrigued when I saw your project.

I was able to purchase just the Bluetooth module for the Napoleon fireplaces and plug it into the IFC. I downloaded the eFire program for the Apple App Store and it discovered the module and I was able to operate the stove just like it was a Napoleon fireplace.

Seeing that I can control the fireplace with the Bluetooth module my next step was to set up a Bluetooth proxy and then followed your instructions on adding the Bonaparte integration into Homeassistant and now am able to control the fireplace. It works much better than the universal remotes that I was trying.

My next steps will be to make some automation and expose the fireplace to a voice assistant.

Thank you again.

That’s pretty neat! I actually started working on an ESPHome component that directly talks to the ProFlame 2 from a cheap ESP32 (or 8266 if you still use those), cutting out the middleman of the Napoleon controller.
But there’s only so many hours in a day :wink:
At least I took the time to document everything so anyone could do it if they really wanted to: System Information - Bonaparte 0.3.0 documentation