433toMQTTto433 Bidirectional Arduino Gateway

Smoke:
http://www.banggood.com/433MHZ-Home-Security-System-Wireless-Smoke-Detector-Fire-Alarm-p-967105.html

For hum and temp they are home made:

I don’t have smoke, just temperature and humidity. I am using (before I found HA) the tags from wireless tags. I’ve had them for a while now. I had to write a Kumo app to post the changes into HA.

http://wirelesstag.net/

I wouldn’t really recommend them. They aren’t much cheaper than some of the zwave solutions (and more than some others).

It was a bit of effort to get them in HA.

1 Like

heys guys, i trying find the solution for my case. and i find this:

I want to control my lamps by a normal switch and home assistant,but i want that HOME ASSISTANT knows what the state of lamps.
by the RF commands, its easy with solution of 1technophile sniffing the codes.
but phisically the home assistant dont knows the real state …if on or off.
anyone have the solution for this case?

i dont want spend much money.

excelent solution and very cheap… your automation is the more cheap of this forum , i like that.
i went to see what you used, and you use arduino, but i can use esp right?
Do you think it is possible to put the images of your blog online? They are offline
I saw that you used openhab but you can do the same tutorial but for the home assistant?

I have ordered some 433Mhz items for use in HA and they are in their way. Some have already arrived. This is what I will have…

15 door/window sensors
6 PIR motion sensors
4 PIR curtain motion sensors
4 weather stations (temperature + humidity)
1 doorbell
1 siren
1 smoke detector
1 gas detector

I have 6 occupants and they are mostly in the house.

I’m wondering too how well will this gateway handle the load. Only time will tell.

@masterkenobi

If you have bought weather stations like a WT450 (ie all in on temp/humidity, not one you make yourself) the station will likely use a Manchester encoding method that is not supported by the RCSwitch library used in the gateway in this thread.

This has been my issue in the past also.

If you want something that can accept more complicated signals (like Manchester encoding), you could look at RFLink, or roll your own - which I have struggled to do myself.

I have built a link between RFLink and MQTT, which can then be used in HASS as MQTT sensors & switches. RFLink needs an arduino mega which becomes a black box of their software, I have added an ESP8266 (NodeMCU in my case) to the arduno to convert the RFLink data to MQTT. See https://community.home-assistant.io/t/project-rflink-to-mqtt-using-esp8266-and-arduino-ide/7131

There is also a component being developed if you want the arduino mega to be physically attached to your HASS device by USB cable. See https://community.home-assistant.io/t/support-for-rflink-gateway/996/40

1 Like

I bought this one…

https://www.aliexpress.com/item/433MHz-Wireless-Weather-Station-Digital-Thermometer-Humidity-Sensor/32590571931.html

Someone said it works with RFXCOM in the review and it is also listed in RFLink : Supported devices list.

I always thought if it works with RFLink, it will work in this gateway too.

Anyway, I hope it will work with this gateway. Otherwise I will consider your solution. Thanks for sharing.

Yes there is several alternatives of rflink bridge to mqtt including this one which seems interesting also

Rflink is interesting for the number of protocols supported and the ability of the developpers to add them. If we had so much protocols with rcswitch it will be great. My main concern with rflink is its blackbox principle, in my case i need to add some logic at arduino level and i can’t as we don’t have access to the code. It s a developper choice that i can understand.

@1technophile , @masterkenobi , @rhodges , @ReneTode

Hello, I think I finally found a solution to my problem.
I await your confirmation if this will or will not work.

As well as on / off by the home assistant.

My doubts are as follows:
When you press the switch, it issues a command Rf to on and issues an Rf command to off?

If so, I think this will solve my problem and so I can replace all my normal switches, and I can always know their state in HA.

that is nothing more then a 433mhz remote with 1, 2 or 3 buttons.

@ReneTode sorry this is the correct link

what do you think the ideia?

the same. just the remote with 1 switch.
you need to buy the reciever seperate.

you also need to realize that you NEVER can be sure with cheep 433 mhz switches. there will Always be moments that hass has another state.

@ReneTode wanted to build the hub mqtt with the esp as it has already been said. This would be the receiver.

Then the idea was to connect this board to my common switch in my house, I would replace it.

The idea was when you pressed the button the hub would pick up the code on and send it by mqtt to the home assistant.

And when I got the code off I would do the same.

But what would be your solution to my case? I want to know the status of the bulbs always in the home assistant even if it has some delay

the link you gave is just the switch, without the board.

and with all 433 mhz you need to realize that if there is some kind of interference (from other devices, the weather, or anything else), it could happen that your esp doesnt recieve the code. and then hass is in another state.

@ReneTode ok i understand you.
Can you suggest another solution but cheap for my case?

Have a look at the sonoff relays.

It is a relay controlled by WIFI.

You can reprogram them to be controlled by MQTT - then they will report their state to HASS (ie they are a true 2-way communication device). See https://community.home-assistant.io/t/sonoff-homeassistant-alternative-firmware-for-sonoff-switches-for-use-with-mqtt-ha/2332

Only around $10 each!

@phileep yes. I had seen that.
Its cool but the module is too big…does not fit inside in my common standard switch…but yes is one alternative.
I waiting for more people trying to help me to find a good solution.

If you want to use 433Mhz you won’t find a good solution. The OOK https://en.wikipedia.org/wiki/On-off_keying protocol is very basic and there’s no error correction, missed packet re-sending etc like there is in WiFi. Was never designed for 2 way communication although I have seen it used that way. Even then it’s not very good and messages can be missed very easily because of the way the data is sent.

You’re are going to have to wait a long time if you want a good tiny module that’s either Zigbee, or Z-Wave or whatever protocol that’s also cheap. That’s why Sonoff’s are such good value.

Good luck

And for the record, I have 433Mhz switches here that I use. My gateway fools HA and delivers an ON and OFF state but switches can miss their transmission and won’t turn ON or OFF so can get out of sync. I have a hanfull of RF switches still working mainly for lamps and devices where it doesn’t matter. For anything else I use all Sonoff’s on MQTT.

@KmanOz OK. I was enlightened and I will even forget it. I’ll try to follow your advice and install the sonoff so I’d like you to tell me how to hook up a physical button on it. Is there any solution to this? Or replace my common switch. Do you have your sonoff inside the wall? Can you get a photo of your installation?

I have sonoffs “in the roof”

I have left my light switches alone and added the sonoff close to the light fitting in line with the cable to the light.

This means that you can always override the sonoff and turn off the light (and the sonoff). This means you cannot turn it back on with HASS.

I also have the sonoffs set to turn on as soon as they are powered up (ie the switch is turned on).

This all makes for a good WAF! No fiddling with web pages etc, just turn it on or off if that is requrired. This is also good as a safety override. 2 of my sonoffs are currently not talking to my network (due to wireless router issues, not the sonoffs). I can still operate them like a normal light until I get it working.

Anyway - this is getting off topic, but check out the other threads