OpenHab2 and Blynk integration using http binding

Dear community,

I am trying to get my head around OpenHab2. I am pretty deep in using Blynk to control my home and I would love to integrate everything into OpenHab2.

However, I am really having trouble connecting via http binding. Here is what I have tried:

rules

rule "Blynk test"
    when
        Item blynk_test received command
    then
        switch(receivedCommand) {
            case ON : sendHttpGetRequest("http://139.59.206.133:8080/[TOKEN]/update/v6?value=500")
            case OFF : sendHttpGetRequest("http://139.59.206.133:8080/[TOKEN]/update/v6?value=120")
		}
end

items

Switch blynk_test "Blynk_Test"

sitemap

sitemap test label="Test"
{
Frame {
   Switch item=blynk_test
 }
}

This is pretty straight forward and the http command works perfectly from the browser. However, in openhab.log I see the following error:

2017-03-14 13:01:54.786 [ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘Blynk test’: An error occured during the script execution: java/util/function/Consumer

Couple of questions:

  • Why do I get the error?
  • Is there any way to debug what is happening?
  • Any additional thoughts on how I should orgaize the integration? Later on I want to control and measure. So if somebody had an example on how to read values I would be very thankful

Thanks a ton,
Matthias

I thing you need to place item in the switch:

switch(blynk_test)
case On:…
case OFF:…