Hey,
maybe anyone can help me? I dont get it where my mistake is:
.sitemap
{
Frame label="Leinwand" {
Switch item=Leinwand_oben
Selection item=Leinwand_oben_FX mappings=[1="BPM",2="Noise",3="Fire",4="Rainbow",5="Twinkle",6="Glitter",7="Solid",8="Sinelon",9="Juggle",10="Confetti",11="Dots",12="Lightning",13="Candy Cane",14="Cyclon Rainbow",15="Ripple",16="Christmas Alternate",17="Police All",18="Police One",19="Random Stars",20="Sine Hue"]
Colorpicker item=Leinwand_oben_Color
Setpoint item=Leinwand_oben_Speed minValue=5 maxValue=240 step=5
Setpoint item=Leinwand_oben_Intensity minValue=0 maxValue=255 step=16
.items
String Leinwand_oben "Leinwand" {mqtt=">[broker:home/LeinwandUp/set:state:*:default]"}
Switch Leinwand_oben_Power "Leinwand AN/AUS" (Status){mqtt=">[broker:home/LeinwandUp/set:command:*:MAP(LEDStripEffectJSON.map)]"}
Number Leinwand_oben_FX "Leinwand Fx" (Status){mqtt=">[broker:home/LeinwandUp/set:command:*:MAP(LEDStripEffectJSON.map)]"}
Color Leinwand_oben_Color "Leinwand Farbe" <rgb> (Status)
Number Leinwand_oben_Speed "Leinwand Speed [%.0f]" (Status)
Number Leinwand_oben_Intensity "Leinwand Intensity [%d]" (Status)
.rules
rule "LED Strip Leinwand JSON Color"
when Item Leinwand_oben_Color received update
then Leinwand_oben.sendCommand("{\"color\": {" +
"\"r\": " + (Leinwand_oben_Color.state as HSBType).red + "," +
"\"g\": " + (Leinwand_oben_Color.state as HSBType).green + "," +
"\"b\": " + (Leinwand_oben_Color.state as HSBType).blue + "}}") end
rule "LED Strip Leinwand JSON Speed"
when Item Leinwand_oben_Speed received update
then Leinwand_oben.sendCommand("{\"transition\": \"" + Leinwand_oben_Speed.state + "\"}") end
rule "LED Strip Leinwand JSON Intensity"
when Item Leinwand_oben_Intensity received update
then Leinwand_oben.sendCommand("{\"brightness\":" + Leinwand_oben_Intensity.state + "}") end
the mosquitto log:
1550419826: New connection from 192.168.178.77 on port 1883.
1550419826: New client connected from 192.168.178.77 as LeinwandUp (c1, k15, u'openhabian').
1550419826: Sending CONNACK to LeinwandUp (0, 0)
1550419826: Received SUBSCRIBE from LeinwandUp
1550419826: home/LeinwandUp/set (QoS 0)
1550419826: LeinwandUp 0 home/LeinwandUp/set
1550419826: Sending SUBACK to LeinwandUp
1550419826: Received SUBSCRIBE from LeinwandUp
1550419826: home/LEDStrip_Leinwand/set (QoS 0)
1550419826: LeinwandUp 0 home/LEDStrip_Leinwand/set
1550419826: Sending SUBACK to LeinwandUp
1550419826: Received PUBLISH from LeinwandUp (d0, q0, r1, m0, 'home/LeinwandUp', ... (97 bytes))
1550419826: Sending PUBLISH to 0567bfe1478248479f256b2b020ac5d4 (d0, q0, r0, m0, 'home/LeinwandUp', ... (97 bytes))
1550419841: Received PINGREQ from LeinwandUp
1550419841: Sending PINGRESP to LeinwandUp
so far everything seems to work fine. even if I listen with mqtt.fx i can see the esp8266 but it wont recognize anything from the openhab.
this is what the mqtt.cfg looks:
pid:org.openhab.mqtt
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with an ID you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
pinguinbau.url=tcp://localhost:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a random default is generated.
#broker.clientId=openhab2.0
# Optional. True or false. If set to true, allows the use of clientId values
# up to 65535 characters long. Defaults to false.
# NOTE: clientId values longer than 23 characters may not be supported by all
# MQTT servers. Check the server documentation.
#<broker>.allowLongerClientIds=false
# Optional. User id to authenticate with the broker.
pinguinbau.user=openhabian
# Optional. Password to authenticate with the broker.
pinguinbau.pwd=secret
Any suggestions where the mistake is?
Thank you a lot and a nice rest weekend:)