Gas fireplace (Mertik Maxitrol) with rfxtrx

I also have the WiFi module. I asked Mertik about the protocol, but they referred my to the producer of the fireplace?! The I reverseved engineered the android app, but I could see how the actual communication is done.
(https://apkpure.com/myfire/com.iqontrol.mertik)

Any ideas on how to approach this?

Will the WiFi module offer more functionality or performance to HA than the radio version does?

May be this link helps some of you getting rfxtrx working on ghe Mertik Fireplace:

This is an old thread but I found it as I was researching automating my fireplace. I don’t have a Mertik but I have a Valor which appears to use the same Wifi module as Mertik.

I’ve been meaning to attempt to reverse engineer the protocol used for the Wifi app but haven’t been able to spend the time yet. I was able to get a network capture on from my phone while I was using the app. I wasn’t able to easily and quickly decipher the data so I put the project on hold.

Since then I’ve learned a little more. My guess (haven’t verified this yet) is that the app simply sends the same commands as the RF remote but wrapped in TCP. I’d have to do another capture and verify this assumption but if it’s true it should be pretty easy to code something up.

I’ll get around to doing this sometime but if anyone is still interested in working on this and gets to it before I do I could share a network capture.

Hello,

For what it’s worth, I too am about to try to do this with a valor fireplace so any updates or findings in getting this to work would be awesome! My initial approach was going to be to try to capture the codes using an ardunio and a receiver and try to use esphome to build a second remote, but I also admittedly don’t really know what I’m doing…

While searching to see if there was an HA integration I happened across this thread but also this GitHub repo which seems to have done at least something toward getting a working solution with the WiFi module with Homey.

Not much more to add than that unfortunately. Maybe the above helps someone to put something together for the WiFi module.

Did anyone came up with working solution ? My idea was to replace this wifi module of mertik maxitrol with esp32.

I got the source code from apkpure.When i try to run the app in Android studio, it always shows error in String str = BuildConfig.FLAVOR;
^
symbol: variable FLAVOR
location: class BuildConfig

if anyone has any guide in replacing this wifi module, please write. :pray: I have been struggling with this for two weeks, and i have to complete this task. :weary:

Did you find anything? i have the protocol.

I have not worked on this topic since my last post. But with the informtion from the project Lewis linked to, I believe I can convert it to a HA integration component. Give me some days, and I examine if the connection is successful

I also did exactly as you did. converted apk to source code. But there is always this bulid.config error.

I have the esp board, i have to replace the wifimodule of mertik maxitrol to esp. I have the protocol. But i dont know how to do this task.

This app is only connected to the wifi box of maxitrol and not to esp(because of the protocol). Or how do i program this esp that it is getting connected to app and control the fireplace. Really need help. IT HAS BEEN THREE WEEKS WITH THIS STUFF :sob:

do you know how to connect the mertik maxitrol fireapp to esp.

The app needs an access point similar to the wifi module they have provided. If i can program the esp into access point, then the app can establish connection to the esp. But now, this is not possible, since there is a protocol between the two(myfireapp and maxitrol wifi module). Please help if you have time.

did you complete this task? please let me know

Yes I have it working with RFXtrx integration in Home Assistant. See Gas fireplace (Mertik Maxitrol) with rfxtrx - #13 by cmartens for an example

did you have the protocol?

i have the protocol. The thing is i have to replace this wifi module of mertik maxitrol with esp32. Making the esp32 in accesspoint mode(similar like the wifimodule of mertik maxitrol.)
Connection between the app and the esp should be established. :sweat:
I have tried to reverse engineer the app with the apk file, but i cannot run the apk file in android studio due to this bulidconfig.flavor error. I got original source code with the help of jadx program.Please let me know how i can proceed.

Why do you want to replace the Wi-Fi module with a esp?

Also, please share the protocol

I have to use esp instead of maxitrol wifi module.There is large list of protocol. I will attach the sample here. Please let me know if this can be used in someway.

General command structure:
[STX][RequestID][Flags][Command][Data][ETX]
[STX] : 0x02 start of text (binary)
[RequestID] : 4 Bytes (*2 ASCII char)
[Flags] : 1 Byte (*2 ASCII char)
- 0b10000000 : Request if set, else Response/Event
- 0b00100000 : Synchronize (no DestinationID needed)
- 0b00000001 : Direct Access to Receiver if set
[Command] : 1 Byte (*2 ASCII char)
[ETX] : 0x03 end of text (binary)

Thermostatic App to Wifi-Box
Request: [STX][…][80][B2][Control][SetTemperature][ETX]
Response: [STX][…][00][B2][State][SetTemperature][CurrentTemp.][ETX]

[Control]: 0: Disable; 1: Enable;
0xFD: Set&Enable; 0xFE: Set; 0xFF: Read 1 Byte
[State]: 0: Disable; 1: Enable 1 Byte
[SetTemperature]: in 0.1°C 2 Byte
[CurrentTemp.]: in 0.1°C 2 Byte

And why do you need to replace it with esp?

I am connected to the Wi-Fi module and will release the integration in a weeks time. You will need to emulate the wifi module behaviors in esp to use my new integration

I don’t have the expensive wifi module thus my only solution is also an esp32 to emulate it… still looking for a solution as its not completely working

esp as it is cheap and esp32 s3 box module also has AI integration.

When you reversed engineered the apk file, are you able to build and run the app in the android studio emulator? when i tried to do it, i always got the error build.config.flavor, so i was not able to proceed with it.

I am converting the Homey project to a Home Assistant integration - therefore I don’t need to work with the MyFire app. If you create a program for the esp that emulates the Wi-Fi box, my integration works for you too. It is basically just a socket on port 2000, where bytes are received. The protocol can be seen in the Homey project. I don’t know how the Wi-Fi box communicate with the Mertik fireplace module - maybe just simple on/off switches?

1 Like