PDA

View Full Version : Comms problem between G5, NR2 & DM



rpalmer68
January 3rd, 2007, 01:49 AM
Rob,

I seem to have a comms problems between G5/DM.

When I load the test CCF you sent me the lua console in NRD says



DM: registering with the DM
DM: Asking for devices


Sometime I get a response with the server htpc1 other times there is no response.

When I get a response then the "<^>\Mute:On" button works, when I don't get a response the Lua console has
DM: No DMHost! and the button doesn't work.

If I load the CFf on htpc1 the Mute:ON works every time without fail.

So it's very hit and miss at the moment unless NR2 is on the same PC as G5.

Any suggestions as to what to look for/change? (I have tried the CCF on two machines and get the same problem.)

Cheers
Richard

Rob H
January 3rd, 2007, 04:29 AM
Can you replace the NetRemote.lua in girder\luascript with this one and see if it makes any difference?

rpalmer68
January 3rd, 2007, 06:21 AM
This one seems to be better, but I have noticed G5 doesn't re-register the client if you load a new ccf, the only way to get the devices sent back down is to close and re-open NR after changing ccf.

It would be good if NR could re-register with Girder and hence reload any data when loading a ccf, or is there a function to do this that shold be in the OnCCFLoad section?

This would be especially useful when running NRD and making changes.

Richard

Rob H
January 3rd, 2007, 06:52 AM
Hmm.. it should be doing that already!

Do you have your own OnCCFLoad function? If so then you should add some code to your .lua file as follows


local oldOnCCFLoad

function OnCCFLoad()
if oldOnCCFLoad then
oldOnCCFLoad()
end
-- your code here
end

rpalmer68
January 3rd, 2007, 06:59 AM
I do have my own OnCCFLoad() and have added your code.

Whenever I save my CCF in NRD and it automatically send it to NR2) I still have to exit and re-load NR2 to get the DM data sent from G5.

R

Rob H
January 3rd, 2007, 08:46 AM
Hmm.. that's what I do here and it works fine.

Is the require 'DMCore' the first thing in the file?

rpalmer68
January 3rd, 2007, 09:43 AM
Is the require 'DMCore' the first thing in the file?

Is is in your test file for the Meridian Mute button, in mine it looks like this.



require"RAHAnimation"
require "DMCore"
DM.LogLevel = 1
local oldOnCCFLoad
batteryimgdata = {};
batteryimgdataloaded = 0;
currentbatteryimg= -1;
wifiimgdata = {};
wifiimgdataloaded = 0;
currentwifiimg= -1;

function RP_SetMediaBridgeLibrary(group,page,handle)
local currlib = NetRemote.GetVariable('MediaBridge.CurrentLibraryR oot')
if (currlib == group) then
print('No library change needed ')
elseif (group == "VIDEO") then
NetRemote.SetVariable("MediaBridge.CurrentLibraryRoot", group)
NetRemote.ExecuteAction(-10,3,0,'Media Library\\Video')

elseif (group == "MediaBridge") then
NetRemote.SetVariable("MediaBridge.CurrentLibraryRoot", group)
NetRemote.ExecuteAction(-10,3,0,'\\')

else
print('No Library Group detected')
end
end


function OnCCFLoad()
if oldOnCCFLoad then
oldOnCCFLoad()
end
NetRemote.RegisterVariableWatch([[htpc1\Meridian500\568\Volume]],NetRemote.GetPlugin('Girder'))
NetRemote.RegisterVariableWatch("Marcel.WiFi.SignalStrength", OnVariableChangeSignalStrength)
NetRemote.RegisterVariableWatch("Power.BatteryLifePercent", OnVariableChangeBatteryLifePercent)
NetRemote.RegisterVariableWatch("Power.AC", OnVariableChangeAC)
handle = RegisterPanelWatch('*', 'Library', RP_SetMediaBridgeLibrary)

marcel_getwifipng(1,"wireless1.png");
marcel_getwifipng(2,"wireless2.png");
marcel_getwifipng(3,"wireless3.png");
marcel_getwifipng(4,"wireless4.png");
marcel_getwifipng(5,"wireless5.png");
wifiimgdataloaded = 1;
marcel_setwifiimg();
.
.


So when you click Save in NRD and NR2 gets upgated, you see in the G5 Log the client being registered and the DM devices sent?

R

Rob H
January 3rd, 2007, 10:10 AM
My fault, I'm an idiot!

That should have been


local oldOnCCFLoad = OnCCFLoad

rpalmer68
January 3rd, 2007, 10:19 AM
My fault, I'm an idiot!

[/code]

Now Rob, don't be so hard on yourself... blame the New Year celebrating!

I'll try that and let you know.

R

rpalmer68
January 3rd, 2007, 09:03 PM
Still not working,

I have

local oldOnCCFLoad = OnCCFLoad

function OnCCFLoad()
if oldOnCCFLoad then
oldOnCCFLoad()
end

In my system script, but I still have to close/open NR for dm to update NR.

Richard

Rob H
January 4th, 2007, 02:53 AM
Can you post (or email me) your CCF and .lua file (and any other supporting files) so I can try it here?

rpalmer68
January 4th, 2007, 03:57 AM
Sure,

Here they are. (Work in progress as you know!)
I have zipped up my ccf, lua and the logs from Girder.

I ran NR2 and opened my ccf, then opened your ccf and then re-opened my ccf again. This is all Girder logged.

The only buttons/sliders with Dm code at this stage are the ones in MediaBridge/Main.


Cheers
Richard

Rob H
January 4th, 2007, 04:28 AM
Do you have more than one instance of the Girder plugin in NR?

rpalmer68
January 4th, 2007, 04:55 AM
Do you have more than one instance of the Girder plugin in NR?

No just one - Girder (-1)

R

Rob H
January 4th, 2007, 05:20 AM
Can you remind me, does this work on a local copy of NR ie on the same PC as Girder?

rpalmer68
January 4th, 2007, 06:10 AM
Can you remind me, does this work on a local copy of NR ie on the same PC as Girder?


Yes works with NR on htpc1.

I have attached log files (loaded NR and then opened ccf a 2nd time), I even get the

DM.DeviceUpdateDone

Which I don't get when NR is on a different PC.

Richard

Rob H
January 4th, 2007, 07:19 AM
And can you confirm that NR on the other PC is the latest version?

Might be worth running DebugView (http://www.microsoft.com/technet/sysinternals/Miscellaneous/DebugView.mspx) on the remote PC and posting the log of NR debugging messages.

rpalmer68
January 4th, 2007, 09:57 AM
And can you confirm that NR on the other PC is the latest version?

Might be worth running DebugView (http://www.microsoft.com/technet/sysinternals/Miscellaneous/DebugView.mspx) on the remote PC and posting the log of NR debugging messages.


Running .84 everywhere.

Here is Debug log.
I loaded NR, then opened your test ccf for the Mute Toggle, then open my CCF again.

Richard

rpalmer68
January 8th, 2007, 02:58 AM
OK now I really don't know what to do!

I decided to work on converting my ccf to the DM weather format, and had everything working (G5 .509-2 & NR2 .084), it even seemed to be updating some of the time although I often had to reset the G5 lua to get the updates pushed down to NR if I closed NR.

I then upgraded to NR2 .086 and now I can't get any weather updates.

I've rebooted everything, loaded NR and then reset G5, reset G5 and then loaded NR still nothing!

I can get the satellite image using the old weather call, but the DM stuff just isn't coming down.

I have tried NR on my remote PC and on the G5 PC, neither get the weather.

Here is the log from G5 (.509-2) I don't know if this provides any clues, as there is an error that comes up.

I have also tried the Flat Style ccf that comes with NR, this doesn't update either.

NOTE: I have Weather updates enabled under the Plugin Settings, I assume I still need this with the DM, or is this now covered with the component manager settings?

Richard

Rob H
January 8th, 2007, 03:22 AM
It may be related to this error


...irder5\luascript\components\GeographicalLocatio n.lua:172: bad argument #1 to `sub' (string expected, got nil)
stack traceback:
[C]: in function `sub'
...irder5\luascript\components\GeographicalLocatio n.lua:172: in function `Parse'
...irder5\luascript\components\GeographicalLocatio n.lua:221: in function <...irder5\luascript\components\GeographicalLocatio n.lua:203>

That's probably one for Mike to look at though.

The component manager settings are the only ones relevant to the DM.

rpalmer68
January 10th, 2007, 08:44 PM
I've done some further testing and here are my findings to this point;

Girder 5 (.509-2) and Netremote2 (.86) and using the Flaystyle ccf provided with NR.86.

1) I have G5 running and load NR the NRD Lua log returns the line

Dm: Got a DM Host htpc1
DM: No Weather Locations
If I leave NR for another couple of minutes still no weather info gets received. If I go into the weather page everything is blank.
2) I then reset G5 (F11) and it then sends the weather data to NR, NR receives it and logs it as
DM: Adding device htpc1\CustomWeather\Local.CurrentConditions
DM: Adding device htpc1\CustomWeather\Local.ForecastConditions.5
DM: Adding device htpc1\CustomWeather\Local.ForecastConditions.1
DM: Adding device htpc1\CustomWeather\Local.ForecastConditions.2
DM: Adding device htpc1\CustomWeather\Local.ForecastConditions.4
DM: Adding device htpc1\CustomWeather\Local.ForecastConditions.3
DM: Adding device htpc1\Meridian500\598
3) I then go into the weather page and its all populated.
4) There are no errors generated on the NR or G5 machines during this.

It appears in the above case g5 is not sending the same data down to a newly registered client that it does when G5 gets reset and then registers a new client.

Girder 5 (.509-2) and Netremote2 (.86) and using my new ccf (as attached)
1) I have G5 running and load NR the NRD Lua log has

Dm: Got a DM Host htpc1 but DOES NOT return the line

DM: No Weather Locations like the above test did.
If I go into the weather page everything is blank.
2) I then reset G5 (F11) and it then sends the weather data to NR, NR receives it and logs it as
DM: Adding Device htpc1\CustomWeather\local.forecastconditions.1
etc
3) I then go into the weather page and it's NOT populated.
4) There are no errors on the NRD log, in fact it looks the same as the above test other than point (1), there are no errors in the G5 log either.
5) If I load the flaystyle ccf, reset Girder and receive the weather devices they are there on the weather page
6) If I now open my ccf (don't close NR) and go to the weather page the weather details ARE populated.

So it appears from the above I have two issues;
1) G5 isn't updating NR/DM clients correctly unless a reset is performed on G5.
2) My ccf doesn't receive the weather info from the DM, even though it is reading the correct variables (I assume this is related to the lack of a

DM: No Weather Locations message, but I'm not sure what to do to correct this.

Richard

DaveS
January 11th, 2007, 05:32 PM
see post #19 in this thread http://www.promixis.com/forums/showthread.php?t=15984&page=2

Dave

rpalmer68
January 11th, 2007, 07:03 PM
see post #19 in this thread http://www.promixis.com/forums/showthread.php?t=15984&page=2

Dave


Dave

I assume you get the weather data down automatically and don't have to reset girder for it to send?

Richard