Multiple sensors over wifi?



  • I would like the following sensors on an arduino (arduino-like) board to my database (InfluxDB). I need to communicate over WIFI (over my personal WPA protected network).

    I've seen some projects that use ESP8266 but very few addressed connecting via WPA and even less were easy for a newbie. I also would like the following sensors to send data over wifi:

    • light
    • motion
    • temp
    • humidity
    • sound
    • voc
    • pm25

    I'm thinking of trying a Arduino UNO Wifi REV2 which I assume will make my wifi needs easier and will be able to support all these sensors. Is this a good option for a newbie? Are there other options? Hopefully the question isn't too naive.

    Thanks!


  • Mod

    Welcome to the MySensors forum @jo34l5

    MySensors is designed for use cases where wifi is unavailable, too power consuming, not sufficiently reliable or too expensive.

    MySensors is probably not a solution to your use case.



  • Ooops..very sorry for not noticing the obvious.
    Thanks for your help.



  • If you think that ESP8266 is not easy for a newbie, I don't think you are ready for MySensors yet. πŸ˜‰

    In fact, if you want Wi-Fi, and homeade sensors, ESP8266 would be the direction I would advise you to look, and especially at aftermarket firmwares like Tasmota, ESPEasy, etc...

    MySensors is for when you don't want to use Wi-Fi (as Mikael already pointed out) or when you outgrow those other solutions and need something even more custom to your needs.



  • thanks TRS. Yes I don't find it newbie friendly. Especially compared to a arduino uno WIFI version. If you know of a simple guide that does work for newbies, please do send it my way. I get the impression that everyone on here is a electronics nerd, and what is 'newbie friendly' for you all isn't for those that arn't. Here's a smattering of guides:

    Some guides say I need to program, some say I need AT commands, some say I need additional hardware ... AGGG. This is DEFINTELY, DEFINITELY not as straightforward as the 10 minute Arduino guides of getting a simple sensor working.

    Are you aware of a simple, step-by-step guide of sending ANY packet from my arduino over WPA to a specific IP:PORT on my network? Something that is step-by-step (I.e. plug in these wires here, paste this code here). I can't find anything easy for newbies.


  • Hero Member

    @jo34l5 said in Multiple sensors over wifi?:

    Are you aware of a simple, step-by-step guide of sending ANY packet from my arduino over WPA to a specific IP:PORT on my network? Something that is step-by-step (I.e. plug in these wires here, paste this code here). I can't find anything easy for newbies.

    Yes, the protocol you probably want is ESP NOW. Here is some step-by-step: https://randomnerdtutorials.com/esp-now-esp8266-nodemcu-arduino-ide/ There is also ESP NOW for for ESP32's, and the new ESP32-S2 reportedly can use WIFI in a much more power efficient way than earlier versions. If I remember correctly, ESP NOW also allows you to use the ESP wifi radio in what might loosely be called a "proprietary mode" for point-to-point communications. i.e. you no longer need to send packets through a wifi router unless you want to, and so the potential exists to save a lot of energy that would otherwise be wasted being a slave to the IEEE 802.11 standards (e.g. constantly pinging the router every 100ms to let it know your node is alive and in-range or else the router will cancel your connection and your node must then go through a slow and lengthy TCP/IP authorization exchange each time it wants to establsih a connection).



  • Thanks for the reply @NeverDie. So to get all sensor data into my computing infrastructure I need some kind of hub/receiver/something to get this data to my server to do work on it. Currently I was thinking just to use the router as that entrypoint. It was the most straightfoward way once I have the IP:PORT of my influxdb I'm off to the races.

    The more I learn about MySensor and what you posted with ESPNOW the more I'm wondering if I should do a lower-power non-wifi mesh-type network. This would mean I would need to build some hardware at the server to receive data from all my sensors. The pros/cons I currently see are:

    WIFI PRO:

    • easy to get up and running (I already have an Uno WIFI logged into my network; just need to push packets to influxdb)
    • existing infrastructure - I don't have to worry about building yet ANOTHER wireless network (on top of my wifi, zwave/zigbee)

    WIFI CON:

    • reliability? I had some wifi bulbs that were horrible. I am a little worried that it woudln't be as reliable, but I'm more confident in a DIY/Arduino solution

    NEW MESH ( mysensors or ESPNOW) CONS

    • I do worry that I will need enough nodes to have decent communication and signal strength back to my server endpoint
    • I'm worried about the latency (but maybe it's actually faster)

    NEW MESH (mysensors or ESPNOW) PROS

    • the low power option would allow me to hook up batteries to sensors if necessary. I don't have the need as I'm planning to plug in all my sensors to continuous power, but it would be nice to have the option.

    All this is to say: thanks for the link. It's not really showing me how to get into my current WPA protected network like a standard wifi device, but it's a good newbie-friendly guide if I buy those modules and it's helping me thinking more broadly. Thanks!


  • Hero Member

    @jo34l5 Probbly the biggest knock against ESP's is their sleep power cosumption and, to a lesser degree, a smaller number of GPIO pins on an ESP8266. Even the new ESP32-S2 will consume more power than than a typical mysensors mote. In your case, though, you plan for your nodes to be mains powered, so relative power consumption isn't likely to matter much. There exist quite a large number of mysensors nodes that can run for 10 years or more on a set of batteries, and for a lot of people that's part of their appeal: you can put them just about anywhere. And in terms of range and coverage, nothing beats LoRa for low datarate sensor traffic.



  • Recently came across this here: https://github.com/saghonfly/shrdzm/wiki. Seems to be an ESPNOW-based solution (MQTT-GW is also available).
    Did no testing on that at all (I'm more tending to use wires/RS485 for homebrew stuff πŸ˜„ ), but if you are insisting in using these nasty Espressif-mcu's, this might be intresting...



  • @jo34l5,

    Maybe check out Dr. Zs on YouTube. His channel seems geared more to non-techies. He is big into Sonoff / Tasmota stuff, etc. which nowadays are pretty easy (you can flash them OTA, no more need of soldering).

    Having said that, the more you learn, the more options open up to you. Also you will pick up more and more of the stuff over time, no need to rush. Take your time and treat it as a hobby. It took me literally years to get where I am now, I finally got some certain things working that I had wanted to for a long time. But my skills (and parts inventory, etc.) was not up to par yet. Well, now it is.

    Another thing to consider, architecturally, is there are couple ways to tie together even otherwise disparate systems. In other words. no need to "commit" to any particular system. Here at Casa de TRS-80 we are using 433mhz, MySensors, as well as some Wi-Fi outlets, etc...

    There are a couple different ways to do that. Either in your controller, and/or with some intermediate messaging protocol like MQTT. MQTT is rapidly becoming something like the middle "glue" layer between disparate systems. Lots of things talk MQTT nowadays.

    Anyway that way you can mix and match. I bought some Wi-Fi plugs and 433mhz stuff to "get started" and get a few things working, but now I am getting better with MySensors and more "advanced" stuff... Just a thought!


Log in to reply
 

Suggested Topics

  • 4
  • 17
  • 15
  • 4
  • 20
  • 2

71
Online

11.4k
Users

11.1k
Topics

112.7k
Posts