433toMQTTto433 Bidirectional Arduino Gateway

@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

Dude read the contents of the thread. All your answers are in there. I think we’ve diverted this one too far off topic.

1 Like

@Rodolfo_Vieira This might have been answered (I’m catching up on my reading). The 433 Mhz technology that we are using is not “smart” which means that it can’t be “asked” for what state it is in. All it has is an on and off command. The 433toMQTTto433 gateway will also listen to the 433 Mhz for physical remotes that send the codes and this tells Home Assistant to change the state. For me, this keeps pretty accurate - I’d say 95% of the time. What helped tremendously was adding an antenna to the receiver. Usually, I’m changing my config so often it’s my fault when it is out of synch. Hope this helps.

I created another forum topic for us all to post the many devices this gateway can control. Please add the devices you use with this gateway there. Thanks!

https://community.home-assistant.io/t/433tomqttto433-gateway-device-list/7819

1 Like

@masterkenobi news about that?
Station weather rf?

Not yet receive

@Partybug can you tell me if you use a expensive emitter/receive 433 module?
I have readed that heretodyne modules is a good choice.
Whats do you use? Cheaper? Other question…whats the maxium distance you can control it?

@Rodolfo_Vieira I use the cheaper emitter/receive modules. I do have to place a 17.2cm bread tie (I had to look them up - official name is “twist tie” according to wikipedia) on them for an antenna. I still haven’t soldered them in place yet but I twisted them on tight and they don’t move. I also used a bread board wire for an antenna.

I have a driveway alert motion detector… guessing it’s over 100 feet to my front door. Another 100 feet from my front door to the receiver (if straight through doors/walls etc). About 200 feet is pretty far. Without the antenna they don’t work well at all.

Hi

I have a similar set up to yours and thanks to you for sorting the MQTT part. I was wondering if I can add a brightness_scale to my MQTT and if it can be configured using IR codes?

I am controlling a dimmer light switch which is controlled by an IR LED with codes for the levels of brightness.

I have the IR codes for various brightness levels and was wondering if I could use the brightness_scale to turn on and off the lights and adjust their brightness all in one?