Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.77k stars 1.64k forks source link

Sonoff S40 Lite Power On State UNSUPPORTED_ATTRIBUTE #16941

Closed ptr727 closed 1 year ago

ptr727 commented 1 year ago

What happened?

I installed a Sonoff S40 Lite in a cabinet to reset my AV equipment when it fails to work properly.
I use HA to configure the plug power on state to be "on".
Had a brief power failure last night, and this morning AV equipment was off.

Went into Z2M, set power to on.
And then set power on behavior to on, and got an error:

Error 2023-03-06 07:48:23Publish 'set' 'power_on_behavior' to 'Sonoff-Plug-79B00F' failed: 'Error: Write 0x00124b002579b00f/1 genOnOff({"startUpOnOff":1}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE')'

Attributes:

{
    "last_seen": "2023-03-06T16:23:40.777Z",
    "linkquality": 54,
    "state": "ON",
    "update": {
        "installed_version": 4352,
        "latest_version": 4099,
        "state": "idle"
    },
    "update_available": false,
    "device": {
        "dateCode": "20220606",
        "friendlyName": "Sonoff-Plug-79B00F",
        "hardwareVersion": 1,
        "ieeeAddr": "0x00124b002579b00f",
        "manufacturerID": 4742,
        "manufacturerName": "SONOFF",
        "model": "S40ZBTPB",
        "networkAddress": 15820,
        "powerSource": "Mains (single phase)",
        "softwareBuildID": "1.1.0",
        "type": "Router",
        "zclVersion": 3
    },
    "power_on_behavior": null
}

What did you expect to happen?

Set the power on state to the desired value.

How to reproduce it (minimal and precise)

Exposes power_on_behavior set to on.

Zigbee2MQTT version

1.30.2 commit: cdf62ea

Adapter firmware version

20221226

Adapter

tubezb-cc2652p2-ethusb-2022

Debug log

z2mlog.log

Koenkk commented 1 year ago

Doesn't seem to be supported for the device, I've disabled it.

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

ptr727 commented 1 year ago

Thank you, too bad, I'll need to replace them with something that remembers state. Maybe also update the device page? https://www.zigbee2mqtt.io/devices/S40ZBTPB.html#sonoff-s40zbtpb

Per Amazon complaints the device also powers on in the off state, does not remember last state: https://www.amazon.com/gp/product/B09XMH3X3G/

scyto commented 1 year ago

The database should also be updated IMO to be clear this is not the S40ZBTPB but actually the S40ZBTPB Lite It is unclear to me if the non-lite version was ever released, but it is on their website (it supports power monitoring)