Jump to content

Recommended Posts

Geschrieben

Hi,

 

connected a LED to A0 of the IO16 bricklet. Using the Brick Viewer and setting the Port Direction to Output, the LED can be turned on and off via changing the value Low to High vv.

 

Tried to setup the same by using openHAB, but the LED is not reacting.

Any hints what is worng in below openHAB Testconfiguration having Port A0 as output outa0?

 

#openhab.cfg

tinkerforge:hosts=127.0.0.1

tinkerforge:io16.uid=gkM

tinkerforge:io16.type=bricklet_io16

tinkerforge:io16.debouncePeriod=100

tinkerforge:io16outa0.uid=gkM

tinkerforge:io16outa0.subid=outa0

tinkerforge:io16outa0.type=io_actuator

tinkerforge:io16outa0.defaultState=true

 

#items

Number TF_AmbientLight "Luminance [%.0f lx]" { tinkerforge="uid=mdh" }

Switch outa0 "LED A0" { tinkerforge="uid=gkM, subid=outa0" }

 

#rules

import org.openhab.core.library.types.*

 

rule "LED Switch"

when

Item outa0 changed

then

if (outa0.state == true)

sendcommand(outa0, false)

else

sendcommand(outa0, true)

end

 

NOTE: Instead of true false also tried ON OFF.

 

#sitemap

sitemap tf_weather_station label="Weather Station"

{

Frame

{

Text item=TF_AmbientLight

Switch item=outa0

}

}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...