Openhab2 + mqtt: PIR working, switch does not



  • I have just installed openhab2 with mosquitto and the mqtt gateway on my raspi. I made a motion sensor with an arduino nano, which totally works in openhab.The item entry is:
    Number PIR "Bewegungsmelder" {mqtt=">[broker:mysensors-out/10/1/1/0/16:state:default]"}

    Now I wanted to create a switch, which is basically a 433MHz module sending a 24 bit string to control a 433MHz wall plug.
    Item entry:
    Switch SW2 "Lampe" {mqtt=">[broker:mysensors-in/11/1/1/0/16:command:on:000000000000000000000111],[broker:mysensors-in/11/1/1/0/16:command:off:000000000000000000000110]"}

    Now when I add the switch to my basic ui and I toggle it, nothing happens. When I send the 24 bit via mqtt.fx to the topic mysensors-in/11/1/1/0/16 it works. But when I toggle the switch in openhab, I don't see an entry in mqtt.fx

    What did I do wrong?



  • Omg.. Topic can be closed. After hours and hours of search, try and error, I noticed I called the switch SW2 in the items file and SW1 in the sitemap..


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 15
  • 24
  • 2
  • 2

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts