|
Post by papa on Jan 11, 2018 3:03:29 GMT
Jan 10, 2018 19:47:13 GMT -6 billgrubbs said: I have openhab2 loaded on a raspberry pi3 and need a good step by step instruction on how to get a sensor working. I have read bits and pieces of information in lots of places and haven't found a good place that will give me a good step by step. For example, I would like to set up a DHT11 with esp8266 to start with. Can you point me to a good set of instructions? I have read the information stating it is better for me to start with esp than RF and I certainly need to start with the easier option.
|
|
|
Post by papa on Jan 11, 2018 3:18:51 GMT
Welcome, billgrubbs, to DIY Home Automation, Getting an ESP8266 device connected to OpenHAB is easier because it can connect directly to OpenHAB via WiFi. RFM69 nodes need a separate RFM69 Gateway to bridge the connection to OpenHAB. If you read my overview of using ESP8266 AND RFM69, you saw that each type of device has its advantages & disadvantages. Again for one thing, ESP8266 is easier to get SOMETHING working. ESP8266, especially what we have documented, has more on switching AC appliances off & on & not so much on using sensors. In our RFM69 approach, we've done much more with sensors plus controlling AC appliances. I personally got a DHT11 sensor working with a Sonoff (an ESP8266 device). I have not documented it because the Sonoff controls AC voltages & my adding the DHT11 reduced protection of those AC voltages. If you can give me some time (perhaps a few weeks due to some time crunches I have currently), I believe I can document adding a DHT11 sensor to a bare ESP8266 circuit board that has nothing to do with mains voltages. In the mean time, I recommend that you start learning ESP8266 plus OpenHAB / MQTT with some doing. In that regard, see the threads on this board for instructions on using ESP82xx devices for home automation. I especially recommend that you follow this thread using the Itead ECOPlug or this thread on using the Itead Slampher smart bulb socket. Those threads will refer you to the information rich thread by jimkernsjr. The Itead products are reasonably priced, safe & relatively easy to work with. Start with one or both of those projects so you get some working knowledge of ESP8266 & OpenHAB / MQTT & I hope have something useful to show for your efforts. Then we can build on that & work toward your request of a DHT11 sensor on ESP8266.
|
|
|
Post by billgrubbs on Jan 11, 2018 20:25:53 GMT
Thanks for your suggestions. I look forward to your future post. I want to set up lots of things with the OpenHAB2 and thought this would be a good place to start. I built a 4 plug box with 4 relays and have an arduino controlling them along with 2 thermistors. I designed it to help control temperature in a greenhouse, but have not been able to find a way to tie this into the OpenHAB. Do you know if that is possible? Or would I have to tie everything straight to the Raspberry?
|
|
|
Post by papa on Jan 12, 2018 0:27:57 GMT
billgrubs, it helps to hear what Arduino experience & successes you've had so far & more on what you are trying to accomplish. You ask, "tie this into the OpenHAB. Do you know if that is possible?" I definitely think that is possible. At least from our forum's work, probably not so far with the ESP8266 approach (though I still believe that would be useful for you to learn & again it would be compatible with our other forum approaches.) What you want should be doable with some adapting of our RFM69 programming. Though again the RFM69 has a steeper learning curve due to needing to get the RFM69 radio Gateway & a RFM69 radio on your device communicating with each other. My cooking controller & irrigation automation threads (links below) have parallels to what you are doing. Especially given your existing Arduino experience, what might be a quicker solution for you now would be utilizing something I just worked out for another member, an Ethernet Node. That approach connects directly with OpenHAB over Ethernet Cable connected to your local network router. It uses a W5100 Ethernet Shield plugged on top of the Arduino. That node's coding already has ability to control one relay & that could be multiplied. It does not yet have temperature sensors, but that could be added. I've often worked with DHT11 sensors which provide both temperature & humidity & DS18 temperature sensors. Do you have a network connection in the greenhouse? If not, is it close enough to a connection (within 100 meters or 328 feet) that you could run a cable to the greenhouse? See this thread about the Ethernet Node. See here about the Irrigation Automation. See here about the Cooking Controller. All have in common controlling relays & connecting with OpenHAB. The latter two projects add controlling the relays in relation to temperature. If you could have network access to the greenhouse, we could probably adapt the RFM69 Irrigation Automation to work over Ethernet Cable. I've got some time crunches going on. However, here & there, I might be able to grab some time to adapt some things that are already working that I mentioned above. Next steps (if the greenhouse has network connection)?? I suggest that you make & program that basic Ethernet Node (Arduino, W5100 Ethernet Shield, two LEDs with resistors) & get it communicating with OpenHAB via the OpenHAB guidance I provided. Then for your greenhouse purposes, we can look at adapting one of my sketches or working some of your code into the Ethernet Node.
|
|
|
Post by billgrubbs on Jan 12, 2018 22:37:20 GMT
Thanks for the direction. I am excited to get going on this. My greenhouse is in development. I have the frame up and am waiting for a little warmer weather to add the plastic. In the meantime I want to keep working on the home/greenhouse automation so I have it up and running when i am ready for it. I can't wait to get something working on OpenHAB. Most of the information you have posted appears to be for OpenHAB 1 and I have OpenHAB 2. I don't know if that makes any difference or not, but will get going on your instructions and see how far I get. I have bought most of the components for the RFM approach too, but want to follow your suggestions with the ESP and now the Ethernet option.
I plan to run a cable or a line of site repeater from my house to the greenhouse where I plan to put another wireless router. I can't wait to get these things working.
Thanks so much for your help.
|
|
|
Post by papa on Jan 13, 2018 1:14:58 GMT
You're welcome, billgrubbs, I'm glad I can reinforce & encourage your excitement about home automation. When it works, it's really satisfying with practical results. My irrigation automation used less water, was more steady & balanced, & made gardening even more of a pleasure. Making plans for automating your growing is a good way to use the colder months. That's what I was doing in winter of 2017, working on my irrigation automation. billgrubbs: "Most of the information you have posted appears to be for OpenHAB 1 and I have OpenHAB 2. I don't know if that makes any difference or not" papa: Yes, I cut my teeth on OpenHAB 1 & much of my configuration is ported to OpenHAB 2 from that. We could only configure OpenHAB 1 by editing text files. One can still mostly configure OpenHAB 2 via text files (which I do) & there's not much different when using text files. Such differences are covered in the official OpenHAB documentation's migration tutorial, especially here. Of course, one can also configure OpenHAB 2 via Karafe or PaperUI. So far I've only used that for Things. But this method (like text files) is a matter of setting up addons (like bindings), items, rules, transformations, & sitemap & in relationship to each other. I've used both methods (text & PaperUI), but more so with text. Good to hear that you'll have a network connection in the greenhouse. That probably makes the Ethernet Node approach the way to get what you want the soonest. It will probably work with RFM69 radios, but again that learning curve would be more steep. If you post here how you plan to wire your Arduino, etc AND your programming (with as much explanatory comments as possible), perhaps as I have time, I can make suggestions towards an Ethernet Node for your greenhouse. billgrubbs: "I have bought most of the components for the RFM approach." papa: I hope you saw that the Arduino compatible for that approach must operate at 3.3 volt through its digital pins (or damage the RFM69s). With a regular 5 volt Arduino, one must either hack it to 3.3 volts or use RFM69 breakout board that converts 5 volts to 3.3 volts for the radio. Not having an RFM69 radio, the Ethernet Node can use a regular Arduino that runs 5 volts through the digital pins.
|
|