Make Project Home Automation

Hi All,

would like to share as an openHAB Beginner, my Make Project Home Automation.
Documented my learning’s (PDF format).
Thanks to the makers of openHAB and its community.

Objectives
To build a Home Automation solution, running on a Raspberry Pi with openHABian and openHAB2.

As an openHAB Beginner

  • The main goal is to learn openHABian & openHAB2.
  • Get a Home Automation solution up & running and extend.
  • There might be better solutions for things shared – but the solution works fine so far.
  • Getting motivated to develop more with openHAB.

Features

  • Display temperature & humidity measured in living room, basement & garage.
  • Display weather information obtained from the OpenWeatherMap service.
  • Charts for selective items weather and room temperature & humidity.
  • Control Somfy roller shutters with RTS motors in living room and bed room.
  • Security door & window wireless contact detector
  • Power Consumption metering.
  • MQTT subscribe & publish messages to trigger actions or information.
  • Add more features whilst developing …

Explore How To

  • Setup & configure openHABian & openHAB2.
  • Use the RFXCOM RFXtrx USB RF Transceiver (RFXtrx433E) for devices Temperature & Humidity, Wind (test only).
  • Security devices.
  • Use external services, i.e. OpenWeatherMap.
  • Use actions, i.e. MQTT.
  • Create advanced User Interfaces, i.e. HABPanel & Node-RED.

Approach

  • Setting up the Raspberry Pi, RFXCOM with connected devices, Somfy roller shutters and other devices. Use the Paper UI for Binding, Things, Channel configuration.
  • Create the Basic UI textual configuration files including rrd4j charts & MQTT.
  • Planned HABPanel & Node-RED (not included in this document)


image

7 Likes

:+1:
That looks real good.
I noticed you are using the DEFAULT Settings for the rrd4j database archives. Having such a comprehensive Manual I would have expected more detail on this topic. Especially the part of how rrd4j does data compression should be explained at more depth (I’m fed up by those comments about rrd4j doing “unknown/undocumented things with the data”).

If you want, I can write something on that for you.

1 Like

Thanks :grinning:
As a starting point, wanted simple charting for which rrd4j does its jobs for now.
Regarding rrd4j, I do not have deeper knowledge. Just used what has been explained in the openHAB documentation … but started to explore

  • rrd4j source code to understand more about how rrd4j functions - so far rrd4j is s black box.
  • alternatives, i.e. Grafana = find complex to use = need to dive deeper.

Happy if you can share more about rrd4j = Appreciated.

1 Like

I’d add it as a note at the the end of the rrd4j/Chart section:

Note:
rrd4j does save the data in an adjustable number of archives, each one does hold the data backwards from now for an adjustable timeframe. The first archive allways holds the data in a resolution of one entry per minute, each following archive is calculated from the entries in archive one by compressing a number of data points (using a “consdolidation-function” like: AVERAGE, MAX, MIN, etc).
When creating a chart from a rrd4j database for a specific timeframe, the data is fetched from the archive that covers the desired timeframe.
The setup of those archives is done in the file etc/openhab2/services/rrd4j.cfg, If such a file doesn’t exist openHAB will use a default setting [consolidation function: AVERAGE, archives (covering time / resolution) 1 (8 hrs / 1 min), 2 (24 hrs / 4 min), 3 (150:16 hrs / 14 min), 4 (30 days / 1 hr), 5 ( 365 days / 12 hrs), 6 (3640 days / 7 days) ]

1 Like

Thanks for the comprehensive information. Have added to the document (page 32) with credits.
In addition have been further amending; to mention Raspberry Pi to Raspberry Pi direct Ethernet Connection, updated the To-Do-List.
Next is to implement error handling in rules - esp for network issues.

Gentlemen, can you tell me more about your experience in terms of range of a RFXtrx433E. I plan to buy one RFXtrx433E to control 15 roller shutters for the entire house which includes ground level, first and second level with two concrete ceilings in between. Do you think I can still reach the Somfy motors in the second level when the transceiver would be placed in my lab (ground floor)?
Based on some quick internet research Range test, it seems that there shouldn’t be any problems but I wanted to check first. Appreciate your advice.

Hi,

(Reply Post #6) for the solution shared:

  • placed the RFXtrx433E (and the Raspberry Pi’s with WLAN) in the basement (ground level).
  • controlled, without any issues, roller shutters in several rooms on the first floor.
  • the concrete ceiling has a thickness of around 30cm.
  • estimated distance from the RFXtrx433E to the roller shutters vary between 25 - 50m.

Hope this info helps in making your decision.

1 Like

Robert, appreciate your quick response. Sounds great. Will go for an RFXtrx433E following your implementation.:+1:

Hi Robert, just wanted to share with you my successful implementation of the RFXtrx433E to control all of my rollershutters. It really works great.

Robert, I do have a question though: if I have created item descriptions for my shutters in a specific items file, see below:

Group:Rollershutter:OR(UP, DOWN)	gShutters		 "Alle Rollläden [%d]"			<rollershutter>
Group:Rollershutter:OR(UP, DOWN)	gShutters_EG	 "EG Rollläden [%d]" 			<rollershutter> (gShutters)
Group:Rollershutter:OR(UP, DOWN)	gShutters_OG	 "OG Rollläden [%d]" 			<rollershutter> (gShutters)
Group:Rollershutter:OR(UP, DOWN)	gShutters_SOUTH	 "Südl. Rollläden [%d]" 		<rollershutter> (gShutters)
Group:Rollershutter:OR(UP, DOWN)	gShutters_WEST	 "West. Rollläden [%d]" 		<rollershutter> (gShutters)
Group:Rollershutter:OR (UP, DOWN)	gShutters_Office "Büro Rollläden [%d]"			<rollershutter> (gShutters)

Rollershutter aShutters_EG_Office 					"Büro" 							<rollershutter> (gEG_Office, gShutters_Office, gShutters_WEST, gShutters_EG, gEG) 	{ channel="rfxcom:rfy:f952f7c1:shutter" }
Rollershutter aShutters_EG_Kitchen 					"Küche"							<rollershutter>	(gEG_Kitchen, gShutters_SOUTH, gShutters_EG, gEG)	{ channel="rfxcom:rfy:d007a0b1:shutter" }
Rollershutter aShutters_EG_LivingDining   			"Wohn-Esszimmer"				<rollershutter>	(gEG_LivingDining, gShutters_EG, gEG)				{ channel="rfxcom:rfy:c0638629:shutter" }
Rollershutter aShutters_EG_Bedroom1 				"Schlafzimmer"					<rollershutter>	(gEG_Bedroom, gShutters_EG, gEG)					{ Channel="rfxcom:rfy:67a6d38d:shutter" }
Rollershutter aShutters_EG_LivingEast 				"Wohnzimmer Ost"				<rollershutter>	(gEG_LivingRoom, gShutters_EG, gEG)					{ channel="rfxcom:rfy:7d5c4e13:shutter" }
Rollershutter aShutters_EG_LivingTerrase 			"Wohnzimmer Terrassentür"		<rollershutter>	(gEG_LivingRoom, gShutters_SOUTH, gShutters_EG, gEG){ channel="rfxcom:rfy:61335468:shutter" }
Rollershutter aShutters_EG_Stairwell 				"Treppenhaus Keller"			<rollershutter>	(gEG_Stairwell,gShutters_SOUTH, gShutters_EG, gEG)	{ channel="rfxcom:rfy:415b9783:shutter" }

Rollershutter aShutters_OG_Kidsroom 				"Kinderzimmer" 					<rollershutter> (gOG_KidsRoom, gShutters_WEST, gShutters_OG, gOG) 	{ channel="rfxcom:rfy:5023156e:shutter" }
Rollershutter aShutters_OG_Kitchen 					"Küche"							<rollershutter>	(gOG_Kitchen, gShutters_OG, gOG)					{ channel="rfxcom:rfy:1dd7156b:shutter" }
Rollershutter aShutters_OG_Bedroom 					"Schlafzimmer"					<rollershutter>	(gOG_Bedroom, gShutters_OG, gOG)					{ Channel="rfxcom:rfy:75be89dd:shutter" }
Rollershutter aShutters_OG_Bathroom 				"Badezimmer"					<rollershutter>	(gOG_Bathroom, gShutters_OG, gOG)					{ channel="rfxcom:rfy:56dba69a:shutter" }
Rollershutter aShutters_OG_Cloakroom 				"Ankleide"						<rollershutter>	(gOG_Cloakroom, gShutters_OG, gOG)					{ channel="rfxcom:rfy:fb94c2b1:s

I start seeing them twice in Paper UI in the Control area.
image.

I assume this is due to the item specification from the items file and also due to the item creation via Paper UI. Is that a correct assumption?

I do not see two items for one shutter which is also not working via the iOS app.
image

This is Rollershutter:

Rollershutter aShutters_OG_Bedroom 					"Schlafzimmer"					<rollershutter>	(gOG_Bedroom, gShutters_OG, gOG)					{ Channel="rfxcom:rfy:75be89dd:shutter" }

My sitemap looks like:

Group item=gShutters label="Rollläden [%d]" {
			Frame label="Alle" {
				Switch item=gShutters label="Rollläden [%d]" mappings=[UP="Hoch",DOWN="Runter"]
			}
			Frame label="Etagen" {
				Group item=gShutters_EG
				Group item=gShutters_OG
			}
			Frame label="Beschattung" {
				Switch item=gShutters_SOUTH label="Südseite [%d]" mappings=[UP="Hoch",DOWN="Runter"]
				Switch item=gShutters_WEST	label="Westseite [%d]" mappings=[UP="Hoch",DOWN="Runter"]
			}
		}

Can you help and clarify, please.

1 Like

Thank for your request - pls note I am also an openHAB NewBie … in a steep learning curve.
My appraoch:
Defined the Rollershutters as Things in the Paper UI. These things use a dummy location which I called home and do show up in the Paper UI Control Area … BUT I am not using the Control Area and ensured not to use this location in the textual configuration.

In the Item Textual Configuration File defined the shutter like (example):

Rollershutter   aHA_BedRoom_Shutter  "Shutter"  <rollershutter> (gHA_BedRoom)  { channel="rfxcom:rfy:6c53bd1e:shutter" }

In the Sitemap Textual Configuration File defined as:

    Frame label="Bed Room" {
        Switch item=aHA_BedRoom_Shutter
    }

For control using both Browser and the openHAB Android App - which is working fine.

Looks the same as you did - except the mappings, so not sure why your setup is not working.
It might be something with the mappings. Try to control one shutter with a simple setup like shared.