Search found 172 matches

by bogr
23 Sep 2016 22:21
Forum: Discussions in English
Topic: Session
Replies: 3
Views: 3542

Re: Session

ok, but isn't there an "almighty" global object that can be used for passing around data wherever in the call stack you are at the moment (regardless of modules etc), like e.g. in web apps the HTTPSession? Then that session object could be used everywhere in the code as a placeholder for global data...
by bogr
23 Sep 2016 22:09
Forum: Discussions in English
Topic: Retrieving authenticated user
Replies: 10
Views: 4872

Re: Retrieving authenticated user

Ah, yes, good tip. Will do that and try to make some sense of it.
Thanx.
by bogr
19 Sep 2016 23:18
Forum: Discussions in English
Topic: Session
Replies: 3
Views: 3542

Re: Session

Did you find a solution for this?
by bogr
18 Sep 2016 23:50
Forum: Discussions in English
Topic: Retrieving authenticated user
Replies: 10
Views: 4872

Re: Retrieving authenticated user

Yes, I've looked in the sources, but is there any doc of the "flow" (client -> server), i.e. which handlers etc that are run when a client call is issued? I can see that there is some logic regarding the request object in e.g. WebserverRequestRouter.js, AuthController.js etc, but the call sequence i...
by bogr
14 Sep 2016 08:32
Forum: Discussions in English
Topic: Retrieving authenticated user
Replies: 10
Views: 4872

Re: Retrieving authenticated user

Yes, I read the other modules and saw that it is often used to make requests. I want to read the incoming request on the server side. E.g if the client issues the command: curl -u user_1:pwd_1 http://host:8083/ZAutomation/api/v1/devices/InvertSwitch22/command/on I'd like to retreive the "user_1" fro...
by bogr
13 Sep 2016 22:34
Forum: Discussions in English
Topic: Retrieving authenticated user
Replies: 10
Views: 4872

Re: Retrieving authenticated user

pah111kg wrote:My proposal does not help much:

Code: Select all

console.log(http);
... log: [object ZWayHTTP]

Code: Select all

console.log(JSON.stringify(http));
... log: {}

Yes, just tried it as well :o
by bogr
13 Sep 2016 22:33
Forum: Discussions in English
Topic: Retrieving authenticated user
Replies: 10
Views: 4872

Re: Retrieving authenticated user

Aaah, sounds great. Tried it but unfortunately just got empty structure

Code: Select all

[2016-09-13 21:30:44.624] [I] [core] {}
by bogr
13 Sep 2016 21:29
Forum: Discussions in English
Topic: Retrieving authenticated user
Replies: 10
Views: 4872

Retrieving authenticated user

Hi,

I'm trying to get the authenticated user in a module, but I'm failing. I thought, by reading the doc, it should be possible to do

Code: Select all

http.request.auth
but I'm getting "undefined". What am I missing?
by bogr
25 Aug 2016 00:09
Forum: Device specific
Topic: Fibaro FGS-222 relay association
Replies: 6
Views: 3316

Re: Fibaro FGS-222 relay association

You can use 0 to switch both channels (switches) - by configuring appropriate params.
by bogr
24 Aug 2016 20:51
Forum: Device specific
Topic: Fibaro FGS-222 relay association
Replies: 6
Views: 3316

Re: Fibaro FGS-222 relay association

gsaw wrote:Strange, after I associated 2.1 with 3.0 over expert GUI i can't remove this association anymore.
I've had the same problems with associations in the expert GUI, not being able to remove certain associations. Using the API does not help either :(. It's quite flakey IMHO.