433toMQTTto433 Bidirectional Arduino Gateway

@ReneTode i already saw that vídeo, but that uses mysensors, i would like only use one ESP8266 with mqtt under my bed. because i dont want to build other gateway to use mysensors.

i think if i use this code:

it Works, what do you think.
Sorry off topic. i will open a new post on PROJECTS

with mysensors you dont need an extra gateway if you use an esp8266.
an esp with mysensors protocol can talk directly over wifi to HA.

its even faster and more reliable because you dont have a mqtt server between your sensor and HA.

1 Like

So if I build a mysensor on a esp8266 I don’t need a mysensor gateway to link it to Hass?

Something like this…

2 Likes

indeed. a mysensors on an ESP8266 can be a wifi gateway itselve and at the same time be a sensor.
so every ESP can be its own gateway, but every second ESP or arduino can also connect to a gateway.

1 Like

Thank you for the clarification! That’s actually very interesting. In that case does the sensor still need a nf24 radio?

it does.

it cant function as a mysensors without a radio. (allthough that a gateway with sensors actually could function without a radio, but then you need to alter the base library from mysensors)
the radio is 1 of the baseparts from mysensors.
but they are cheap, and unless you want to connect a lot of sensors, mostly the radio is not an annoying part.

1 Like

@ReneTode So, i can build any sensor/actuator exemple: door sensor, gas detector, etc etc, only with esp8266/nodemcu without RADIO?

no with mysensors you need to connect a radio (or you need to go deeply into the mysensors libraries to cut them out)
but the radio is obsolete when you use it as gateway with sensors.
so the radio doesnt need to do anything (its just there to listen if other mysensors are talking to it)

1 Like

got it. I’m glad I did not have to build a new gateway, and only use a nodemcu + radio + sensor. I will buy the components to do the bed occupancy, if I have doubts how to connect it with the HA, I ask for your help.

on the mysensors component page is shown how, but it cant be more easy.
on the mysensors.org you can find how to code a wifi gateway (and how to connect sensors to that)

Hello,

In fact you don t need a nodemcu to do this sensor, an arduino nano or uno with a 433mhz emitter will do the job. My advise is to avoid nodemcu for end sensor as they draw too much power. The communications would be the following, nano —> (433mhz) --> openmqttgateway --> (mqtt) --> home assistant
If you prefer nodemcu you can directly connect it by mqtt with wifi no need of 2.4ghz if your chair is covered by wifi.

with a nodemcu there is no need for mqtt

nodemcu --> (wifi) --> home assistant

I like your solution too, did you have any tutorial how to do it?

Right not compulsory. Just an advice to add mqtt as an intermediary between controller and devices.

What is the sensor hardware that you are planning to use ? Ps i think we are going off topic maybe it would be better to initiate a thread about occupancy sensor

The radio is not needed for mysensors if the gateway should only host local sensors/actuators. In mysensors version 2.x it’s very easy to configure the gateway to not try to use a radio. You just leave out the defines that mentions a radio in your gateway sketch. That’s usually one line of code (less).

thx, didnt know it was possible that way now.
will try that out in the next gateway.

1 Like

i think you better start a new topic for that. because it will be quite off topic.
write my name in it and i will find it quickly

1 Like

Hello,

It is possible to use an arduino with dht sensor (like weather station) and send the data over RF to the gateway?

I already have an gateway (nodemcu) that receive the RF signal from motion sensor.

Thank´s