Hi there!
I recently discovered OpenHAB in the search of an automation platform for the house I’m building.
I am using a RPi 2, with Wheezy, after finding out the GPIO binding has some issues with Jessie.
I have been reading and reading the wiki, the forums, and trying different things, but either something is wrong or I still haven’t figured this out.
If I just place a simple contact and switch for a GPIO connected led and button, it works, I’ve even started playing with rules and added a timed output connected to the same led but assigned to a different switch.
Then I wanted to start laying out the house, dividing into groups so when I start adding stuff I can keep things organized. For this I looked at the demo sitemap and tried to follow a similar approach.
The thing is, I can navigate through the group hierarchy I defined, but they show up empty when I open them. I can’t figure out what’s wrong!
The automation scheme is pretty simple. For now I just want to control the external rollershutters and the outdoor garden lighting.
I want to leave room for expansion to add some contacts, control the gates, and build up the system in time.
My intention is that the sitemap provides quick access to the rollershutters, individually and with a general switch, and then a switch for the outdoor lighting, and after that a floor plan to add items to, in time.
Here are my files and the resulting output. “Estores” is portuguese for rollershutters, I wanted all rollershutters to be accessible when clicking the Estores group, but it shows up empty, as does every other group - Jardim (garden) and Divisoes (house compartments) also are empty.
items:
Group Tudo
Group gDivisoes (Tudo)
Group gJardim (Tudo)
Group gEstores (Tudo)
Group gBlackouts (Tudo)
Group gPortoes (Tudo)
Group gClima (Tudo)
Group gEstado (Tudo)
Group gSensores (Tudo)
Group GSala "Sala" <sofa> (gDivisoes)
Group GCozinha "Cozinha" <kitchen> (gDivisoes)
Group GWCCom "WC Comum" <bath> (gDivisoes)
Group GCorredor "Corredor" <corridor> (gDivisoes)
Group GSuite "Suite" <bedroom> (gDivisoes)
Group GWCSuite "WC Suite" <bath> (gDivisoes)
Group GGabinete "Gabinete" <office> (gDivisoes)
Group GQuartoMeio "Quarto do Meio" <bedroom> (gDivisoes)
Group GQuartoPonta "Quarto da Ponta" <bedroom> (gDivisoes)
Group GGaragem "Garagem" <corridor> (gDivisoes)
Group GLavandaria "Lavandaria" <corridor> (gDivisoes)
Group:Switch:OR(ON, OFF) Luzes "Todas as luzes [(%d)]" (Tudo)
Group:Switch:OR(ON, OFF) Climatizacao "Aparelhos ligados [(%d)]" <heating> (Tudo)
Group:Switch:OR(ON, OFF) BaixaEstores "Baixar todos os estores [(%d)]" (Tudo)
Group:Switch:OR(ON, OFF) SobeEstores "Subir todos os estores [(%d)]" (Tudo)
Number temp_ext "Temperature [%.2f °C]" {weather="locationId=home, type=temperature, property=current"}
Number hum_ext "Humidity [%d %%]" {weather="locationId=home, type=atmosphere, property=humidity"}
Contact MotionSensor "Button [%s]" { gpio="pin:18" }
Switch RaspiLED "LED" { gpio="pin:4"}
Switch Pisca
Switch LuzExterior "Luz Exterior" { gpio="pin:8"} (gJardim, Luzes)
Contact PortaoGaragem "Portao da garagem [MAP(en.map):%s]" (gPortoes, gSensores)
Contact PortaoFora "Portao de fora [MAP(en.map):%s]" (gPortoes, gSensores)
Switch Shutter_all (gEstores)
Rollershutter Shutter_WCComum "WC Comum" (GWCCom, gEstores)
Rollershutter Shutter_WCSuite "WC Suite" (GWCSuite, gEstores)
Rollershutter Shutter_CozinhaRua "Cozinha - Lado Rua" (GCozinha, gEstores)
Rollershutter Shutter_Sala_TV "Sala - Lado TV" (GSala, gEstores)
Rollershutter Shutter_Sala_Meio "Sala - Meio" (GSala, gEstores)
Rollershutter Shutter_CozinhaJardim "Cozinha - Lado Jardim" (GCozinha, gEstores)
Rollershutter Shutter_Corredor "Corredor" (GCorredor, gEstores)
Rollershutter Shutter_Gabinete "Gabinete" (GGabinete, gEstores)
Rollershutter Shutter_Lavandaria "Lavandaria" (GLavandaria, gEstores)
Rollershutter Shutter_Garagem "Blackout Garagem" (GGaragem, gEstores)
Rollershutter Shutter_Suite "Suite" (GSuite, gEstores)
Rollershutter Shutter_QuartoMeio "Quarto do Meio" (GQuartoMeio, gEstores)
Rollershutter Shutter_QuartoPonta "Quarto da Ponta" (GQuartoPonta, gEstores)
sitemap
sitemap gpio label="GPIO"
{
Frame label="Hoje"
{
Text item=temp_ext
}
Frame label="Rasperry Pi GPIO"
{
Switch item=RaspiLED
Text item=MotionSensor
Switch item=Pisca
}
Frame label="CASA"
{
Group item=gEstores label="Estores" icon="rollershutter"
Group item=gJardim label="Jardim" icon="garden"
Group item=gDivisoes label="Divisões" icon="house"
}
}
rules:
rule "LED"
when
Item MotionSensor changed
then
if (MotionSensor.state == OPEN) {
RaspiLED.sendCommand(ON) }
else {
RaspiLED.sendCommand(OFF) }
end
rule "Test"
when
Item Pisca received command ON
then
var i = 0
while((i=i+1) < 3) {
sendCommand(RaspiLED, ON)
Thread::sleep(10000)
sendCommand(RaspiLED, OFF)
Thread::sleep(10000)
sendCommand(Pisca, OFF)
}
end
I can only post one image, but clicking on any of the CASA group items leads me down the group hierarchy but in the end they are empty - no switch’s, rollershutters, nothing.