How to make use of generic 433Mhz sensors?

thanks. but different gateway, different topic just solve half of the issue. What I worry is the MQTT network/traffic will become congested. if I have 3 different gateways, a sensor trigger might publish to 3 different topics simultaneously. if the house is really busy with multiple occupants and visitors, multiple sensors might trigger at the same time and cause 3 times the load on the MQTT broker.

do you think it will cause the HA to breakdown?

P/S - I am using Superheterodyne 3400 transmitter and receiver kit and this antenna

thats why i am glad that i use mysensors.
the sensors Always connect to 1 gateway and when they cant reach that one they automaticly search for the next gateway.

1 Like

I donā€™t believe this is a problem here if you setup 3 gateways i.e. one for each floor you are right that there is a chance that all 3 will pick up the 433Mhz message from one sensor.

All 3 will publish a MQTT topic on the MQTT broker however the processing of these messages is milliseconds and the messages are very short so only if you have 1000ā€™s of them in a split second you might see a spike in traffic on your network.

So far HA has not yet been involved :slight_smile:

The MQTT broker will only post a message to systems that have subscribed to a topic that is updated. Now all 3 gateway update a different topic and HA will only be subscribed to one of the 3 topics i.e. the topic where you expect the message is received. In other word all sensors on the first floor should be configured in HA using the topics from the first floor gateway and HA will only listen to those topics for those sensors.

So basically HA doesnā€™t get more triggers than if you use only one gateway. There is a bit more traffic on your network and on your MQTT broker but I would not expect that this will tip your system or network over the edge unless you have a couple of 100ā€™s sensors which are triggering every second.

Also the 3 different gateways will pick the 433Mhz signal up at a different time due to distance from the sensor and the fact that sensors send there messages multiple times and the chance that all 3 gateway process it in the same second and put it on the network is small.

I would give it a go as the other solution to hard code it is not so flexible :slight_smile:

3 Likes

Hello,

@ronvl gave a good solution, thanks. To go further Iā€™m thinking about expanding the duplicate signal removal at a multi gateway point of view.

Do you have a recent code version implemented (from this year)? As a first reduction of traffic the last versions of this year removes duplicate of signal.

@masterkenobi the gateway is now able to remove duplicate on a multiple gateways installation see here

Donā€™t hesitate to give feedback

1 Like

That is super awesome. Thanks a lot man.

So do i need to use different topics for each gateways or can i maintain the same topic?

Should work keeping the same topic, for people wanting to differentiate the topics i need to do a little modification.

1 Like

It is great to see you keep on improving the gateway by leaps and bounds. So is the gateway already capable of receiving temperature and humidity data from a 433Mhz thermometer? If yes, may I know which model of thermometer is supported?

1 Like

@masterkenobi Dudeā€¦ seriouslyā€¦ Heā€™s like reading my mind with his jedi mind tricks! :smile: Last night I implemented the grand father clock chimes and he was in that forum teaching meā€¦ I just replaced the batteries in my Oregon Scientific 433mhz temperature and thought hey wouldnā€™t it be nice - found him here 7 minutes prior asking my question! lol

The force works in mysterious way.

1 Like

Not yet, we are lacking an arduino open source library with a wide range of protocol supported.
Nevertheless it is on my mind but it could take a lot of time to spend.

Modification done now the gateway can avoid RF and IR duplicate with a multiple gateway installation even if the first part of the topic 'home" is different between the gateways.

2 Likes

Was looking at the weather station protocolsā€¦ thereā€™s a plethora of them. I think we will have to stick to those that fit the remotesensor library. Maybe we pick a unit and use it because Iā€™m probably the only one on the planet with my modelā€¦ I found the remotesensor library here: https://bitbucket.org/fuzzillogic/433mhzforarduino/wiki/Home

My concern with this library is that it is licensed under GPL, due to this licensing type I cannot include it into my code without changing my current licensing to the restrictive GPL licenseā€¦
Maybe Oregon is a good path to follow, here is some program to test if you have time.
http://www.connectingstuff.net/blog/decodage-protocole-oregon-arduino-1/
If it works I can try to include it into the gateway.

1 Like

Can anyone check what i am doing wrong I am just getting gibberish on serial monitor when nodemcu is connected to computerā€¦


e
i already have mosquito working on HA. I have a working setup of RF using GPIO on rpi using bruh tutorial but trying to get it work using nodemcu.

That usually means that the baud rate is incorrect, you can change it on the button at the bottom of the window, to whatever you set up in the sketch

Thanks got it working but not able to connect to mqtt now.
Attempting MQTT connectionā€¦
failed, rc=
-2

I have put the same settings in userconfig.h as they are on my homeassistant mqtt server.

What does the serial i/f show, does the NodeMCU connect to WIFI OK?

It gives me -

.
.
.
.
WiFi connected
client mqtt not connected, trying to connect
Attempting MQTT connectionā€¦
failed, rc=
-2
try again in 5 seconds
Attempting MQTT connectionā€¦

-2 : MQTT_CONNECT_FAILED - the network connection failed so something is wrong with your mqtt setup, probably the broker address?