Error occur "java.lang.IllegalArgumentException: Needs to be string or int, received null value"

It’s probably because the endpoint isn’t set. The endpoint is set when a zigbee device joins but won’t be set if you just manually create the device. You could try the suggestion here:

Or you can pass in additionalParams like documented here:

http://docs.smartthings.com/en/latest/ref-docs/zigbee-ref.html?highlight=configurereporting#low-level-commands

For example:

zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020, [destEndpoint:1])