I'm having troubles writing an app which is capable of listening for a device regardless of whether it's running on the hub or on a cloud server.
The query is like:
var q = server.from('*').where({name:foo});
This works fine on the cloud peer server, but does not work on the hub. Reading a few other threads here, it seems as though the from('*') statement does not match on the hub.
I would like one version of the app, regardless of where it is running, and would rather not have to resort to separate config files or some such mechanism. How to write the query so that it matches on the local hub as well as on the remote peer?