Possibilities with OpenHAB

Hi guys

Does anyone know if there is some sort of list or something where we can see what the possibilities are with OpenHAB and the Velbus-binding created by @cedricb?

I’m thinking of

  • blocking some VMB4RY(NO/LD) outputs that are turned on by VMBPIRO (like when the weather is great and you want to sit outside with friends in the evening but those damn LED projectors turn on because of the movement detected). I’d like to block that with a button in Habpanel.
  • showing certain text on VMBGPOD (pex the value of generated energy by solar panels which are not measured by a VMB7IN or similar) (can also be certain reminders like birthdays or whatever)
  • about the above mentioned, do I use screensaver, or memo?
  • other stuff which I don’t know I want them yet :wink:

Grtz
Bernd

*edit: typos

That’s a good idea actually, maybe this very thread could become a repository for ideas?

That’s quite easy.

Use a virtual relay in your Velbus setup that disables the PIR channel, or locks / forces OFF the Light.

Then add that as a switch into openHAB2.

(Don’t forget to add a timer that switches it off again)

Maybe

rule "turn off lock"
when
Time cron "0 0 2 1/1 * ?" // you'll have to check this Cron, as it's a guess // Try this site http://www.cronmaker.com/

then

OutdoorLightLock.sendCommand(OFF)

end

Super easy with a rule like this

rule "solar data to oleds"

when

Item SolarKWH changed
or
 Item SonosNowPlaying changed
or
Item NewsHeadlines changed

then

if (triggeringItem.name == "SolarKHW"){

OLEDMemo.sendCommand("The Solar is generating "+SolarKWH.state+" KWH")
}
else
{
OLEDMemo.sendCommand(triggeringitem.state)
}
end
1 Like

Did the following:


And in the .items file:

Switch Blokkeer_Faar_Terras "Blokkeer faar terras" {channel="velbus:vmb4ryld:bridge:07:CH5", expire="1h, command=OFF"}

I think the one hour expire is better than a fixed time, one can never know how long you’ll be sitting outside with friends :smile:

1 Like

Yeah, that’ll work.

I’m really glad to see that it didn’t take you long to deploy your idea :smile: and I like your use of the expire binding.
I only started using that a few months ago. Now I can see how you’ve used it, it makes much more sense to me.

Although I might have gone for 4 hours or more :slight_smile:

One other thing you might like to think about, is how to get your Velbus buttons to control other things

This is a starting point

rule "Velbus button to control other"
when
Channel "velbus:vmbgp2:bridge:AB:Ch01" triggered PRESSED
then

if (SomethingElse.state == ON) {
Something else.sendCommand(OFF)
}
else
{
SomethingElse.sendCommand(ON)
}
end

rule "something else feedback"
when
Item SomethingElse changed
then
if (SomethingElse.state == ON) {
VMBGP2ABCH01feedback.sendCommand("SET_LED")
}
else
{
VMBGP2ABCH01feedback.sendCommand("CLEAR_LED")
}
end

I used it for my garage door first: :smile: (I’ve read it’s better than Thread::sleep(1000)
{channel="velbus:vmb4ryno:bridge:32:CH3", expire="1s, command=OFF"}

I use those to turn my Yamaha amplifier on or off

rule "YamahaKeukenAllOff"
when
Channel 'velbus:vmbgpod:bridge:18:input#CH8' triggered PRESSED // Could be RELEASED or LONG_PRESSED
then
Yamaha.sendCommand(OFF)
end

rule "YamahaKeukenOn"
when
Channel 'velbus:vmbgpod:bridge:18:input#CH3' triggered PRESSED // Could be RELEASED or LONG_PRESSED
then
Yamaha.sendCommand(ON)
end
1 Like

I’m confused about that OLED memo & screensaver.
Could you explain me the difference please?

Also, if I use this as thing and rule:

String Memo_Keuken "OLED memo keuken" {channel="velbus:vmbgpod:bridge:18:oledDisplay#MEMO"}
Memo_Keuken.sendCommand("Test 2")

Then all I get on the OLED display is ON, so no text. :thinking:

Nevermind, found it myself. There was a fault in the habpanel button :man_facepalming:

1 Like

Good morning

I’m glad you’ve got your MemoText setup too.

I’m sure you’ll think of lots of things to do with it.

It’s worth knowing that there isn’t a time out and the text will scroll forever, if you don’t reset it by sending an empty command.

Which got me thinking…

Would this work?

String Memo_Keuken "OLED memo keuken" {channel="velbus:vmbgpod:bridge:18:oledDisplay#MEMO", expire="1h, command='' "} // I'm not sure how to send an empty string within the expire binding, so would 2 x ' work? (I believe single quotes and double quotes can be used to escape text???)

Have you worked this out?

Screensaver is the Enable switch for the function of the OLEDs that is configurable in VelbusLink

MemoText is the scrolling text, that can be enabled for any page (always enabled during screensaver)

So what’s next in your list of ideas?

Best wishes,

Stuart

You could go wild and have this pair of rules for your amp

rule "YamahaKeuken Toggle"
when
Channel 'velbus:vmbgpod:bridge:18:input#CH8' triggered PRESSED // Could be RELEASED or LONG_PRESSED
then

if (Yamaha.state == ON){
Yamaha.sendCommand(OFF)
}
else
{
Yamaha.sendCommand(ON)
}
end

rule "Yamaha state to feedback"
when
Item Yamaha changed
then

if (Yamaha.state==ON){
OLED18ch8Feedback.sendCommand("SET_LED")
}
else
{
OLED18ch8Feedback.sendCommand("CLEAR_LED")
}

end

Possible states for feedback LEDs are

  • CLEAR_LED
  • SET_LED
  • SLOW_BLINK_LED
  • FAST_BLINK_LED
  • VERY_FAST_BLINK_LED

I’m not sure about the expire with string items, so I “fixed” it like this:
Items-file:

String Memo_Keuken "OLED memo keuken" {channel="velbus:vmbgpod:bridge:18:oledDisplay#MEMO"}
Switch Screensaver_Keuken "screensaver keuken" {channel="velbus:vmbgpod:bridge:18:oledDisplay#SCREENSAVER"}
Switch Oled_Screensaver "OLED keuken screensaver" [Switchable]

Rules-file:

rule "text to oleds"
when
Item Oled_Screensaver received update
then
Memo_Keuken.sendCommand("Today : " + Solar_Today.state + " kWh, Total : " + Solar_Total.state + " kWh") 
//logInfo("Memo_Keuken", "Text memo keuken = " + Memo_Keuken.state.toString.trim)
if ( Oled_Screensaver.state == ON ) {
    Screensaver_Keuken.sendCommand(ON)}
else {
    Screensaver_Keuken.sendCommand(OFF)}    
end

So right now I switch it on with Habpanel, and then switch it back off again. I’ll see if i can set an expire on the item Oled_Screensaver, or else I’ll use a timer.
For me it’s not that important to constantly be able to see the value of the solar, just curious if it would work or not :wink:

1 Like

I like the idea of setting the feedback LEDs but to me it’s not intresting, because:

  • my living room and kitchen is one long open space
  • I only have 3x VMBGPOD in my ground floor
    • one at my front door
    • one at my back door
    • one roughly in the center, which is where my stairs are
  • (and 4x VMBPIRM for toilet, cellar, entrance, "passage to the back door where my washing machine is)
  • I have like 9 lighting circuits (seperate from the ones switched with the VMPIRM), 1 rollershutter, 3 switched sockets, some openhab-switchables (like my amp)

So I’ve got to be creative in what I switch on which panel, meaning I’ve got like 3-4 pages on each panel.
So feedback on openhab items is not really what I need, but I do like the possibility.

Who knows :man_shrugging:
Time will tell :slight_smile:

1 Like

Fair point.

It’s a delicate balancing act.

I only meant that you could free up a button on your Oled by turning a single button into a toggle and adding feedback to that single button.