andreasnuesslein / py-teleco-daisy

MIT License
1 stars 2 forks source link

New type of device Light (`21`) #4

Closed AdamFiser closed 1 month ago

AdamFiser commented 1 month ago

I am preparing to support the new id 21 device - LED lights (white only) with adjustable light level. idDeviceType=21

"deviceList": [
    {
        "idInstallationDevice": 99999,
        "idDevicetype": 21,
        "idDevicemodel": 34,
        "deviceCode": "0",
        "remoteControlCode": "1",
        "label": "xyz",
        "deviceIndex": 2,
        "favorite": "N",
        "feedback": "N",
        "activetimer": "N",
        "deviceOrder": 1,
        "directOnly": null
    }
]

response from command-device-list API

"commandList": [
            {
                "idInstallationDeviceCommand": 555555,
                "idDevicetypeCommandModel": 147,
                "commandCode": "POWEROFF",
                "commandAction": "POWER",
                "commandParam": "OFF",
                "lowlevelCommand": "CH8",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": ,
                "idDevicetypeCommandModel": 141,
                "commandCode": "LEVEL25",
                "commandAction": "LEVEL",
                "commandParam": "LEV1",
                "lowlevelCommand": "CH4",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": ,
                "idDevicetypeCommandModel": 142,
                "commandCode": "LEVEL50",
                "commandAction": "LEVEL",
                "commandParam": "LEV2",
                "lowlevelCommand": "CH3",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": ,
                "idDevicetypeCommandModel": 143,
                "commandCode": "LEVEL75",
                "commandAction": "LEVEL",
                "commandParam": "LEV3",
                "lowlevelCommand": "CH2",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": ,
                "idDevicetypeCommandModel": 144,
                "commandCode": "LEVEL100",
                "commandAction": "LEVEL",
                "commandParam": "LEV4",
                "lowlevelCommand": "CH1",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": ,
                "idDevicetypeCommandModel": 146,
                "commandCode": "POWERON",
                "commandAction": "POWER",
                "commandParam": "ON",
                "lowlevelCommand": "CH1",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": ,
                "idDevicetypeCommandModel": 145,
                "commandCode": "LEVEL_CUST",
                "commandAction": "LEVEL",
                "commandParam": "0",
                "lowlevelCommand": "0",
                "deviceIndex": 0
            }
        ],
osteward commented 1 month ago

@AdamFiser I have a light also, Devicetype = 21, but my Devicemodel is different (with slightly different commands) - as follows:

"deviceList": [
                    {
                        "idInstallationDevice": xxxxx,
                        "idDevicetype": 21,
                        "idDevicemodel": 17,
                        "deviceCode": "0",
                        "remoteControlCode": "1",
                        "label": "Light",
                        "deviceIndex": 1,
                        "favorite": "N",
                        "feedback": "N",
                        "activetimer": "N",
                        "deviceOrder": 0,
                        "directOnly": null
                    },

Commands:

`        "commandList": [
            {
                "idInstallationDeviceCommand": 568672,
                "idDevicetypeCommandModel": 41,
                "commandCode": "POWEROFF",
                "commandAction": "POWER",
                "commandParam": "OFF",
                "lowlevelCommand": "CH8",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": 568673,
                "idDevicetypeCommandModel": 42,
                "commandCode": "LEVEL25",
                "commandAction": "LEVEL",
                "commandParam": "LEV1",
                "lowlevelCommand": "CH4",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": 568674,
                "idDevicetypeCommandModel": 43,
                "commandCode": "LEVEL50",
                "commandAction": "LEVEL",
                "commandParam": "LEV2",
                "lowlevelCommand": "CH3",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": 568675,
                "idDevicetypeCommandModel": 44,
                "commandCode": "LEVEL75",
                "commandAction": "LEVEL",
                "commandParam": "LEV3",
                "lowlevelCommand": "CH2",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": 568676,
                "idDevicetypeCommandModel": 45,
                "commandCode": "LEVEL100",
                "commandAction": "LEVEL",
                "commandParam": "LEV4",
                "lowlevelCommand": "CH1",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": 568677,
                "idDevicetypeCommandModel": 40,
                "commandCode": "POWERON",
                "commandAction": "POWER",
                "commandParam": "ON",
                "lowlevelCommand": "CH1",
                "deviceIndex": 0
            },
            {
                "idInstallationDeviceCommand": 568678,
                "idDevicetypeCommandModel": 130,
                "commandCode": "LEVEL_CUST",
                "commandAction": "LEVEL",
                "commandParam": "0",
                "lowlevelCommand": "0",
                "deviceIndex": 0
            }
        ],`
AdamFiser commented 1 month ago

@osteward Thank you for sharing, I will keep the specifics in mind during implementation.