Hi
I am hoping somebody may be able to point me in the right direction I am trying to control my MCZ stove through home assistant using the RFX433XL transceiver as a substitute for the existing remote control.
I have added the RFX433XL to Homeassistant as
rfxtrx:
device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO4IK39E-if00-port0
It is now listed under Integrations
however the remote control is a quite sophisticated device with the ability to turn on, turn off, change fan speeds and select varied modes and flame ferocity.
I don’t know how to set these things up on my existing home automation system.
Has any one by any chance installed one of these stoves using the RFXcom device.
and can point me in the right direction or even share there configuration I would be very grateful.
Thanks in advance
Chris
You could start with adding debug: true
to home assistant configuration under rfxtrx
and check the logs what happens when you press buttons on an existing remote (assuming you have one). If you could post the log output that would help a lot.
Well I have had a bit of a struggle with this it exists as an Entity , I can get rfxtrx.send to send event: 0b11009e00e6116202020070
in Services.
I now have:
rfxtrx:
#device: /dev/ttyUSB1
device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO4IK39E-if00-port0
debug: true
automatic_add: true
in my configuration.yaml.
Despite this nothing appears in my home-assistant.log when my remote is used!
however using Portainer to view Docker homeassistant container logs shows this.
RFXTRX: Recv: 0x0c 0x43 0x00 0x01 0xba 0xb3 0x02 0x01 0x02 0x63 0x03 0x02 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x02 0xba 0xb3 0x02 0x01 0x02 0x63 0x04 0x01 0x98
RFXTRX: Recv: 0x0c 0x43 0x00 0x03 0xba 0xb3 0x02 0x01 0x03 0x63 0x04 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x04 0xba 0xb3 0x02 0x01 0x04 0x63 0x04 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x05 0xba 0xb3 0x02 0x01 0x05 0x63 0x04 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x06 0xba 0xb3 0x02 0x01 0x06 0x63 0x04 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x07 0xba 0xb3 0x02 0x01 0x05 0x63 0x04 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x08 0xba 0xb3 0x02 0x01 0x04 0x63 0x04 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x09 0xba 0xb3 0x02 0x01 0x04 0x63 0x03 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x0a 0xba 0xb3 0x02 0x01 0x04 0x63 0x02 0x01 0x88
RFXTRX: Recv: 0x0c 0x43 0x00 0x0b 0xba 0xb3 0x02 0x01 0x04 0x63 0x01 0x01 0x88`
updating a line when a button is pressed, so it is being heard, however homeassistant seems unaware.
I can decode these, I believe :
0x0c 0x43 0x00 0x0b 0xba 0xb3 0x02 0x01 0x04 0x63 0x01 0x01 0x88
should become
0xBAB3020104830101
0xBAB302 is a unit code attached to all packets sent from this remote.
The stove I am trying to control is quite a complex piece of kit and I think the information it is being sent is more complex than on/off or up/down. it has a screen so it is displaying its current setting which changes on a button press so I suspect it is being sent its entire new state.
Using the RFXMngr windows software it will display this sort of thing
21/09/2020 04:06:17:035= 0C430001BAB302010363040181
Packettype = Thermostat4
subtype = MCZ pellet stove 1 fan model
Sequence nbr = 1
ID = 0xBAB302 decimal:12235522
Beep = Yes
Fan1 speed = 3
Flame power = 4
Command = Manual
Signal level = 8 -56dBm
a few key presses will change everything and display:
21/09/2020 03:30:42:963= 0C430001BAB302000463040378
Packettype = Thermostat4
subtype = MCZ pellet stove 1 fan model
Sequence nbr = 1
ID = 0xBAB302 decimal:12235522
Beep = No
Fan1 speed = 4
Flame power = 4
Command = Eco
Signal level = 7 -64dBm
I am running on an Ubuntu server with Docker.
Help please
Chris
The packet (Thermostat4) is not implemented in the underlying library and thus not mapped to Home Assistant. If you want to control this from Home Assistant, first it needs to be implemented in pyRFXtrx (https://github.com/Danielhiversen/pyRFXtrx) and then an attempt can be made to map it to Home Assistant.
The code is not all that complex. It seems to be something like:
[packet_length=0C][packet_type=43][pack_subtype=00][sequence_nbr=01][id=BAB302][beep=00/01][fan1_speed=03/04/..][flame_power=04/..][command=01/02/03/..][signal_level]
Basically it sends the following data in one go:
ID
Beep
Fan1 speed
Flame power
Command
Signal level
Thanks I will look into pyRFTXtrx and your breakdown of the code is encouraging and I will keep at it.
Maybe some more hints:
packet_length = 0C
packet_type = 43
pack_subtype = 00=1fan / 01=2fan / 02=3fan
sequence_nbr = 01
id = BAB302
beep = 00=off / 01=on
fan1_speed = 00-05 / 06=Auto
fan2/3_speed = XY (X=fan2, Y=fan3)
flame_power = 01-04?
command = 00=off / 01=manual / 02=auto / 03=eco
signal_level = 7X / 8X (ignore last 4 bits)
Instead of adjusting pyRFXtrx, you could try:
- Send raw commands with the rfxtrx.send service in Home Assistant
- Use Node-Red with RFXCom package to try your luck there.
I have to say, I’m not even sure whether things like command or flame power map to a useful entity. None of the entity models really seems to fit here.
I use the rfxtrx.send command with the codes that I captured with the Windows RFXmanager for controlling my fireplace. Works perfect.
Just a script example below.
fireplace_on:
alias: Fireplace on
icon: mdi:fireplace
mode: single
sequence:
- data:
event: 0842012D01057B0100
service: rfxtrx.send
Thanks a lot for the information this really gives me something to work with.
Chris
Hi, ma parents also have an MCZ stove, older series, without ability to make it smart
Now, i was looking for a broadlink device, but after googling, seems the MCZ remote works on 434,5, and seems broadlink only supports 433
Does that RFXcom device work for you? does it also work standalone without HA? i dotn want to setup HA there, just for controlling the stove
feedback is appreciated
Hi The Rfxcom does indeed work but I need to have the HA integration setup it is a dumb device only sending on that which is sent to it I still haven’t managed to get a working setup created to have HA do everything is pretty complex as it is quite an involved process I was wondering if just using off and on and leaving the remote control so it thinks the stove is permanently on. I don’t know if that would work and I have been waiting until the stove was being used to have a play it might be that the commands from the remote might switch a stove on even though it has been turned off by an HA automation
I realized that trying to create a HA control much more sophisticated than on and off was beyond my capabilities. I was sent some code that a gentleman on an Italian pellet stove forum named Leonardo created which is interesting. but I haven’t been able to do anything useful with it . sorry I wish I could be of mere help
Ok, thnx for feedback…
I was also reading now about the sonoff RF bridge, should be easy to use and to learn commands , and much cheaper and works I think standalone…
Only not sure if if supports 434,5 too , in manual I only see 433
I don’t believe it works on that frequency I have one running tasmota which I use to receive from a pir in my bathroom and then turn on a Sonoff mini controlling the bathroom light
Hmm , that’s too bad
I just tried to see if the stove would stay off if it missed the original on instruction and what happens is that when the remote control sends its subsequent commands which it does automatically that is seen as instruction to light the stove.
So my idea of leaving the remote thinking the stove was on and then turning the stove on and of with the RFXTRX and HA is not going to work and one would need to recreate the entire remote control in HA and take the batteries out of the existing remote.
One could wire the button on the remote that switches the stove on and off to a wireless controlled relay or transistor and control that via MQTT and HA it would need to close for a few seconds and then open to recreate the key press on the remote via an automation but it could then be turned on and off via temperature sensors ,time switches ,calendar ,proximity automations or by pressing a button on the remote phone app
I might have my work cut out convincing the powers that be that cannibalising the stoves remote control was going to be a boon to existence. but you can buy replacement remotes to work with.
hmm, i think an TADO option is the best choice , it connects to the serial port of the MCZ
Hello Christoper, I created the code you talk about… If you need a help using it or to understand how protocol works, just ask I’ll try to help tou
cheers, Leo
PS: sorry for replying so late but I don’t use HA but Domoticz, so I never navigate on this Forum, just find your post looking for more info
I am curious, has anyone made any progress on this topic?
I am interested in your code, where can I find it?
Edit: i think I found it:
https://www.domoticz.com/forum/viewtopic.php?p=292724&hilit=Pellet#p292724
BYTE 1 packetlength;
BYTE 2 packettype;
BYTE 3 subtype;
BYTE 4 seqnbr;
BYTE 5 unitcode1;
BYTE 6 unitcode2;
BYTE 7 unitcode3;
BYTE 8 beep;
BYTE 9 fan1_speed;
BYTE 10 fan2_speed: 4;
BYTE 11 fan3_speed: 4;
BYTE 12 flame_power;
BYTE 13 mode;
packetlength: Packet length (this byte not included) = 0x0C
packettype: 0x43 = thermostat4
subtype: 0x00 = MCZ 1 fan model 0x01 = MCZ 2 fan model 0x02 = MCZ 3 fan model
seqnbr: Sequence number. This field contains a sequence number from 0x00 to 0xFF.
unitcode1 to unitcode3: unitcode = 0x01 to 0xFFFFFF
beep: 0 = no beep (used for repeated commands without beep) 1 = beep (used for the first command send with beep)
fan1_speed: 0 to 6 (6 is Auto)
fan2_speed: 0 to 6 (6 is Auto)
fan3_speed: 0 to 6 (6 is Auto)
flame_power: 1 to 5
mode: 0x0=Off 0x1=Manual 0x2=Auto 0x3=Eco
#!/bin/bash
# Counter routine (Sequence)
if [ -e /tmp/mcz.seq ] ; then
read cnt < /tmp/mcz.seq
else
cnt=0
fi
if [ $(($cnt)) -gt 255 ] ; then cnt=0; fi
SQ=`printf '%x' $cnt`
if [ ${#SQ} = 1 ] ; then SQ="0$SQ" ; fi
PL="0c" # PacketLength Don't modify
PT="43" # Packet Type 43 (thermostat4=MCZ) Don't modify
ST="01" # SubType: 00=1FAN 01=2FAN 02=3FAN Set your type
#SQ=Counter # Sequence Number 00-FF Automatically calculated
ID=aabbcc # U1+U2+U3: ID Stove Set your ID
BE=01 # Beep Up to you
# ARGUMENTS
#F1=FAN1 # 0-6 (6=auto)
#F2=FAN2 # 0-6 (6=auto)
#F3=FAN3 # 0-6 (6=auto)
#PP=PELLET # 1-5
#M=MODE # 0=off 1=manual 2=auto 3=eco
while getopts f:g:h:p:m: option
do
case "${option}"
in
f)F1=0$((${OPTARG}));;
g)F2=0$((${OPTARG}));;
h)F3=0$((${OPTARG}));;
p)PP=0$((${OPTARG}));;
m)MODE=${OPTARG}
case "$MODE" in
auto)
M="02"
;;
on)
M="01"
;;
off)
M="00"
;;
eco)
M="03"
;;
esac
;;
esac
done
echo "SQ : $SQ"
echo "fan1 : $F1"
echo "fan2 : $F2"
echo "fan3 : $F3"
echo "pellet : $PP"
echo "mode : $M ($MODE)"
STRING="$PL$PT$ST$SQ$ID$BE$F1$F2$F3$PP$M"
echo $STRING
# send command
echo $STRING | jpnevulator -w -t /dev/ttyUSB0
# update counter
(( cnt ++ ))
echo $cnt > /tmp/mcz.seq
I’ve got it working. This is my automation code for a single fan mcz stove (tested on mcz cute)
Use a counter helper with range 0-255
Use at your own risk