Reply To: Lutron ZigBee 4-button switch compatibility? 2017-12-21T03:42:44+00:00

HOME Forums Software iSmartenit Lutron ZigBee 4-button switch compatibility? Reply To: Lutron ZigBee 4-button switch compatibility?

Anonymous
Post count: 19

Can you try to rediscover using following:

curl -X POST "http://cush:50334/devices/42015/capabilities/discover"

Let me know how it goes.

Here was the initial result of the discover:

james:~ darren$ curl http://cush:50334/devices/42015/capabilities -XGET
{ "components" : [ { "capabilities" : [ ], "id" : "comp1" } ], "id" : 42015, "image" : "default.png", "model" : "ZLL Light", "name" : "ZLL Light" }
james:~ darren$ curl -X POST "http://cush:50334/devices/42015/capabilities/discover"
{ "message" : "Discovering capabilities", "success" : "true" }
james:~ darren$ curl http://cush:50334/devices/42015/capabilities -XGET
{ "components" : [ { "capabilities" : [ ], "id" : "comp1" } ], "id" : 42015, "image" : "default.png", "model" : "ZLL Light", "name" : "ZLL Light" }

So it did not appear to change anything. After that, I left it for some time (more than 10 mins) just in case it needed to queue up the request and would take a while to update the internal db, etc and then queried it again. Still the same result.

Interestingly, I have 6 GE lights on this ZigBee network and all 6 showed exactly the same result as above. They did have a components list, but the capabilities list was blank. In fact the only device on the ZigBee network that had a non-blank capabilities list was the coordinator:

james:~ darren$ curl http://cush:50334/devices/14477/capabilities -XGET
{ "components" : [ { "capabilities" : [ { "Basic" : [ { "get" : [ "channel", "discoverTime", "fwversion", "ManufacturerName", "ModelID" ] }, "status", { "start_network" : [ { "channel" : "uchar" } ] }, { "discover" : [ { "duration" : "uchar" } ] }, "restart" ] } ], "id" : "comp1" } ], "id" : 14477, "image" : "default.png", "model" : "ZBCID Coord", "name" : "ZBCID" }

In more playing around I connected to cush and looked at the data.db file in the /etc/zbp directory. It is clearly a database file of some sort, and I’d be interested in querying this directly, but even a simple “cat” of that file revealed that there are processors named in that file for the ZLL Light, so I’m not sure why they are not showing up via the REST query … so I kept digging.

I found the log in a reasonable location /var/log/zbp/zbp.log, and took a look in it, and sure enough there is a wealth of information there. Here is a snip from the log showing the query/discover/query sequence of the ZLL light I did above:

Mar 15 11:06:54 cush ZBPServer[15767]: Incoming connection.
Mar 15 11:06:54 cush ZBPServer[15767]: Scheduler:: socket added
Mar 15 11:06:54 cush ZBPServer[15767]: http_parser:: GET /devices/42015/capabilities
Mar 15 11:06:54 cush ZBPServer[15767]: Scheduler:: socket removed
Mar 15 11:07:12 cush ZBPServer[15767]: Incoming connection.
Mar 15 11:07:12 cush ZBPServer[15767]: Scheduler:: socket added
Mar 15 11:07:12 cush ZBPServer[15767]: http_parser:: POST /devices/42015/capabilities/discover
Mar 15 11:07:12 cush ZBPServer[15767]: NodeMgmt::post method called for device 42015
Mar 15 11:07:12 cush ZBPServer[15767]: NodeMgmt:: Rediscovering device capabilities: id:a41f
Mar 15 11:07:12 cush ZBPServer[15767]: ZBP_packet:: [TX] (00) Cmd: 0016 len: 04 data: 02 00 16 04 5e a6 5e a6 12
Mar 15 11:07:12 cush ZBPServer[15767]: Scheduler:: socket removed
Mar 15 11:07:12 cush ZBPServer[15767]: ZBP_packet:: [RX] (00) Cmd: 1016 len: 05 data: 00 5e a6 01 01 CRC: fb
Mar 15 11:07:12 cush ZBPServer[15767]: DiscoverDeviceCapabilities:: record: a41f active endpoints: 1
Mar 15 11:07:12 cush ZBPServer[15767]: DiscoverDeviceCapabilities:: retrieving clusters from ep:1
Mar 15 11:07:13 cush ZBPServer[15767]: ZBP_packet:: [TX] (00) Cmd: 0015 len: 05 data: 02 00 15 05 5e a6 5e a6 01 11
Mar 15 11:07:13 cush ZBPServer[15767]: ZBP_packet:: [RX] (00) Cmd: 1015 len: 1c data: 00 5e a6 18 01 01 04 01 01 00 07 00 00 00 03 00 04 00 05 00 06 00 08 10 00 01 00 19 CRC: fe
Mar 15 11:07:13 cush ZBPServer[15767]: SimpleDescRequest:: ep: 1 inclusters: 7 outclusters: 1
Mar 15 11:07:13 cush ZBPServer[15767]: DiscoverDeviceCapabilities:: record:a41f input:7 output:1
Mar 15 11:07:13 cush ZBPServer[15767]: DiscoverDeviceCapabilities:: device a41f, discover sequence completed, now reporting.
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: record:a41f address:5ea6 model:ZLL Light
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Active ep:1 clusters:7
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 0
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 3
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 4
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 5
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 6
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 8
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 1000
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Active ep:1 output clusters:1
Mar 15 11:07:13 cush ZBPServer[15767]: discoverDevCapabilitiesCallback:: Cluster: 19
Mar 15 11:07:13 cush ZBPServer[15767]: NodeMgmt::DeviceCapabilities:: json: { “components” : [ { “endpointID” : 1, “name” : “comp1”, “processors” : [ { “name” : “zbbasic” }, { “name” : “zbidentify” }, { “clusterID” : 4, “name” : “Unsupported” }, { “clusterID” : 5, “name” : “Unsupported” }, { “name” : “zbonoff” }, { “name” : “zblevelcontrol” }, { “clusterID” : 4096, “name” : “Unsupported” }, { “clusterID” : 25, “name” : “Unsupported”, “server” : false } ] } ], “defaultName” : “ZLL Light”, “model” : “ZLL Light” }
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /system/opt/usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zbbasic
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zbbasic
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Plugin zbbasic, comp:comp1 Error adding processor. error: 3
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /system/opt/usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zbidentify
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zbidentify
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Plugin zbidentify, comp:comp1 Error adding processor. error: 3
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Unsupported plugin ignored
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Unsupported plugin ignored
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /system/opt/usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zbonoff
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zbonoff
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Plugin zbonoff, comp:comp1 Error adding processor. error: 3
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /system/opt/usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zblevelcontrol
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugins in: /usr/lib/zbp/plugins
Mar 15 11:07:13 cush ZBPServer[15767]: devicehelper:: looking for plugin: zblevelcontrol
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Plugin zblevelcontrol, comp:comp1 Error adding processor. error: 3
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Unsupported plugin ignored
Mar 15 11:07:13 cush ZBPServer[15767]: addComponent:: Unsupported plugin ignored
Mar 15 11:07:13 cush ZBPServer[15767]: createDevice:: Error adding component Upstairs Desk Bulb 1. error: 3
Mar 15 11:07:18 cush ZBPServer[15767]: ZLL Light:: initiating components.
Mar 15 11:07:22 cush ZBPServer[15767]: Incoming connection.
Mar 15 11:07:22 cush ZBPServer[15767]: Scheduler:: socket added
Mar 15 11:07:22 cush ZBPServer[15767]: http_parser:: GET /devices/42015/capabilities
Mar 15 11:07:22 cush ZBPServer[15767]: Scheduler:: socket removed

I have to say, I really appreciate that the ZigBee packet is given in it’s entirety. Even nicer would be a wireshark decode, for both TX and RX, but I see that you at least provide a decode of what zbp understands from what was received. 🙂

What jumped out at me is that plugins seem to be expected for the processors – and indeed my system did not have either directory the system attempts to look in. In fact a “find . -name *zbonoff* -print” from the root directory shows that there is no file with “zbonoff” anywhere in the name on the system at all. The installation uses a debian repo, so I thought I’d check there. Sure enough:

darren@cush ~ $ sudo apt-cache search zbpserver
zbpserver - Implements API to bridge Wifi, ZigBee, INSTEON and X10 networks
zbpserver-plugin-geoven - ZBPServer PlugIn-template
zbpserver-plugin-huelight - ZBPServer PlugIn-template
zbpserver-plugin-insiaszone - ZBPServer PlugIn-template
zbpserver-plugin-inslevel - ZBPServer PlugIn-template
zbpserver-plugin-insonoff - ZBPServer PlugIn-template
zbpserver-plugin-nesthermostat - ZBPServer PlugIn-template
zbpserver-plugin-nestprotect - ZBPServer PlugIn-template
zbpserver-plugin-testing - ZBPServer PlugIn-template
zbpserver-plugin-wemoonoff - ZBPServer PlugIn-template
zbpserver-plugin-wimessenger - ZBPServer PlugIn-template
zbpserver-plugin-zbalarms - ZBPServer PlugIn-template
zbpserver-plugin-zbbasic - ZBPServer PlugIn-template
zbpserver-plugin-zbdoorlock - ZBPServer PlugIn-template
zbpserver-plugin-zbelectricalmeasurement - ZBPServer PlugIn-template
zbpserver-plugin-zbevse - ZBPServer PlugIn-template
zbpserver-plugin-zbfancontrol - ZBPServer PlugIn-template
zbpserver-plugin-zbiaswd - ZBPServer PlugIn-template
zbpserver-plugin-zbiaszone - ZBPServer PlugIn-template
zbpserver-plugin-zbidentify - ZBPServer PlugIn-template
zbpserver-plugin-zblevelcontrol - ZBPServer PlugIn-template
zbpserver-plugin-zbonoff - ZBPServer PlugIn-template
zbpserver-plugin-zbpowerconf - ZBPServer PlugIn-template
zbpserver-plugin-zbrelativehumiditymeasurement - ZBPServer PlugIn-template
zbpserver-plugin-zbsimplemeter - ZBPServer PlugIn-template
zbpserver-plugin-zbtemperaturemeasurement - ZBPServer PlugIn-template
zbpserver-plugin-zbthermostat - ZBPServer PlugIn-template

So I figured I should install all the missing plugins. A quick command of “sudo apt-get install zbpserver-plugin*” and all were put into the /usr/lib/zbp/plugins directory. Now let’s run that same query/discover/query again:

james:~ darren$ curl http://cush:50334/devices/42015/capabilities -XGET
{ "components" : [ { "capabilities" : [ ], "id" : "comp1" } ], "id" : 42015, "image" : "default.png", "model" : "ZLL Light", "name" : "ZLL Light" }
james:~ darren$ curl -X POST "http://cush:50334/devices/42015/capabilities/discover"
{ "message" : "Discovering capabilities", "success" : "true" }
james:~ darren$ curl http://cush:50334/devices/42015/capabilities -XGET
{ "components" : [ { "capabilities" : [ { "Basic" : [ { "get" : [ "ZCLVersion", "ApplicationVersion", "StackVersion", "HWVersion", "ManufacturerName", "ModelID", "DateCode", "PowerSource", "LocationDescription", "PhysicalEnviroment", "DeviceEnabled", "AlarmMask", "DisableLocalConfig" ] }, "status", "ResetToFactoryDefaults" ] }, { "Identify" : [ { "get" : [ "IdentifyTime" ] }, "status", { "Identify" : [ { "IdentifyTime" : "ushort" } ] }, "IdentifyQuery" ] }, { "OnOff" : [ { "get" : [ "state" ] }, "status", "Off", "On", "Toggle" ] }, { "LevelControl" : [ { "get" : [ "CurrentLevel", "RemainingTime", "OnOffTransitionTime", "OnLevel" ] }, "status", { "MoveToLevel" : [ { "TransitionTime" : "ushort" }, { "Level" : "uchar" } ] }, { "Move" : [ { "Rate" : "uchar" }, { "Mode" : "uchar" } ] }, { "Step" : [ { "Mode" : "uchar" }, { "Size" : "uchar" }, { "TransitionTime" : "ushort" } ] }, "Stop", { "MoveToLevelWOnOff" : [ { "TransitionTime" : "ushort" }, { "Level" : "uchar" } ] }, { "MoveWOnOf" : [ { "Rate" : "uchar" }, { "Mode" : "uchar" } ] }, { "StepWOnOf" : [ { "Mode" : "uchar" }, { "Size" : "uchar" }, { "TransitionTime" : "ushort" } ] }, "StopWOnOf" ] } ], "id" : "comp1" } ], "id" : 42015, "image" : "default.png", "model" : "ZLL Light", "name" : "ZLL Light" }

Eureka! 🙂

For the remote it was unable to do a re-discover, so I had to remove it from the network and re-add it. Of course the device id changed when I did that, but it now comes up with a lot more detailed capabilities:

james:~ darren$ curl http://cush:50334/devices/16022/capabilities -XGET
{ "components" : [ { "capabilities" : [ { "Basic" : [ { "get" : [ "ZCLVersion", "ApplicationVersion", "StackVersion", "HWVersion", "ManufacturerName", "ModelID", "DateCode", "PowerSource", "LocationDescription", "PhysicalEnviroment", "DeviceEnabled", "AlarmMask", "DisableLocalConfig" ] }, "status", "ResetToFactoryDefaults" ] }, { "EVSE" : [ { "get" : [ "ChargerStatus", "ChargerFault", "ChargeLevel", "SessionId", "SessionTime", "SessionSummationDelivered" ] }, "status", { "StartCharge" : [ { "ID" : "QByteArray" } ] }, { "StopCharge" : [ { "ID" : "QByteArray" } ] }, { "SetCharge" : [ { "Level" : "ushort" } ] }, "GetStatus", "GetInfo" ] }, { "Identify" : [ { "get" : [ "IdentifyTime" ] }, "status", { "Identify" : [ { "IdentifyTime" : "ushort" } ] }, "IdentifyQuery" ] }, { "OnOff" : [ { "get" : [ "state" ] }, "status", "Off", "On", "Toggle" ] }, { "LevelControl" : [ { "get" : [ "CurrentLevel", "RemainingTime", "OnOffTransitionTime", "OnLevel" ] }, "status", { "MoveToLevel" : [ { "TransitionTime" : "ushort" }, { "Level" : "uchar" } ] }, { "Move" : [ { "Rate" : "uchar" }, { "Mode" : "uchar" } ] }, { "Step" : [ { "Mode" : "uchar" }, { "Size" : "uchar" }, { "TransitionTime" : "ushort" } ] }, "Stop", { "MoveToLevelWOnOff" : [ { "TransitionTime" : "ushort" }, { "Level" : "uchar" } ] }, { "MoveWOnOf" : [ { "Rate" : "uchar" }, { "Mode" : "uchar" } ] }, { "StepWOnOf" : [ { "Mode" : "uchar" }, { "Size" : "uchar" }, { "TransitionTime" : "ushort" } ] }, "StopWOnOf" ] }, { "Basic" : [ { "get" : [ "ZCLVersion", "ApplicationVersion", "StackVersion", "HWVersion", "ManufacturerName", "ModelID", "DateCode", "PowerSource", "LocationDescription", "PhysicalEnviroment", "DeviceEnabled", "AlarmMask", "DisableLocalConfig" ] }, "status", "ResetToFactoryDefaults" ] }, { "EVSE" : [ { "get" : [ "ChargerStatus", "ChargerFault", "ChargeLevel", "SessionId", "SessionTime", "SessionSummationDelivered" ] }, "status", { "StartCharge" : [ { "ID" : "QByteArray" } ] }, { "StopCharge" : [ { "ID" : "QByteArray" } ] }, { "SetCharge" : [ { "Level" : "ushort" } ] }, "GetStatus", "GetInfo" ] } ], "id" : "comp1" } ], "id" : 16022, "image" : "default.png", "model" : "LZL4BWHL01 Remote", "name" : "LZL4BWHL01 Remote" }

Now when I get a bit more time I will attempt to add an Action based on the capabilities discovered in the remote and tie it to a change in the light state.

I do wonder why the plugins were not installed by default?

Regards,
😀