You may need to read up a bit on how MQTT works but you only need one broker (ie mosquitto installed on one pi only, probably the one with HA running).
What you’ll need to do is write some type of mqtt client program to run on the RF receiving Pi to publish MQTT messages when an RF signal is detected. Not easy stuff.
@Tinkerer the Pi will be replaced bij a arduino or ESP8266 device. So i thought i could do it only with MQTT
@flamingm0e Is it that simple? I just need to use MQTT more i think. But i will need to make a script of some sort to make the 2nd Pi send the MQTT message?
@marthocoo Ok. the Pi with HA does have Mosquito installed. I see a lot of stuf about ESP8266 and arduinos used for the purpose i want to use it for, the problem is my Arduino hasn’t arrived yet so i though maby i can practice with the Pi until it arrives.
Yeah. An MQTT broker by itself doesn’t talk directly to hardware or anything. It’s just a message queue. You need to write your script to publish to a mqtt broker. It’s very very easy to do in Python, but if you’re going to put in an esp chip, the code will be completely different than the pi.