|
Post by papa on Jan 28, 2019 14:51:40 GMT
OpenHAB & Arduino IDE, Trying Latest Installs
At a place I will call Location A, I have this setup running well (with a glitch or two) on a Windows 7, 64 bit laptop: OpenHAB2.1.0, including the Weather 1.xx binding (using the Weather Underground service). I installed OpenHAB 2.1.0 totally with text files (not PaperUI).
This thread gave my case for configuring OpenHAB 2 (OH2) with text files instead of PaperUI. Below I will note how I'm changing my mind: Using PaperUI for some OpenHAB configuration & still using text files for other configuration.
At Location A, I've been using Arduino IDE 1.6.8 for the node programming. I have not necessarily updated the supplemental libraries since I installed them.
As of Jan. 28, 2019, OpenHAB is up to a 2.5.0 snapshot, 2.1.5.M1 milestone, & 2.4.0 stable version. Sounds like the Weather Underground service will soon not be available, at least on a cheap basis. Other weather bindings & services are available. Later OpenHAB 2 versions offer an embedded MQTT broker.
David_Graeff: "There were a lot of bug fixes recently for all bindings maintained by me which include the network binding, the hue emulation service and the mqtt binding. The “stable” 2.4 release will cause more issues than the milestone 2.5 build."
At another place I'll call Location B, in many ways, I'm starting fresh on a Windows 10, 64 bit laptop. In this thread, I will report what I try & my experiences.
|
|
|
Post by papa on Jan 28, 2019 15:02:03 GMT
Arduino IDE & Libraries at Location BAt Location B, I installed Arduino IDE 1. 8.8. Concerning libraries needed for the RFM69 Gateway & node choices options, I also installed the latest versions, confirming & documenting (in the sketches) the sources of where & how to obtain the libraries. I'm working my way through testing how each node choice option compiles. So far the test compiles of the choose_nodes sketch are going well. The updated RFM69 library required the biggest changes, especially in relation to the wireless OTA programming for Moteinos & Anarduino Miniwireless Arduino compatibles (with installed RFM69 radios & flash memory). When I'm confident about the updated sketch, I will post it in this thread.
|
|
|
Post by papa on Jan 28, 2019 15:41:50 GMT
Installing OpenHAB 2 at Location BIn this post, I reported that the official download site offers an intriguing UNofficial option for Windows: Install OpenHAB2 with Chocolatey. I believe that was the latest stable version (2.4.0). It came with Oracle Java 1.8.191. I was disappointed: OpenHAB 2 was buried at C:\ProgramData\chocolatey\lib\openhab\tools. (I moved all files to C:\openHAB2) Oracle Java 32 bit installed, but 64 bit failed.
wwebers: "according to Oracle we will not get any public updates for their JDK 8 anymore." ranielsen: Amazon looks like they are taking over from Oracle. They will be providing a supported versions of OpenJDK 8 for a few years: aws.amazon.com/corretto/ I experimented with OpenHAB versions from 2.4.0 down to 2.2.0, trying to configure with text files. I did not have much success, especially with 2.xx bindings (like ntp & network). Often (with no discernible help), I deleted the \userdata\cache & tmp folders to clear the cache. I experimented some with installing the embedded MQTT broker & was not confident with results. At the moment, I have a working (separate) Mosquitto broker service running. Since text configuration files were mostly not working with the later OpenHAB 2 versions, I'm trying something else: I'm working on an OpenHAB 2.5.M1 (milestone) install. (I downloaded the .zip & extracted it to C:\OpenHAB2.) Before I ran start.bat, I still put configured addons.cfg & runtime.cfg text files into C:\OpenHAB2\conf\services. I used a .thing text file to configure for the network binding. From PaperUI's inbox, I accepted an ntp thing. I used text files to configure 2 items for network & 1 item for ntp (see below. I used PaperUI to link the items to the things. All three items report fine on the basicui sitemap. The log reported: MQTT Service initialization completed & Starting MQTT broker connection 'mosquitto' Later I will program an RFM69 Gateway & node & will confirm the MQTT connection is working via the MQTT 1.14.0.M1 binding. To Be Continued
|
|
|
Post by papa on Jan 28, 2019 19:51:29 GMT
Adding RFM69 Gateway & NodeUsing the sketch from here, I programmed a Gateway to use Network One. The Gateway immediately connected with my local network & MQTT / Mosquitto. Using a sketch updated from the one here (with current libraries), I programmed an end Node 05 which combines this one with this one (using the DS18B option).
So this end node has a DS18B temp sensor on Arduino D3, a DHT temp/humidity sensor on D4, a push button on D8, & a solid state relay controlled by D9.
To Be Continued
|
|
|
Post by papa on Jan 28, 2019 20:02:38 GMT
Configuration Text Files Connect the Above Node to OpenHAB 2.5.0.M1 / Mosquitto
I have several custom icons in OpenHAB's \conf\icons\classic folder, which include comfort_level.svg. (The other icons came with OpenHAB's install.)
I have an .items configuration text file with the following entries:
Group Gateways // Gateways, Router Switch Router_Active "Router [%s]" <network> (Gateways) { channel="network:device:192_168_10_1:online" } Number RouterResponseTime "Router Response Time [%.2f]" <network> (Gateways) { channel="network:device:192_168_10_1:latency" } Group Network (All) // homeautomation.proboards.com/thread/51/force-update-item-openhabGroup Nodes (Network) // Uptime, BATT_Voltage, SW_Version, RSSI String Node5Rssi "Base_FR_05_RSSI (db)[%s]" <network> (Nodes) {mqtt="<[mosquitto:home/rfm_gw/nb/node05/dev02:state:default]", mqtt=">[mosquitto:home/rfm_gw/sb/node05/dev02:command:*:default]", expire="3m,Offline?" } Number Node5Voltage "Base_FR_05_Volts [%.2f Vdd]" <battery> (Nodes) {mqtt="<[mosquitto:home/rfm_gw/nb/node05/dev04:state:default]"} Switch Act_Node05 { mqtt="<[mosquitto:home/rfm_gw/nb/node05/dev16:state:default::]", mqtt=">[mosquitto:home/rfm_gw/sb/node05/dev16:command:*:default]" } Number Temperature_Node05 "Temp_BaseFR05 [%.1f °F]" <temperature> {mqtt="<[mosquitto:home/rfm_gw/nb/node05/dev48:state:default]"} Number Humidity_Node05 "Humidity_BaseFR05 [%d %%]" <humidity> {mqtt="<[mosquitto:home/rfm_gw/nb/node05/dev49:state:default]"} String BaseFR_TH05 "BaseFR_TH05 [%s]" < comfort_level> Number DS18_N05 "DS18_N05 [%.1f °F]" <temperature> {mqtt="<[mosquitto:home/rfm_gw/nb/node05/dev50:state:default]"}
In my .things file:
Thing network:pingdevice:devicename [ hostname="192.168.10.1" ]
To Be Continued
|
|
|
Post by papa on Jan 28, 2019 20:29:56 GMT
Configuration Text Files Connect the Above Node to OpenHAB 2.5.0.M1 / Mosquitto I have a .rules config text file with this rule (combines temp & humidity items into one item).
rule BaseFR_Sensed when Item Temperature_Node05 changed or Item Humidity_Node05 changed or Time cron "0 0/1 * * * ?" then var Number T05 = Temperature_Node05.state var Number H05 = Humidity_Node05.state var Number H05_r = (Math::round(H05.floatValue)) var Number T05_r = (Math::round(T05.floatValue * 10.0 ) /10.0) BaseFR_TH05.postUpdate(T05_r + "°F... " + H05_r + "% ") end // ======================================
I have a .sitemap config text file like this:
sitemap My label="My House" { Group item=Nodes label="__Node Health__" icon="network" Group item=Gateways label="__Gateways Info__" icon="signal" Frame { Text item=Router_Active Text item=RouterResponseTime Switch item=Act_Node05 label="BaseFR05" Text item=Temperature_Node05 Text item=Humidity_Node05 Text item=BaseFR_TH05 Text item=DS18_N05 }
Frame {Text item=Date}
}
|
|
|
Post by papa on Jan 28, 2019 20:41:09 GMT
User Interface Results of the AboveThe above programming & configuration (& the Mosquitto / MQTT connection) are working well. That includes the custom icon, which sometimes did not display with OpenHAB 2.1.0.
Besides the data shown on the User Interface (below), I can toggle the node's solid state relay on & off with either the node button or the virtual switch on the User Interface.
This image illustrates the results. Forum members (free registration), click on pic for larger view:
Update, Feb. 3, 2019: In this thread, I document installing OpenHAB 2.5.0.M1, the Embedded MQTT broker, & the OpenHAB 2.xx Bindings: NTP, Network, AND MQTT 2. I used PaperUI except for Items, Rules, & Sitemap. This approach was more tedious than my previous (mostly text configuration) approach, but also went more smoothly than how the previous approach works now.
|
|
|
Post by papa on Feb 16, 2019 15:28:23 GMT
Installing a Current OpenHAB 2 Continues A 2.xx Weather BindingUntil recently I've used the 1.xx Weather binding with data from Weather Underground. Above I wrote: "Sounds like the Weather Underground service will soon not be available, at least on a cheap basis. Other weather bindings & services are available." OpenWeatherMap is weather data service with a nice free package AND OpenHAB offers a 2.xx OpenWeatherMap Binding. OpenWeatherMap offers most of the data types I was using before from Weather Underground & I could get some of the missing data types by calculating from what was available. In another thread, I will document some of my experience with using the OpenWeatherMap service & binding.
|
|
|
Post by papa on Jan 30, 2020 20:41:53 GMT
Updates on Latest openHAB InstallsFor initial installs, I continue to use PaperUI to start configuring openHAB & then add text configuration files of items, rules & sitemaps. Other than it's not using the latest version, I believe this thread on installing openHAB is still relevant. What that approach produced was still workable when I upgraded to openHAB2.5.0 stable & openHAB2.5.1 stable. As this thread describes, I'm now installing/updating openHAB using very helpful scripts.
|
|