GlobalVars coherence between server and client

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
hplus
Starting Member
Starting Member
Posts: 43
Joined: Fri Jan 22, 2010 12:21 pm

GlobalVars coherence between server and client

Post by hplus »

Hi,

I started coding under gambas2 trying to extend domotiga's features. Nothing done yet, just practicing....
I noticed something strange about globalvars:
They seem to be kept in the process memory and saved/restored in the database on start and quit. Why this choice? other devices values are directly stored in the database?
Anyway, the problem occur when i am in client/server mode. The client loads at startup the globalvars from the database, but the updated globalvars values are only in the server memory and not yet in the database.
In client mode, the client should ask the server to send the globalvars values...

Hplus
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: GlobalVars coherence between server and client

Post by RDNZL »

Will change the behavior in client/server mode, now it loads the values (most of which are old) from the db at startup, and gets the new values when the change via udp broadcast from server (at least from revision 447 and up), I leave out the db load at startup, and add a xmlrpc call from client to server to request it to send them all once.
I also will check the load increase if I save them to database directly instead of holding them only in memory,
I also have to find a way to create them with correct datatype, (send datatype with the udp broadcast or something like that.
Now all updated globalvars are strings on the client, which doesn't work correctly.
Regards, Ron.
Andy_Burn
Starting Member
Starting Member
Posts: 43
Joined: Sun Nov 28, 2010 10:47 pm

Re: GlobalVars coherence between server and client

Post by Andy_Burn »

Im not sure if this is where this belongs, but here goes.
With Version 0.1.194 I noticed that the client doesn't update when connected to the server. even on the same machine.

I found that for every receiver, TEMP08, RFXCOM receiver and CurrentCost, even though the USB devices are mapped correctly, I have to disable and re-enable each one of them to get them to update on the client.

I seem to remember everything working fine with version 0.1.193.
Has anyone else seen this, or have I just screwed up somewhere? Lol! :wink:

Andy
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: GlobalVars coherence between server and client

Post by RDNZL »

What doesn't update exactly?
The device values, even when clicking refresh?

I have no problems with that, are you sure you have a 1 server running?
The 'client' displays client in titlebar?
The behaviour you are describing are suggesting that you have 2 servers running.

Any errors in log?
Regards, Ron.
Post Reply

Return to “DomotiGa Forum”