|
Post by papa on Aug 30, 2017 16:05:51 GMT
OpenHAB Home Automation Overview - RFM69 AND ESPxxxx AND Ethernet AND RFM95This DIY Home Automation forum was founded to further what began in the Uber Home Automation Instructable that inspired many of us. However, to avoid confusion, I urge you to hold on to the Uber vision, but set aside the Uber Instructable's details for accomplishing that vision & use this forum's more reliable approach. Some parts (especially at the beginning) are hard enough without your being confused by similar, but significantly different approaches. After you have more experience, you can return to the Uber Instructable for still useful nuggets, like how some sensors work.The Home Automation project that is documented this forum can use RFM69 or RFM95 radio communication or ESP82xx (ESP8266 or ESP8285) WiFi communication or wired Ethernet communication OR all three. I especially find value in both the RFM radio approach & the ESP82xx or ESP32 approach. I plan to support & encourage both approaches. Via text & images, this thread will give an overview. From my observations, I will also compare & contrast RFM69 devices & ESP82xx devices & where they might work best. Web links (light blue text) in the following text point to more information. Using RFM69 devices or ESP82xx devices in this forum's approach requires installing OpenHAB & embedded MQTT Broker on a local network connected computer. Both the ESP82xx (with some preparation) devices & Arduino with RFM69 radio can be programmed & can show debugging info via the Arduino IDE program. A preview of my recommendations: ESP82xx devices with a case, built-in power supply, & relay are most ideal for controlling AC appliances. They often do NOT offer much in the way of pins or safe access to attach sensors. Exception: For the Sonoff-TH, one can plug in (via a cable) an air temperature & humidity sensor OR a liquid temperature sensor. I recommend Arduino compatible/RFM69 radio devices to hold sensors or to control low voltage DC appliances. I prefer the Buono Uno Arduino compatible or compatibles that can be purchased with installed RFM69 radios (the Miniwireless or the Moteino). To avoid damaging the RFM69 radios, one must use Arduino compatibles that can send only 3.3 volts through most of their pins (like Buono Uno, Miniwireless, & Moteino) . These low voltage devices do not necessarily require cases unless for harsh conditions. Compared to encased ESP82xx devices, Arduino compatibles have many more input/output pins for connecting sensors. A relay to control DC appliances can be attached to an Arduino compatible, but I do not know any ESP82xx devices that control DC appliances. One more recommendation: To build nodes with both sensors & a relay to power AC "appliances:" First, commit to enclose everything with a protective project box. Second, I recommend an RFM69 node built on a Buono Uno Arduino compatible that can control AC with a solid state relay AND can handle more than one sensor. See this project for an example. Be careful to enclose the project (especially the solid state relay & connections to mains voltage) in a protective box. (For the most part, I believe encased ESP82xx devices can only handle adding one single-purpose sensor. The exception I know is a DHT temperature & humidity sensor.) An Added recommendation: Beginners & others might like to try the newly available Ethernet Node. See this post below. The following posts will give details behind my recommendations.
|
|
|
Post by papa on Aug 31, 2017 19:00:14 GMT
One more recommendation: Where should a DIY Home Automation newcomer start, RFM69 radio devices or ESP82xx WiFi devices? I started with RFM69 because that's all there was here when I began. This forum has more documentation on using RFM69 radio devices, but several ESP8266 projects are also available. From my experience with beginners & from other experienced members' recommendations, a newcomer should probably begin with ESP82xx devices. I recommend especially (so far) the Itead company's Sonoff products (see more details later in this post). Reasons for this recommendation: If you have a WiFi router & network, (for hardware) you only need one ESP82xx device to start. Unlike with RFM69s, you do NOT need to build an Arduino gateway AND an Arduino node & get them to communicate (a challenging first step). Unlike with RFM69 radios (unless you buy them preinstalled on a Miniwireless or Moteino), (so far) with the ESP82xx products at the end of this post, you need little or no soldering. First time reprogramming ESP82xx devices requires a physical connection, but after that you can reprogram them over WiFi. You can get experience & success using the ESP82xx device with OpenHAB to turn an AC appliance off & on via the device's push button, a virtual switch on browser User Interface, a virtual switch on a mobile device app, or timed by OpenHAB programming. Again I recommend you start this forum's DIY Home Automation with ESP82xx devices (especially Itead) because you're most likely to get a good start & experience. However, I also recommend you later add the RFM69 radio approach because it will add so much more (especially sensors) to your home automation. Your starting with ESP82xx success could help you with RFM69s. Because they are fairly reasonably priced & (so far) they use 82xx processors & (so far) they have good connecting points to reprogram them for our purposes, I recommend these Itead Sonoff products that I have tried: Sonoff Basic, Sonoff TH, Sonoff Slampher Bulb Socket, & Sonoff S20 Smart Outlet. Other company's products do not necessarily have good connecting points & may even use different processors that won't work with what we know so far. If connected (with adequate protection) in the middle of an AC appliance cord or extension cord, Sonoff Basic or Sonoff TH can control power to attached appliances. We'll need to watch what happens at Itead (on processors & connecting points for reprogramming). << click on pic for larger view
See the threads on this board for instructions on using ESP82xx devices for home automation. Next: ESP82xx devices vs Arduino/RFM69 devices for DIY Home Automation
|
|
|
Post by papa on Sept 1, 2017 15:52:44 GMT
ESP82xx devices vs Arduino/RFM69 devices for DIY Home Automation
ESP82xx devices come pre-programmed to work with a mobile app. As is, we have no choice about a web site they contact. In this forum, we reprogram them to work with OpenHAB, an open source Home Automation system.
Properly setup & programmed, ESP82xx (ESP8266 or ESP8285) nodes connect directly to OpenHAB via WiFi. They have WiFI antenna & capability built into them. Some ESP82xx devices are small, open circuit boards with no built-in power supply. Other ESP82xx devices (Sonoffs, Slamphers, ECOPlugs) have cases, power supplies, & relays.
Caution: So far, this forum's resources (& others') only document reprogramming WiFi devices that use ESP8266 or ESP8285 processors. Some ECOPplugs use other processors. So far Itead Sonoff devices are consistently ESP82xx based. See the previous post for Itead Sonoff products that (so far) work well for this DIY Home Automation project & should be easier for beginners.
Again, unlike RFM69 nodes, a ESP82xx node needs no gateway. ESP82xx devices typically have less available connections than an Arduino compatible & those may be solder holes or pads rather than plug in sockets. ESP82xx devices probably provide less current through their pins than at least a Buono Uno Arduino compatible.
ESP82xx devices are often smaller than the Arduino compatible equivalent. The following ESP82xx devices have a case, built-in power supply, & a relay to control AC appliances. Sonoffs provide a lot in a small package. The Sonoff Basic (aka Sonoff Single) has a pushbutton, an LED, & mains input & output terminals, & (via mains input) built in power supply. The Sonoff case provides some protection from touching or detaching mains, but is only somewhat protected from water. As is, ECOPlugs or Smart Plugs (AC outlets controllable via WiFi) & Slamphers (AC bulb sockets controllable via WiFi) are also more compact & protected than the Arduino equivalents or Sonoff Basic.
Next: ESP82xx Home Automation, Links to Build Instructions & a "Map"
|
|
|
Post by papa on Sept 1, 2017 16:08:16 GMT
ESP82xx Home Automation: Links to Build Instructions & a "Map"To be most safe, a Sonoff Basic (single relay) should be enclosed in another outer case with more strain relief for appliance cords ( See this post). This is especially true if one opens a hole in the original case to add a sensor. See this link & this link for instructions on using ESP82xx devices for home automation. << Click on pic for a larger view This pictures ^^ the minimum requirements for a Home Automation network using only an ESP82xx node. Below, I will picture the RFM69 version & then combine the two approaches. Next: Arduino/RFM69 devices vs ESP82xx devices for DIY Home Automation
|
|
|
Post by papa on Sept 2, 2017 15:58:10 GMT
Arduino/RFM69 devices vs ESP82xx devices for DIY Home AutomationThe Arduino / RFM69 approach to Home Automation is more challenging to beginners than using ESP82xx devices, but I believe it provides a better platform for sensors. To connect with OpenHAB / MQTT, RFM69 nodes need intervening communication through a RFM69 Gateway. RFM69 radios are available in 3 frequencies: 433MHz, 868MHz, 915MHZ. Choose the most responsive frequency that works for your region. Also choose a radio with an "H" for higher power (better communication) in its part number. See in the middle of this post ("RFM69 radios are sold at frequencies of 433 MHz...) for more information of RFM69 frequencies. Each RFM69 gateway or node requires an RFM69 radio installed on an Arduino compatible (capable of providing 3.3 volts, not only in a 3.3 volt power socket, but also through the digital pins: D2, etc). Some Arduino compatibles are small, open circuit boards (like Arduino Pro Mini) with no built-in power supply. In order for their RFM69 radio to have correct, adequate power, one must power the RFM69 radio directly (in parallel with powering the Pro Mini) from an added 3.3 volt power supply (See the power connections in this node schematic). Other Arduino compatibles (like the Buono Uno that I prefer) can be switched to a 3.3 volt mode (through the digital pins) & as is, provides adequate current for an RFM69 radio. Because it sends 5 volts through its digital pins, a standard Arduino Uno will not work safely with the RFM69 radio unless the Arduino is changed to 3.3 volts ( See here) or level shifters (do not work for everyone) are added OR one uses an RFM69 Breakout Board ( See the end of this post). The RFM69 gateway also requires a W5100 Ethernet card or shield. I believe the easiest gateway build is the RFM69 radio plugged into a W5100 Ethernet Shield plugged on top a Buono Uno Arduino compatible. OR to a 3.3 volt Arduino compatible like a Pro Mini, one can connect an RFM69 radio & a small W5100 Ethernet circuit board. If using a Pro Mini, remember to power the RFM69 radio directly from the 3.3 volt power supply & not from the 3.3 volt power pin of the Pro Mini.
|
|
|
Post by papa on Sept 2, 2017 16:13:17 GMT
Arduino/RFM69 devices vs ESPxxxx devices for DIY Home Automation, ContinuedAn Arduino compatible (especially a Buono Uno) has several socket connections available (including both 3.3 & 5 volts & 3 GNDs), even with 7 pins dedicated to the RFM69. (Readily available & adaptable shields can add more socket connections.) The Buono Uno probably provides more current through its pins than ESP82xx devices. An Arduino RFM69 node can control an AC appliance via a Solid State Relay (in a box or on a chip). However, to be safe, this all should be enclosed in a case. See this thread for instructions on starting this type of home automation. Warning: Be prepared to be challenged by attending to many details. See this post for several RFM69 nodes you can build after you start with the above. This pictures ^^ the minimum requirements for a Home Automation network using only an RFM69 gateway & node. Next: An Overview of DIY Home Automation with BOTH ESP82xx AND RFM69 radio devices & links to instructions.
|
|
|
Post by papa on Sept 4, 2017 0:09:08 GMT
DIY Home Automation with BOTH ESPxxxx AND RFM69 radio devicesThe above posts picture & describe DIY Home Automation first with the ESP82xx WiFi approach & then with the RFM69 radio approach. The two approaches can be complementary parts of the same Home Automation System. One's strengths overcomes weaknesses in the other. << Click on pic for larger view.
This pictures ^^ a Home Automation network with both RFM69 & ESP82xx devices. Next: a Home Automation network with wider possible connections
|
|
|
Post by papa on Sept 4, 2017 0:15:38 GMT
<< Click on pic for larger view This pictures ^^ a Home Automation network with wider possible connections.
Other threads on this forum help document how to make these wider connections. Other threads on this forum document how to build & program RFM69 nodes or ESP82xx nodes & use them with OpenHAB / MQTT. See this linked index.
|
|
|
Post by papa on Sept 4, 2017 0:20:46 GMT
Repeating my recommendations based on the above data: Again I recommend you start this forum's DIY Home Automation with ESP82xx devices (especially Itead) because you're probably most likely to get a good start & experience. However, I also recommend you then add the RFM69 radio approach because it will add much more (especially sensors) to your home automation. Your starting with ESP82xx success could help you with RFM69s. ESP82xx devices with a case, built-in power supply, & relay are most ideal for controlling AC appliances. They often do NOT offer much in the way of pins or safe access to attach sensors. Exception: For the Sonoff-TH model, one can plug in (via a cable) an air temperature & humidity sensor OR a liquid temperature sensor. Because they are fairly reasonably priced & (so far) they use 82xx processors & (so far) they have good connecting points to reprogram them for our purposes, I recommend these Itead Sonoff products that I have tried: Sonoff Basic, Sonoff TH, Sonoff Slampher, & Sonoff S20 Smart Outlet. Other company's products do not necessarily have good connecting points & may even use different processors that won't work with what we know so far. We'll need to watch what happens at Itead. I recommend Arduino compatible/RFM69 radio devices to hold sensors or to control low voltage DC appliances. I prefer the Buono Uno Arduino compatible or compatibles that can be purchased with installed RFM69 radios (the Miniwireless or the Moteino). These low voltage devices do not necessarily require cases unless for harsh conditions. Arduino compatibles have many more input/output pins to connect sensors. I do not know any ESP82xx devices that control DC appliances. I believe using the Buono Uno will require the least soldering to make a gateway or node. One more recommendation: To build nodes with both sensors & a relay to power AC "appliances": First, commit to enclose everything with a protective project box. Second, I recommend an RFM69 node built on a Buono Uno Arduino compatible that can control AC with a solid state relay AND handle more than one sensor. See this project for an example. Be careful to enclose the project (especially the solid state relay & connections to mains voltage) in a protective box. (For the most part, I believe encased ESP82xx devices can only handle adding one single-purpose sensor. The exception I know is a DHT temperature & humidity sensor.) See this post & this thread for several RFM69 & ESP82xx nodes you can build.
|
|
|
Post by papa on Jan 11, 2018 4:03:42 GMT
Adding an Ethernet Node to DIY Home Automation Starting with this thread, I have added an Ethernet Node to the RFM69 & ESP82xx approaches to OpenHAB / MQTT. The Ethernet Node connects directly (no Gateway needed) to OpenHAB / MQTT via an Ethernet cable connection to one's local network. It might be another good project for beginners to try. These three approaches (Ethernet, RFM69 Wireless, & ESP82xx WiFi) can work side by side with the same OpenHAB home automation network, especially since they use the same message structure that computourist implemented. As was done with the choices RFM69 node sketch, other functions could be added to this Ethernet type of node. Since the Ethernet Node does not use an RFM69 radio, that could free (for other purposes) the Arduino digital pins used by the radio (D2, D8, D11-D13). If you think you might move a node from Ethernet to RFM69 radio later, then you would want your programming sketch to avoid those pins. One can only place this node where an Ethernet network connection is available. (Being wireless, RFM69 & ESP8266 nodes can be placed any where they can receive a wireless signal.) Note: The graphic map above in this post includes the Ethernet node. This node functions similar to the ESP8266 WiFi Node, just with an Ethernet cable connection instead of wireless WiFi connection.
|
|
|
Post by papa on Aug 22, 2022 18:27:01 GMT
Adding an ESP32-WiFi Gateway & Nodes
To DIY Home Automation Using Either RFM69 OR RFM95 Radios
In this thread, I document another network that can be added to DIY Home Automation. It features an ESP32 Gateway & Arduino compatibles with RFM69 radios. One can buy ESP32 & compatibles with pre-installed radios OR install the radios yourself. In this thread, I document another network that can be added to DIY Home Automation. It features an ESP32 Gateway & Arduino compatibles with RFM95 radios which are supposed to communicate longer distances than RFM69s. One can buy ESP32 & compatibles with pre-installed radios OR install the radios yourself. The networks can have encryption between nodes & Gateway & can also have password protection between the Gateway & the MQTT server. The Gateway connects to openHAB via MQTT. One can create up to three RFM69 networks & up to three RFM95 networks. One Gateway/Network can handle several nodes (at least 10?) & could be enough for most users. The RFM69 Gateways & RFM95 Gateways are coded so they should not interfere with each other's networks or with the WiFi nodes documented on this forum.
|
|