[SOLVED] Alexa does not know current light state

Alexa works with my desklamp with both power on/off and dimming. But Alexa has no clue if the light is currently on. OpenHAB reports lamp state correctly, even when i manually set the light (it talks on mqtt about state changes).

Alexa is the desk lamp on?
Desk Lamp doesn’t support that…

    
    openhab25:/etc/openhab2/things# cat mqtt.things
    Bridge mqtt:broker:rabbit
    [
      host="192.168.1.81",
      clientID="openhab",
      lwtQos=0,
      qos=0,
      reconnectTime=60000,
      lwtRetain=true,
      keepAlive=60,
      secure=false,
      publickeypin=true,
      username="****",
      password="****"
    ]




    openhab25:/etc/openhab2/things# cat lamplight.things
    Thing mqtt:topic:LampLight "Lamp Light" (mqtt:broker:rabbit) @ "Buddy's Room" {
    Channels:
      Type switch : LampPower [ stateTopic="homie/5ccf7f124d1f/light/power",
                            commandTopic="homie/5ccf7f124d1f/light/power/set",
                            on="on", off="off"]
      Type dimmer : LampDimmer [ stateTopic="homie/5ccf7f124d1f/light/dimmer",
                                commandTopic="homie/5ccf7f124d1f/light/dimmer/set"]
    }
    



    openhab25:/etc/openhab2/items# cat lamplight.items
    Group   DeskLamp        "Desk Lamp      "               {alexa="Endpoint.Light"}
    Switch  LampPower       "Lamp Power"    (DeskLamp)      {alexa="PowerController.powerState",
                                                             channel="mqtt:topic:rabbit:5ccf7f124d1f:lamppower"}
    Dimmer  LampDimmer      "Lamp Dimmer"   (DeskLamp)    {alexa="BrightnessController.brightness",
                                                             channel="mqtt:topic:rabbit:5ccf7f124d1f:lampdimmer"}
    

I have not tried the V3 syntax yet but you can add the V2 tagging [“Lighting”] and see if that helps.

This is a limitation on the Alexa side. Not all capabilities supports state voice requests.

https://www.openhab.org/docs/ecosystem/alexa/#request-not-supported

TY for the link to that doc. While it says “implies a limitation on the Alexa side.” i feel this is just worded in a way leading to believe it is out of the hands of OpenHAB. Yet the Alexa side has docs claiming to support state reporting of PowerController, which causes me to speculate on the word “implies”.

https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-powercontroller.html#state-report

{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "<an OAuth2 bearer token>"
      },
      "endpointId": "<endpoint id>"
    },
    "payload": {}
  },
  "context": {
    "properties": [
      {
        "namespace": "Alexa.PowerController",
        "name": "powerState",
        "value": "OFF",
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 0
      }
    ]
  }
}

I will search through bug reports to find the source of Request Not Supported / state of a PowerController in the docs.

Thanks for setting me off in the right direction!
~Teli

While PowerController supports state reporting via the Alexa app, it doesn’t when requesting the state by voice. This is the limitation I was referring to. There is unfortunately nothing that can be done on the openHAB side to circumvent this.