|
Post by papa on Jan 31, 2017 19:14:53 GMT
This RFM69 radio approach to Home Automation is parallel (& supplemental) to the ESP82xx WiFi approach elsewhere in this forum. Either approach has its challenges, but the RFM69 approach probably has more challenges than ESP82xx. If you are a beginner, I recommend you start with ESP82xx & come back to this RFM69 approach later to add more (especially sensors) to your home automation. See this thread for more details.
Introduction & Preliminaries for RFM69 Home AutomationThis documentation assumes OpenHAB 2 & a Mosquitto MQTT message service are installed on a computer connected (by Ethernet cable) to your local network. See this thread on installing OpenHAB 2, the embedded MQTT message broker, & MQTT 2 & other bindings. That thread follows the official documentation, but gives more details. Like the official documentation, I now recommend configuring only items, rules, & sitemaps with text files & using PaperUI to configure the rest. << Updated Feb. 6, 2019Getting started on this DIY Home Automation project is challenging, especially for beginners (as I found from personal experience a couple years ago & from trying to help other beginners). I've been thinking about how I might (somewhat) simplify making the first two network devices, the Gateway & an End Node. Those being built, programmed, & talking to each other is a good foundation & experience for more robust home automation. Simplifying earlier versions of computourist's schematics, I rearranged schematic connection labels & wires to avoid crossed wires. When wires do cross, I made them different colors to indicate they are not to be connected. However, one must be careful to make connections according to their labels on the schematic & the electronic devices (like Arduino compatibles & RFM69 radios). To remove most resistors from the schematics, I moved resistor functions to the software. I also provide annotated pics of Serial Monitor results when things are working & not. Added 5/27/2017: I recommend you look at this index which gives links that may help those at the beginning stages (Gateway & first end node.) Early links give overviews of the project & sources for key parts. The next post lists threads where we helped beginners get started. Then posts point to hardware hints & Arduino basics. These links may address much of your questions & concerns & feeling you're the only one to hit speed bumps. Let's take a deep breath & jump in. Don't forget to have patience with yourself & enjoy what you're learning & will accomplish.
|
|
|
Post by papa on Jan 31, 2017 19:15:33 GMT
Unless your end nodes will connect to OpenHAB / MQTT via built-in WiFi (not covered here), a 3.3 volt capable Arduino compatible & an RFM69 radio (at your chosen frequency) are essential to the Gateway & End Nodes. The documentation linked below uses a separate Arduino compatible to which is added an RFM69 radio with user-soldered wires. This post offers alternatives perhaps more convenient.
Building a Computourist-Style RFM69 GatewayYou need a Gateway unless you build end nodes on Arduino compatible devices that connect to OpenHAB / MQTT via the device's built-in WiFi. This Building... thread will not cover those devices. See ESP in this post. This Gateway is a communication bridge between OpenHAB / MQTT running on your computer & one or more end nodes. In this UPDATED thread, << I provide documentation on building, programming, & troubleshooting the Gateway, including a (somewhat) simplified schematic. Get the Gateway working before you move on to building RFM69 End Nodes.
If you have NOT built end nodes before, I highly urge you to follow the step by step instructions in the following posts.
|
|
|
Post by papa on Feb 1, 2017 18:02:14 GMT
Starting to Build a Computourist-Style End Node to Complete a Rudimentary Home Automation NetworkIf you are moving to this step, I assume you have a working, connected Gateway from the above or at the least, you're just previewing the parts & efforts you need for the next steps. Without the working, connected Gateway, you don't have anything to communicate with an end node & you won't get any useful Serial Monitor results. Introduction & PreparationFrom computourist's full DHT End Node, I created schematics that start most simple & build on previous schematics towards the full node: A) A Bare Bones End Node (just the Arduino & the RFM69 radio); B) a DHT sensor only; & C) a full DHT End Node which adds a push button & an LED to B). This approach allows one progressively to see & test the sub-circuits of the node, but one might also skip from A) to C) or to do only C). To beginners, I encourage at least step A) before C) & preferrably all 3 steps. Though in all cases, look ahead to step C) to see all the connections to be made eventually. Obtain & prepare the parts for the Full DHT End Node:Mostly follow the parts needed directions in the this Oct 10, 2015 post. Except for all steps of this node, you do NOT need a BC547 transistor nor a SSR-10DA (DC to AC) solid state relay. You do need an LED (red?) & a 100 ohm resistor.
For the node's LED (maybe applying heat shrink tubing to protect the bare wire leads), solder a 100 ohm resistor to an LED's longer wire lead. The plastic LED base above the longer lead is usually round. The plastic LED base above the shorter lead usually is flat. An Arduino compatible has 3 GND sockets & only one 3.3 volt socket. Step A) need 1 GND connection & step B) needs 2. A) & B) need only one 3.3 volt socket So one can build steps A) - B) on just the Arduino. Step C), a full DHT End Node, needs 4 GND connections & two 3.3 connections & also needs somewhere to put the push button, like a shield or a soldered or solderless breadboard. (Push buttons tend to pop out from solderless breadboards.)
|
|
|
Post by papa on Feb 1, 2017 18:03:18 GMT
Step A) Build & Program a Bare Bones End Node << Building on a 3.3 volt Arduino compatible, follow this schematic. I recommend a Buono Uno Arduino compatible. For explanation, source, & other options, see this post about building the gateway. For this node version, you only need the Arduino compatible (with power supply), connecting wires, & the RFM69 radio (obtained & prepared as above for the Gateway). Carefully following the labels in the schematic, bend & insert the RFM69 wires into their correct Arduino sockets. Caution: An End Node's RFM69 radio's NSS is connected to D10, not D8 (as on a Gateway). Program the Bare Bones End Node: Updated Dec. 15, 2018
To download the latest Node Choices Sketch & initial customization required , go to this thread & then return here to continue . Up to the present, important changes have been made in that thread.For the Bare Bones End Node, skip to uploading in the next paragraph. For other nodes, do the added customization they need which is found in their documenting threads. See this post for links that document different types of node features. Using the upload feature of the Arduino IDE, while the Node's Arduino connects to your computer via USB, send the customized Node Choices sketch program (ending in .ino) to the Arduino. Before uploading, I find it helpful to use the verify feature & let it tell me if it finds sketch problems to fix. ( See this post about "other available troubleshooting tools.")
|
|
|
Post by papa on Feb 1, 2017 18:20:23 GMT
Getting Results from Your Rudimentary Home Automation Network (Gateway & Bare Bones End Node): Have your computer running a rightly configured OpenHAB server (see above) & running Mosquitto Broker service (MQTT) (see above). Have your programmed Gateway's Arduino / Ethernet shield connected to your Ethernet network (& OpenHAB via MQTT) & wall powered. Have your bare bones end node connected to your computer's USB, with the end node sketch using debug mode, & with Arduino IDE serial monitor running at same baud as set in the Gateway sketch (115200). ^^ With all in the previous paragraph, you want the serial monitor to show results like this pic annotated in red ( except yours will read Node 02), indicating the end node is connected & transmitting data to the Gateway / OpenHAB. ^^ If you transfer the end node to wall power & connect the Gateway to your computer's USB, you should see results like this annotated pic, also IF ( added, 3/7/2017) the gateway is programmed this way: comment out #define DEBUG & 3) UNcomment #define DEBUGRADIO.
^^ If you get these results, you have a rudimentary DIY Home Automation Network. Awesome, eh? AND You're ready to move to Step B) a DHT Sensor End Node, the second post after this one. If you have trouble, look at the next post.
|
|
|
Post by papa on Feb 1, 2017 18:33:42 GMT
Reserved for Troubleshooting Hints for the Work Just Above ( Bare Bones End Node with Gateway) ^^ If serial monitor (SM) results look like this (except Node 05), the end node is NOT connected to the Gateway / MQTT / OpenHAB. Time to review your steps & troubleshoot: As with possible Gateway problems above, re-check end node wiring with the schematics. Use a multi-meter to continuity check the wiring (Are the correct things truly connected & did you avoid connecting the wrong things?). Did you download & program the choose_nodes sketch from this post? Recheck how you customized sketch. Use the sketch's debugging modes & Serial Monitor output to give you clues. Important: If your Gateway & End Node connect, but then do not seem to stay connected & communicating ... Be sure you went to this Oct 7, 2015 post about " Downloading, Editing, & Installing Libraries" & later in the post make the changes to the library files, w5100.h & ethernet.h That can help your Gateway & End Node stay connected more reliably. Stay with this Step A), building a Bare Bones End Node until it & the Gateway are communicating. Next steps will not work without success in the steps so far. To be continued with adding a DHT humidity & temperature sensor to the End Node.
|
|
|
Post by papa on Feb 1, 2017 21:13:41 GMT
Step B) Add a DHT Humidity & Temperature Sensor to the End Node Once you get the Gateway & Bare Bones End Node working (See above), this step should go fairly quickly & easily. Above you were asked to " Obtain & prepare the parts for the Full DHT End Node" by going to this post. If you have not already, follow that post to obtain & add wires to a DHT11 Sensor. ^^ Follow this schematic to install the DHT Sensor on what you built earlier as a Bare Bones End Node. Basically insert the sensor's Vcc wire into Arduino 3.3v, its GND wire into an Arduino GND, & its Data wire into Arduino D4. Use the same Node Choices Sketch above in this post, except add this customization: UNcomment (no // at the line's start) only two lines... In the lines with FAHR & CELS, UNcomment only one to choose a temperature scale. In the line with HT, UNcomment it, that is change from // #define HT to #define HT Upload the newly customized Multi-Choice End Node Sketch to the node. ^^ Your Serial Monitor results should look like this ( except the red explanatory text & Node 05 instead of Node 80) & then repeats every 45 seconds (which is set by sketch variable TXinterval). If this Step B) is working, you're ready for Step C) the Full DHT End Node (with push button & LED) ... See that below.
If Step B) is not working, see some hints in the next post. Don't move to Step C) until B) is working.
|
|
|
Post by papa on Feb 1, 2017 21:31:37 GMT
Reserved for Troubleshooting the Step Just Above (DHT Sensor End Node)
Again, if the Gateway & Bare Bones End Node were working for you, not much should go wrong for this version of the node.
If you have trouble, the main thing would be to make sure you have the DHT sensor wires installed properly into the Arduino compatible. (see the post just above)
Continuity check between the sensor leads & the end of the wire soldered to them.
Perhaps the DHT sensor is defective. Try another sensor.
|
|
|
Post by papa on Feb 3, 2017 19:47:52 GMT
Reserved for More Troubleshooting of the Step Above (DHT Sensor End Node)
See this thread: Troubleshooting & Debugging, Hints & Tutorials
|
|
|
Post by papa on Feb 3, 2017 20:24:34 GMT
Step C) Build a Full DHT End Node (with DHT Sensor, Push Button, & LED)This end node demonstrates this project's powerful possibilities: To the serial monitor (& later the OpenHAB User Interface, the sensor reports temperature & humidity, whether the push button has been pushed, & whether an actuator has toggled the LED on or off. This step will be more involved, needing more than an Arduino compatible. An Arduino compatible has only 3 GND connections & only one 3.3 volt connection. Again, a full DHT End Node needs two 3.3 volt connections & 4 GND connections & also needs somewhere to put the push button, like a soldered or solderless breadboard or a shield. (Pushbuttons tend to pop out from solderless breadboards.) Parts: If you followed instructions above, you should have the needed LED plus resistor ( Feb 1, 2017 post above with "Starting to Build") & a prototyping shield (which includes a spare push button). Note: For temporary purposes, you could use a solderless breadboard plus a push button instead of a shield, though you may find the push button tends to pop out of the solderless breadboard.
|
|
|
Post by papa on Feb 4, 2017 0:30:07 GMT
Step C1) Build a Full DHT End Node, Prepare for the Node to Use the Shield Push Button & Provide More 3.3 Volt Connections
<< Working toward this schematic. Follow the instructions in this Oct 15, 2015 post with " Starting from the beginning to create a DHT End Node" Follow that post except disregard the schematic there & use the schematic just above. When you finish there, return to this post in this Building... thread & & then continue to the next paragraph just below. ^^ Items 1) - 3) at the bottom of that Oct 15 post's bottom should prepare for the node to use the shield's spare push button. Continuing to refer to the labelled pics in the Oct 15, 2015 posts indicated abovde ... Female header sockets A1 & power strip A2 will be changed from 5 volts to 3.3 volts. To first remove those sockets from 5 volts, cut the trace labelled B1 on the shield's bottom. Here's how to complete the 3.3 volt connection. Go to the next Oct 15, 2015 post that starts " Continued: Building a DHT End Node" There follow ONLY these items which I flagged with blue text: 6a (first sentence), 6b), 7), 10), 11), & 12. While you're in that post, also do item 13) to install the DHT11 sensor on the shield. With a multi-meter, continuity test all the places you soldered connections for the push button & adapting more 3.3 volt connections on the shield. (That is, did you achieve the schematic-indicated connections & not make connections not in the schematic?) Recheck all the connections against the schematic.
|
|
|
Post by papa on Feb 4, 2017 0:52:31 GMT
Reserved for more information or troubleshooting
|
|
|
Post by papa on Feb 4, 2017 0:53:06 GMT
Step C2) Build a Full DHT End Node, Assemble All the PartsRemove all parts from the Arduino compatible. DHT sensor wires should already be in the shield sockets. Leave them there. Gently insert the shield into the Arduino compatible, making sure you match up shield pins to Arduino pins with the same labels. ^^ Following the schematic just above & previous instructions, install the RFM69 radio's wires into the correct Arduino sockets on the shield. (Connect the RFM69 3.3v to a shield 3.3 volt socket, perhaps in the new A9 strip of sockets.) Install the LED / resistor. Insert the resistor's free end into the shield's D9 socket & the LED's free end into a shield GND socket. (You may need to add a little solder to each free end so they fit securely in the sockets.) If you followed doing item 13) in the post just above, you should have the DHT sensor already installed on the shield.
|
|
|
Post by papa on Feb 4, 2017 0:58:14 GMT
Step C3) Program the Full DHT End Node with the Customized Sketch Do a bit more customizing on the Node Choices Sketch: Use the latest Node Choices sketch from this post as it was to be customized above in two Feb 1, 2017 posts: a) " Step A) Build & Program a Bare Bones End Node" & b) " Step B) Add a DHT Humidity & Temperature Sensor to the End Node" Add one more customization to the sketch:
In the line with BUTTON, UNcomment it (change from // #define BUTTON to #define BUTTON) As THE line says, this also will #define Actor, which turns the LED on & off. Upload the newly customized sketch to the Arduino / Node.
|
|
|
Post by papa on Feb 4, 2017 1:01:23 GMT
Troubleshooting the Steps Just Above (Full DHT End Node) ^^With the Gateway directly connected to your local Network router with an Ethernet Cable & wall powered, with the End Node connected to & powered by your computer's USB, your Serial Monitor results should look like this (except the red explanatory text & yours will say Node 02) & then repeats every 45 seconds (which is set by sketch variable TXinterval). As in the pictured sample results, the serial monitor lines' values will change according to the state of the LED, temp, humidity, & the button being pushed. If this Step C) is working, you're ready to move on to the OpenHAB configuration file entries ... where I posted them, starting here with "For OpenHAB 2 ONLY".If Step C) is not working, see some hints in the next post. Don't move to OpenHAB config files until Step C) is working.
|
|
|
Post by papa on Feb 4, 2017 1:18:58 GMT
Reserved for Troubleshooting Hints for the Work Just Above (Full DHT End Node) If your Full DHT End Node is not working ... Visually & with a multi-meter, recheck the node's connections against the schematic & instructions. Important: Again, if your Gateway & End Node connect, but then do not seem to stay connected & communicating ... Be sure you went to this Oct 7, 2015 post about "Downloading, Editing, & Installing Libraries" & later in the post make the changes to the library files, w5100.h & ethernet.h That can help your Gateway & End Node stay connected more reliably.
|
|
|
Post by papa on Feb 4, 2017 1:22:34 GMT
Reserved for more Info or Troubleshooting for the Full DHT End Node
|
|
|
Post by papa on Feb 8, 2017 21:43:42 GMT
Needed for OpenHAB to Communicate with your DIY Home Automation Network
If you installed OpenHAB 2 as recommended above, follow the documentation linked there on adding bindings. For the tasks of posts below, you may also need to follow the official OH2 documentation. Several posts starting below aim to finish setting up communication between OpenHAB / MQTT & your Home Automation devices built above. Continues below
|
|
|
Post by papa on Feb 8, 2017 21:45:50 GMT
Preparing the OpenHAB Configuration as Needed #1
The following assumes you have all the above installed / working: OpenHAB 2 (esp. 2.5.0.M1), MQTT broker, Gateway 2.5.3, & a Full DHT End Node. It also assumes you programmed the Full DHT End Node with NODEID 02 05. If you used a NODEID different from 05 (but never less than 05), change config file entries accordingly. Continues below
|
|
|
Post by papa on Feb 8, 2017 21:53:31 GMT
Preparing the OpenHAB Configuration as Needed #2 Significantly Updated, Feb. 8, 2019 to Use MQTT 2.xx Binding
( See this thread about migrating your configurations from MQTT 1.xx Binding to MQTT 2.xx Binding.) 1) Via this post, you could create a Node05 Thing. 2) Via this post, you could add a channel 02 (RSSI, radio signal strength) to the Node05 Thing. 3) Via this post, you could create a Node05.items file that includes a Node05RSSI item. 4) Via this post, you could link Node05 channel 02 to the matching RSSI item. 5) Via this post, you could display the Node05 RSSI item on the User Interface.
Similar to step 2 above, add Node05_Volts/ channel 04 (node voltage) to the Node05 Thing. The type is Number, the channel id is Node05Channel04, & the state topic is home/rfm_gw/nb/node05/dev04. Entry for Node05.items file:
Number Node05Vlts "Node05Volts [%.2f Vdd]" <battery> (Nodes) { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel04" } Via this post, you could add channel 16 (actuate relay or LED) to the Node05 Thing. This post has the item. Link the channel & the item like step 4 above.
Add Node05_DHTtemp/channel 48 (DHT Temperature). The type is Number, the channel id is Node05Channel48 & the state topic is home/rfm_gw/nb/node05/dev48 Entry for Node05.items file:
Number Temperature_Node05 "Temp_BaseFR05 [%.1f °F]" <temperature> { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel48" }
Add Node05_DHThumidity/channel 49. The type is Number, the channel id is Node05Channel49 & the state topic is home/rfm_gw/nb/node05/dev49 Entry for Node05.items file: Number Humidity_Node05 "Humidity_BaseFR05 [%d %%]" <humidity> { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel49" }
Add item to combine Temperature & Humidity:
String BaseFR_TH05 "BaseFR_TH05 [%s]" <comfort_level>
Other OpenHAB configuration work continues below.
|
|
|
Post by papa on Feb 9, 2017 0:46:31 GMT
Preparing the OpenHAB 2 Configuration Files as Needed #3 Significantly Updated, Feb. 8, 2019 to Use MQTT 2.xx Binding
The following is an .items configuration file based on what is in the post just above. In the openhab2\configurations\ items folder (Windows typically: C:\openHAB2\conf\items) Linux, typically: /etc/openhab2/items), with Linux text editor or a Windows text editor like Notepad++ ... & with the following content (near the end , depending on the temperature scale you chose for the end node, leave it for Celsius or change to Fahrenheit), you could have a FILE named My.items (Note: for compatibility with the latest Gateway sketch, Node 02 changed to Node 05).
// My.items, a basic file for OpenHAB to work with a Gateway & one DHT End Node (Node05) with push button, relay, & DHT11 sensor Group Nodes (Network) String Node05RSSI "Node05rssi (db)[%s]" <network> (Nodes) { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel02" }
Number Node05Vlts "Node05Volts [%.2f Vdd]" <battery> (Nodes) { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel04" }
Switch Node05Sw "Node05Sw" { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel16" } /* [%.1f C] below for node programmed Celsius with Celsius Scale. For Fahrenheit node, replace [%.1f C] with [%.1f F] below .*/
Number Temperature_Node05 "Temp_BaseFR05 [%.1f C]" <temperature> { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel48" } Number Humidity_Node05 "Humidity_BaseFR05 [%d %%]" <humidity> { channel="mqtt:embedded-mqtt-broker:topic:mything:Node05Channel49" } String BaseFR_TH05 "BaseFR_TH05 [%s]" <comfort_level>
|
|
|
Post by papa on Feb 9, 2017 0:55:19 GMT
Preparing the OpenHAB 2 Configuration Files as Needed #4 Dec. 18, 2018 Node 02 became Node 05
(OH 2 does not require you to declare the imports that OH 1.x needed.)
In the openhab\configurations\ rules folder, (Windows typically: C:\openHAB2\conf\rules) (Linux, typically: /etc/openhab2/rules) create a NEW FILE named My.rules with the content ...
|
|
|
Post by papa on Feb 9, 2017 1:00:19 GMT
Preparing the OpenHAB 2 Configuration Files as Needed #5 Dec. 15, 2018: Node 02 became Node 05
Notes on My.sitemap: here because OpenHAB does not like anything inside a sitemap file except text inside frames bracketed by { } My.sitemap file guides what the OpenHAB User Interface (UI) displays in a browser window Clicking the "Nodes" icon at the top left takes one to a page displaying Node05's RSSI (radio signal strength) & voltage Clicking on the virtual switch to the right of Node05_Output will toggle the Node02 LED The Node05's local push button will also toggle the node's LED AND the UI virtual switch This file displays temp & humidity from Node 05 on separate lines Then using the one rule in My.rules, it combines temp & humidity on one field, saving screen space. (It may take longer to display than the separate temp & humidity data.) // << using this at the start of an entry will comment it out & disable it. Removing // will re-enable the entry In the openhab\configurations\ sitemaps folder, (Windows typically: C:\openHAB2\conf\sitemaps) (Linux, typically: /etc/openhab2/sitemaps) have a FILE named My.sitemap with the content: sitemap My label="My House" { Group item=Nodes label="Node Health" icon="network" Frame { Switch item=Act_Node05 label="Node05_Output" } Frame label="Inside Conditions" { Text item=Temperature_Node05 Text item=Humidity_Node05 Text item=Node05_Data } }
|
|
|
Post by papa on Feb 9, 2017 1:03:12 GMT
Preparing the OpenHAB 2 Configuration Files as Needed #6
I believe most of the User Interface icon files needed so far are included with the OpenHAB 2 install. comfort_level.svg (90.95 KB) << Download this comfort_level.svg icon file to your openhab2 icons subfolder Windows, typically: C:\openHAB2\conf\icons\classic Linux, typically: /etc/openhab2/icons/classic I believe this completes the OpenHAB config files needed to work with the latest RFM69 network of a RFM69 Gateway & Full DHT End Node (05) based on the latest programming sketches.
|
|
|
Post by papa on Feb 9, 2017 1:08:56 GMT
Launch An OpenHAB User Interface on Your Computer
I believe the above work with OpenHAB config files has you nearly ready to get OpenHAB results. Restart the OpenHAB2 server... In Windows, using cmd.exe, you can execute the start.bat script, typically at C:\openHAB2\start.bat Wait a while for it to start and complete. This will launch OpenHAB2 & open the Karaf Console, an interface into OpenHAB2. On starting, Karaf Console tells you some commands: 3 ways to stop OpenHAB2, list available commands, & getting help on a command. At the Karaf prompt, you can enter log:tail & see various log reports on what's happening with OpenHAB2. Warning: Using this method, if the computer reboots, you must restart the service this same way. In Windows, so the OpenHAB service automatically starts when the computer starts, follow these instructions to install OpenHAB2 as a Windows service ... Then you can run cmd.exe as an administrator & there enter the command net start openhab2 The User Account Control "bonk" will ask permission (give it). In response, the openhab2 service will start or tell you it is already started. For Linux, see here for controlling the OpenHAB2 service. Systems based on sysVinit (e.g. Ubuntu 14.x, Debian Wheezy and older): via Terminal, manual start: sudo /etc/init.d/openhab2 restart via Terminal, set auto start at sys tem reboot: sudo update-rc.d openhab2 defaults Systems based on systemd (e.g. Debian 8, Ubuntu 15.x, Raspbian Jessie and newer): via Terminal, manual start: sudo systemctl restart openhab2.service via Terminal, set auto start at sys tem reboot: sudo systemctl daemon-reload sudo systemctl enable openhab2.service On the computer hosting OpenHAB in an internet browser address box enter: http://localhost:8080/basicui/app?sitemap=My Note: It may work better, ^^ if you replace "localhost" with the IP address of your computer. If the host computer's IP is 192.168.1.12, enter 192.168.1.12:8080/basicui/app?sitemap=My
This same address with the host computer's IP address ^^ will let you use the OpenHAB2 User Interface on Another Computer in Your Local Network
Note, Jan. 28, 2019: This works at least with Windows computers in the same network AND Workgroup (view & change at Control Panel\System). Also turn on Network Discovery at Control Panel\Network and Sharing Center\Advanced sharing settings.
If you had success with the above, you have a working basic DIY Home Automation that you can build on. See this post & see this thread which give links to building other devices & adding the necessary OpenHAB config file entries. Enjoy!
|
|
|
Post by papa on Feb 9, 2017 14:59:23 GMT
Troubleshooting OpenHAB Operations
To make sure OpenHAB is working right & to track & fix errors, learn to take advantage of OpenHAB logs. You could examine those logs in a scrolling console display. On these displays, watch for where config file entries are working or not. Use the console's scroll button to move around in the display or to halt it from scrolling by. OR you can also open a recent openhab log file in a text editor & search for problems there. Then you can internet search for the error message. Take what you learn to examine & fix OpenHAB config file entries. In Windows, we start OpenHAB in a scrolling cmd console where we can then see various OpenHAB functions start up or not & see updates to OpenHAB states, etc. Windows OpenHAB logs are found in openHAB's userdata\logs folder. For Linux, to get similar scrolling consoles, see this Feb 21, 2017 post with the heading " Helpful Tip for Debugging OpenHAB Config File Entries" Linux OpenHAB logs are found in the /var/log/openhab folder.
|
|
|
Post by papa on Mar 16, 2017 20:28:06 GMT
February & March, 2019 Updates
I have updated the above posts to be more compatible with later versions of openHAB starting with 2.5.M1, MQTT Binding 2.x, & the embedded MQTT broker. These notes may not be complete, but I hope they will move you in the right direction.
|
|
pato
New Member
Posts: 8
|
Post by pato on Apr 19, 2017 17:17:44 GMT
Hi Papa, thanks for your tutorial! I tried to do this and was more or less successful. I used the tutorial under www.instructables.com/id/Uber-Home-Automation-w-Arduino-Pi/ to build it. I did find a few issues though with the .ino files there, but could fix those by using an older dht version (to be exact, 1.3.0 is not working, 1.2.3 is working) and some other small fixes. What doesn't work on Openhab2 is the combine part in the My.rules, that will result in an error while starting openhab2. After changing the whole combine to be just comments it starts without errors Important note about openhab2, you can't configure MQTT through the new Paper UI (no 1.x plugins can), this has to be done through other GUIs or the console It should work on the Classic UI (opened in Firefox, not working on Edge). Also the Classic UI doesn't work after a default installation (tested on openhabian and also a "normal" Linux apt-get installation), one has to first start the Paper UI, go to Configuration -> Services -> Classic UI -> and change the default sitemap to "My" (without ""). Also, I so far wasn't able to show up any data on the openhab2 interface, but it seems to get transmitted to the openhab. This is the debug output of the Mosquitto service: 1492620321: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '0234', ... (4 bytes)) 1492620321: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '0232', ... (5 bytes)) 1492620321: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '0233', ... (5 bytes)) 1492620321: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '0234', ... (4 bytes)) 1492620322: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '0232', ... (5 bytes))
Any ideas? Thanks for the great work so far! Edit number 2: Just discovered your updated ino files (I somehow missed them, sorry). With them I do get data now on the openhab! And even better, I have a spare Uno now Time to get a working gui now in openhab (and I hope I soon get all the needed sensors delivered).
|
|
|
Post by papa on Apr 20, 2017 17:00:49 GMT
Again, pato, good to hear from you & welcome to this DIY Home Automation forum. Sounds like you started with the Uber instructable & then moved to this "Building a Home Automation Network for Beginners" thread. I'm thrilled that things are working for you & we'd love to hear what you build next & anything else you learn that is not documented well enough on the forum.
Thanks for sharing your experience with OpenHAB2 & MQTT. That could help others.
You said "I have a spare Uno now." I assume that spare came from using one Arduino compatible for a gateway rather than the 2 in the Uber instructable. One question ... Do you mean a regular 5 volt Arduino or are you using "Uno" to indicate a BUONO Uno which operates at 3.3 volts on the digital pins & is thus safe for the RFM69 radios?
PS When one starts OpenHAB running, items are unitialized. Then when rules combine item states into one summarizing item, that may cause errors to show for a while due to null state of items. (This is especially true of weather items & how long between updates.) Once the items' states are no longer null, the combining rules should not generate errors.
|
|
pato
New Member
Posts: 8
|
Post by pato on Apr 20, 2017 21:23:31 GMT
I'm using the Buono Uno ones, switched to 3,3V. And yes I was using two before for the gateway functionality and migrated that as per your sketch to one. I did bend the pin as advised somewhere to protect the radio from 5V which is connected to the ethernet shield. Thanks for your help!
|
|