Device routine returns null

I would store this in the device data attribute, this is accessable from an application.

updateDataValue(String name, String value) 
getDataValue(String name)

In an app you need to prepend a device object to the method.