Get device setting from an app

I'm able to update a device setting/preferrence from an app, but cannot seem to get/read the setting, and it's not defined in the device documentation.

This works
subscribe(somedevice,"open", dvcEventHandler)

def dvcEventHandler(evt)
{
def dvc = evt.getDevice();
dvc.updateSetting('someSetting', 10)
}

These all fail
def num=dvc.someSetting
def num=dvc.settings.someSetting
def num=dvc.setting.someSetting
def num=dvc.Settings.someSetting
def num=dvc.Setting.someSetting
def num=dvc.Setting('someSetting')
def num=dvc.getSetting('someSetting')

You can't access the settings/preferences of a driver directly from an app. If it's an arbitrary app, the typical "workaround" for this would be to have a custom command on the device, then have that command modify the setting as needed. If it's a parent-child app and device (so the device is a child device of the app--not apparent from the UI but something you'd know from creating it in the app), then this doesn't even have to be a "full" command--you can just have a method defined in the driver. Parent apps can access all non-private methods on child devices; other apps can only access methods that are commands (including ones that are a standard part of a capability).

Thank you for the response. I've used a custom device command in ST to return information, but thought I could avoid doing that in Hubitat since the updateSetting method exists and works from an app. It seems very odd to me that I can update a device setting from an app, but there seems to be no way to get it.

it's a non-System driver so the custom command is quick and easy.