I thought I’d document some stuff here on my openHAB setup, to get some tips or suggestions from the community.
My name is Aaron. I live in Australian. I’m really interested in IoT in the last year or so and home automation, and slowly automating and smartifying my existing house as I go.
Setup
So I’m running openHAB on a Raspberry Pi 3. I used the Openhabian installer, and it was a fairly straight forward installation from my friend MK Smart House. Thanks I friend.
General
I actually started out my beginner journey with MK-Smart House video.
My MK Sprinkler was my first real step into an actual smart home, and I had lots of fun playing around, the wireless switch with useing the App on my phone is good,
Matt from MK-Smart House show how to manually program rules.
Next I got 3 Yeelight Lights (just useing one right now as there are Screwing bulbs)
I have and fronius solar inverter what I have a Bridge in “things” to get info from
I have the Open Weather Map Binding but am looking to move to Bom (what is a Australian weather website.
I also have 1 google home, 1 google mini, 1 google Chromecast working with OpenHab
Broadlink work with MQTT to turn on and off my Projector and HiFI.
Stuff that isn’t working right
So there is a few stuff I’m trying that isn’t working correctly yet, and I’m working on it. =P
*Need to make some “Rules” to not water when rain is coming.
*I have a old tablet, which I have not got HABPanel on or anything of openhab on it yet, wait to have the right tools that I like
*I have InfluxDB and Grafana, get some dater from my solar but have been able to moved the graph to openhab yet.
*I like to make an graph that counts how long I water my plants and convert into liters.
*Looking to Monitor how much power I using and selling back to the power grid
*I got 2 Digoo BB-M1X Ip camera’s yet to be put into Openhab yet to be don have been told have to use this software IspyConnect thanks to BK Hobby.
*I also have 2 wemos thinking of making something like this with taking temperature also.
I like to show my Items and sitemaps and Rules and my influxdb.persist file (I just started with grafana)
So if I have stuff some thing up I like to know.
home.Items
//This is the Items File
//Sprinkler System
Switch MKSprinklerSystemZone1 "Mock Orange Hedges" <rain> [ "Switchable" ] {mqtt=">[broker:MKSmartHouse/utilities/MkSprinklerSystem:command:ON:Z1ON],>[broker:MKSmartHouse/utilities/MkSprinklerSystem:command:OFF:Z1OFF],<[broker:MKSmartHouse/utilities/MkSprinklerSystem/state:state:ON:Z1ON],<[broker:MKSmartHouse/utilities/MkSprinklerSystem/state:state:OFF:Z1OFF]", autoupdate="false"}
Switch MKSprinklerSystemZone2 "Greenhouse" <rain> [ "Switchable" ] {mqtt=">[broker:MKSmartHouse/utilities/MkSprinklerSystem:command:ON:Z2ON],>[broker:MKSmartHouse/utilities/MkSprinklerSystem:command:OFF:Z2OFF],<[broker:MKSmartHouse/utilities/MkSprinklerSystem/state:State:ON:Z2ON],<[broker:MKSmartHouse/utilities/MkSprinklerSystem/state:State:OFF:Z2OFF]", autoupdate="false"}
Switch MKSprinklerSystemZone3 "Herb Garden" <rain> [ "Switchable" ] {mqtt=">[broker:MKSmartHouse/utilities/MkSprinklerSystem:command:ON:Z3ON],>[broker:MKSmartHouse/utilities/MkSprinklerSystem:command:OFF:Z3OFF],<[broker:MKSmartHouse/utilities/MkSprinklerSystem/state:state:ON:Z3ON],<[broker:MKSmartHouse/utilities/MkSprinklerSystem/state:State:OFF:Z3OFF]", autoupdate="false"}
Switch SprinklerCycle "1 Minute Cycle" <rain>
Switch SprinklerSystemSchedule "Sprinkler System Schedule" <calendar>
//YEELIGHT
Group gLivingRomeYeeLight "Light" <lightbulb> (gLivingRomeYeeLight)
Color CouchLEDColor "Living Room Light" <colorpicker> (gLivingRomeYeeLight) [ "Lighting" ]
Dimmer CouchLEDColorTemp "Living Color Temp" <light> (gLivingRomeYeeLight) [ "Switchable" ]
//Fronius
Group gsolarPanels "Solar" <SUN> (gsolarPanels)
Number AC_Powery "AC POWER" <SUN> (gsolarPanels) { channel="fronius:powerinverter:mybridge:myinverter:inverterdatachannelpac" }
Number Day_Energy "DAY ENERGY" <SUN> (gsolarPanels) { channel="fronius:powerinverter:mybridge:myinverter:inverterdatachanneldayenergy" }
Number Total_Energy "TOTAL ENERGY" <SUN> (gsolarPanels) { channel="fronius:powerinverter:mybridge:myinverter:inverterdatachanneltotal" }
Number Year_Energy "YERA ENERGY" <SUN> (gsolarPanels) { channel="fronius:powerinverter:mybridge:myinverter:inverterdatachannelyear" }
//MK-Room Chromecast
Group gChromecast "Chromecast" <screen> (gChromecast)
Dimmer LivingRoomChromecastVolume "Living Room Chromecast Volume" <soundvolume> (gChromecast) [ "Switchable" ] { channel="chromecast:chromecast:9b4caa68fea98442d4a9a75c66f5263c:volume" }
Player LivingRoomChromecastControl "Living Room Chromecast Control" <mediacontrol> (gChromecast) { channel="chromecast:chromecast:9b4caa68fea98442d4a9a75c66f5263c:control" }
//Broadlink
Group gLiveingRoomBroadlink "TV Remote" <mediacontrol> (gLiveingRoomBroadlink)
Switch Projector "Projector" <projector> (gLiveingRoomBroadlink) [ "Switchable" ] {mqtt=">[broker:broadlink/epson_projector/on:command:ON:play],>[broker:broadlink/epson_projector/off:command:OFF:play"}
Switch Hifi "HiFi" <receiver> (gLiveingRoomBroadlink) [ "Switchable" ] {mqtt=">[broker:broadlink/sonyhifi/on-off:command:ON:play],>[broker:broadlink/sonyhifi/on-off:command:OFF:play"}
//Open westher Map
DateTime owmCurrentStationTimestamp "Time UpDate [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]" <time> {channel="openweathermap:weather:api:local:current#time-stamp"}
String owmCurrentCondition "Condition [%s]" <sun_clouds> {channel="openweathermap:weather:api:local:current#condition"}
Number:Temperature owmCurrentTemperature "Temperatur [%.1f %unit%]" <temperature> {channel="openweathermap:weather:api:local:current#temperature"}
Number:Dimensionless owmCurrentHumidity "Humidity [%.1f %unit%]" <humidity> {channel="openweathermap:weather:api:local:current#humidity"}
Number:Speed owmCurrentWindSpeed "Wind Speed [%.1f km/h]" <wind> {channel="openweathermap:weather:api:local:current#wind-speed"}
Number:Dimensionless owmCurrentWindDirection "Wind Direction [SCALE(wind.scale):%s]" <wind> {channel="openweathermap:weather:api:local:current#wind-direction"}
Number:Dimensionless owmCurrentCloudiness "Cloudiness [%.1f %unit%]" <sun_clouds> {channel="openweathermap:weather:api:local:current#cloudiness"}
Number:Length owmCurrentRain "Rain [%.1f %unit%]" <rain> {channel="openweathermap:weather:api:local:current#rain"}
home.Rules
//This is the Rules File
//If sprinkler system schedule is on then water each zone at 5 am for 20 min
rule "Sprinkler System Schedule"
when
Time cron "0 0 5 1/1 * ? *"
then
if(SprinklerSystemSchedule.state == ON)
{
sendBroadcastNotification("SPRINKLER SYSTEM: Daily Watering Active")
sendCommand(MKSprinklerSystemZone1, ON)
createTimer(now.plusMinutes(0)) [|
sendCommand( MKSprinklerSystemZone1, OFF)
sendCommand( MKSprinklerSystemZone2, ON)
createTimer(now.plusMinutes(2)) [|
sendCommand( MKSprinklerSystemZone2, OFF)
sendCommand( MKSprinklerSystemZone3, ON)
createTimer(now.plusMinutes(2)) [|
sendCommand( MKSprinklerSystemZone3, OFF)
]
]
]
}
end
//If 20 Minute Cycle Switch Is On then water each zone for 20 min
rule "1 Minute Cycle"
when
Item SprinklerCycle received update ON
then
sendBroadcastNotification("SPRINKLER SYSTEM: 1 Minute Cycle Active")
sendCommand(MKSprinklerSystemZone1, ON)
createTimer(now.plusMinutes(1)) [|
sendCommand( MKSprinklerSystemZone1, OFF)
sendCommand( MKSprinklerSystemZone2, ON)
createTimer(now.plusMinutes(1)) [|
sendCommand( MKSprinklerSystemZone2, OFF)
sendCommand( MKSprinklerSystemZone3, ON)
createTimer(now.plusMinutes(1)) [|
sendCommand( MKSprinklerSystemZone3, OFF)
]
]
]
sendCommand(SprinklerCycle, OFF)
end
home.Sitmaps
sitemap home label="AT-SmartHouse"
{
Frame label="Information"{
Text item=owmCurrentTemperature label="Weather [%.1f %unit%]" {
Text item=owmCurrentStationTimestamp
Text item=owmCurrentCondition
Text item=owmCurrentTemperature
Text item=owmCurrentHumidity
Text item=owmCurrentRain
Text item=owmCurrentCloudiness
Text item=owmCurrentWindDirection
Text item=owmCurrentWindSpeed
}
Group item=gsolarPanels
}
Frame label="Living Room"{
Group item=gLiveingRoomBroadlink
Group item=gChromecast
Group item=gLivingRomeYeeLight
}
Frame label="Outside"{
Text label="Sprinkler" icon=garden{
Switch item=MKSprinklerSystemZone1
Switch item=MKSprinklerSystemZone2
Switch item=MKSprinklerSystemZone3
Switch item=SprinklerCycle
Switch item=SprinklerSystemSchedule
}
}
}
influxdb.persist
Strategies
{
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
}
Items
{
owmCurrentTemperature : strategy = everyChange
owmCurrentHumidity : strategy = everyChange
AC_Powery : strategy = everyChange
owmCurrentRain : strategy = everyUpdate
MKSprinklerSystemZone1 : strategy = everyChange
MKSprinklerSystemZone2 : strategy = everyChange
MKSprinklerSystemZone3 : strategy = everyChange
owmCurrentCloudiness : strategy = everyChange
}
I have to say thanks guys for helping me this far
and look forward for any comments or help or corrections.