[SOLVED]Alexa intigratuon item definition

  • Platform information: Openhab 2
    • Hardware: Raspberry Pi3B
    • openHAB version:Openhab 2.4

I have connected esp8266 for to control switches using mqtt1 binding & mosquito.
I have defined 6 items in demo.items as mentioned below & it works fine.
I already linked Openhab skill with myopenhab account in Alexa app.
I don’t know how to connect my items with Alexa.
I tried to put [“Lighting”] after each thing definition but it not working.
Demo.items as below

Switch Fan {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/fan:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/fan:command:OFF:0],<[mosquitto:ashish/bed1/sw1/sts/fan:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/fan:command:OFF:0]"}

Switch Front_Light {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/front_light:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/front_light:command:OFF:0],<[mosquitto:ashish/bed1/sts/cmd/front_light:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/front_light:command:OFF:0]"}

Switch Rear_Light {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/rear_light:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/rear_light:command:OFF:0],<[mosquitto:ashish/bed1/sw1/sts/rear_light:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/rear_light:command:OFF:0]"}

Switch Night_Lamp {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/night_lamp:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/night_lamp:command:OFF:0],<[mosquitto:ashish/bed1/sw1/sts/night_lamp:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/night_lamp:command:OFF:0]"}

Switch Socket1 {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/socket1:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/socket1:command:OFF:0],<[mosquitto:ashish/bed1/sw1/sts/socket1:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/socket1:command:OFF:0]"}

Switch Socket2 {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/socket2:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/socket2:command:OFF:0],<[mosquitto:ashish/bed1/sw1/sts/socket2:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/socket2:command:OFF:0]"}

Switch All_Devies {mqtt=">[mosquitto:ashish/bed1/sw1/cmd/all_device:command:ON:100],>[mosquitto:ashish/bed1/sw1/cmd/all_device:command:OFF:0],<[mosquitto:ashish/bed1/sw1/sts/all_device:command:ON:100],<[mosquitto:ashish/bed1/sw1/sts/all_device:command:OFF:0]"}

The lighting goes before {} brackets.

1 Like