Home Assistant Community

Good gateway and protocol for a custom 433mhz sensor build

#1

Have been using Home Assistant for a few weeks and it’s great.

I have a project at home I’d like to hook into hassio. It’s a soil moisture monitor.

Some parts of the garden I want to monitor are 100 meters from the house. I also want the sensors to last on a battery for as long as possible and came to conclusion I could it do fairly cheaply and with lower power consumption using 433mhz.

I’ve got an Arduino mini built up with an STX822, but having trouble working out best way to receive. I have a sonoff running OMG for my PIR sensors but have realised the Sonoff doesn’t seem to handle sensor values.

What’s the best gateway to hook up to MQTT to receive a sensor value? A lot of the 433mhz libraries just seem to handle trigger messages. (Eg sonoff, RC-switch in OMG)

Would prefer a gateway that is physically separate to the hassio server because I think I need to place it closer to the sensors.

And finally is there a general purpose 433mhz based protocol that I can use to send 3 values in the message eg deviceId: 12, moisture: 1234, battery: 1234

Or should I just be investing a bit more and using something more reliable but still lower power like RFM69 to an OMG gateway, or Lora?

Any tips appreciated.

0 Likes

#2

Is it a Sonoff RF bridge?

For temp/humidity sensors I would suggest RFLink library that currently runs only on ArduinoMEGA. You could connect MEGA to your Hass.io via USB or over Ethernet.

I know that OMG now supports some sensors via Pilight? but it really depends, I tried it with mine and got nothing so had to revert back to RFLink.

Can’t recommend any general-purpose rf protocols/libs, but I’m pretty sure you can ask @1technophile (OMG author) as he might know that.

0 Likes

#3

Thanks for the ideas. Yes it’s a Sonoff RF bridge that I have. I also tried the pilight library in OMG on a esp8266 and also a esp32, but like you, I couldn’t get it to recognise anything. I was able to get OMG working with the standard RF library and have now spotted that RC-switch has a basic sender for single values, so I could use that. Although it arrives on MQTT as a single value payload that has to be decoded somewhere in hassio.

I’ll take a look at RFLink next. Sounds like that might be easiest overall. Thanks

0 Likes

#4

Hello,

I’m not sure that for a 100 meters range 433mhz off the shelfs devices will work, but I’m sure that LORA technology will do the job. But with LORA it will be more difficult to get off the shelf sensors.

If you want to do some test on 433mhz basics protocols with OMG and Pilight, this sensor is working and reporting temperature, humidity and battery

Idealy maybe a
433mhz or BLE -> LORA …LORA ->MQTT
double gateway would do the job, are you interested in such a gateway?

0 Likes

#5

Yes LORA would be interesting - I have some Lora ESP32 boards, and I think I can see how I’d get that working with your new OMG release. Nice update :smile:

I had another go with the 433mhz setup tonight and found your https://github.com/1technophile/low_power_sensor example using rc-switch to send a value. I’ve got that running on a 8mhz 3.3v arduino mini, powered by an 18650 battery. Some quick testing tonight was successful and I was getting just over 100m range through to the Sonoff Bridge running OMG. So I’m thinking that some custom devices built up this way should last a long time on an 18650 battery and perhaps this is best answer. For reference my DIY esp8266 with a SRX882 was only receiving at about 50m, but I’ve realised I’m running that receiver on 3.3v so maybe not a fair comparison .In any case the receiving range of the Sonoff Bridge running OMG seems pretty good, and I’m pleased with potential of that approach.

I like the idea of running something smarter on the sensors and it would be fun to be able to do OTA updates of wireless soil sensors, but maybe a little bit overkill! I could possibly run a POE cable into the garden to run some kind of gateway out there for the sensors. In the end I think the most important thing for me is reliability and battery life in the sensors. If I can get a few years out of them before recharging I’ll be happy! I read somewhere that wifi in particular is a bit of a battery drain for devices that wakeup to send, since the connection time can be a little slow. Putting a Lora transmitter in each sensor (i guess arduino mini + RFM95) would be nice and I’ll have a look at the cost of that before committing to the simpler RF 433 approach.

Thanks again for the ideas.

0 Likes

#6

I’d love to know more details on your test setup if possible - maybe as a separate topic in Share your Project? :wink:

I own a Sonoff RF bridge, but my feeling was its functionality is pretty limited and that’s why it’s currently gathering the dust and in my setup I use Arduino MEGA/RFLink for temperature sensors and Arduino UNO/OMG for PIRs/door contacts/wall switches/remotes etc.
Even though I use SRX882(at 5V) and everything works great, sometimes I lose readings from one of my sensors.
I suspect that’s because it’s one floor up and about 10 metres away from the receiver (it’s an indoor PIR sensor).
That’s why I’m interested in more sensitive/long range alternative.

0 Likes

#7

Woww this is great, and means that you have place for improvments by maybe using better antennas!

Be carefull of rechargeable battery because they have a higher discharge rate compared to non ones.

Simplicity is your friend when building low power sensors :wink:

For your info this one:

is running in a bedroom since november 2016. But I don’t think it has 100 range

0 Likes

#8

Just teasing but regarding the limitations of the sonoff rf bridge I will publish in a few days a blog post of an interesting combination.

0 Likes

#9

Can’t wait, honestly. You’re a star.

0 Likes