acegis Posted November 27, 2010 Share Posted November 27, 2010 (edited) Hi All, I am just wondering if there is any option to enable something like "auto reconnect function" to the Recording Service. I mean the situation when connectivity to RS is lost, then DVBViewer stops - I mean the picture freezes - and when connection is back DVBViewer is not able to reconnect to the RS automatically. Just it stops displaying the picture and to restore the picture back I need to to change the channel (sometimes "rebuild a graph" works). Is there any way to DVBViewer to force such reconnection (and displaying picture automatically) , eg. checking every 5 sec whether the connectivity is back? (easy way to repro this - on the server restart the recording service - then the picture freezes on the client) Edited November 27, 2010 by acegis Link to comment
majstang Posted November 27, 2010 Share Posted November 27, 2010 Well, if this happens a lot for you and you are fed up with reconnecting DVBViewer manually, there is a way making it possible with a script. DVBViewer can be controlled through the COM interface and setting up a vbscript would include querying if graph is up within an interval of lets say 30 seconds. If graph is up do nothing. If graph is down rebuild graph. Head down to the scripting lounge and start learning the basics: http://www.DVBViewer.tv/forum/forum/40-scripting-lounge-com-deen/ Good luck! Link to comment
majstang Posted December 8, 2010 Share Posted December 8, 2010 (edited) Turns out making a Auto reconnect to RS script wasnt as straight forward as I did imagine it would be. When the unicast connection between DVBViewer client and RS breaks (due to configuration of RS or stop service) I made the logic assumption at least some tag in DVBViewer would change value, but this is not the case. For example if querying #currentplaystate when connection is broken gives value "play" as if graph is still up in client, when it really isnt. This pattern repeats itself when checking other tag values. Does anybody have any ideas on what is going on here? All ideas on how to find a way around this is also very welcome. For testing purposes, here is the code im using so far: Set iDVBViewer = GetObject(, "DVBViewerServer.DVBViewer") 'MyMode = iDVBViewer.Datamanager.Value("#Info") MyMode = iDVBViewer.Datamanager.Parse("#currentplaystate") 'MyMode = iDVBViewer.Datamanager.GetAll 'MyMode = iDVBViewer.Datamanager.Parse("#menufocustext-2") MsgBox(MyMode) If MyMode = "no graph" Then iDVBViewer.SendCommand "63" End If Edited December 8, 2010 by majstang Link to comment
mague Posted December 9, 2010 Share Posted December 9, 2010 (edited) Turns out making a Auto reconnect to RS script wasnt as straight forward as I did imagine it would be. When the unicast connection between DVBViewer client and RS breaks (due to configuration of RS or stop service) I made the logic assumption at least some tag in DVBViewer would change value, but this is not the case. For example if querying #currentplaystate when connection is broken gives value "play" as if graph is still up in client, when it really isnt. This pattern repeats itself when checking other tag values. Does anybody have any ideas on what is going on here? All ideas on how to find a way around this is also very welcome. For testing purposes, here is the code im using so far: Set iDVBViewer = GetObject(, "DVBViewerServer.DVBViewer") 'MyMode = iDVBViewer.Datamanager.Value("#Info") MyMode = iDVBViewer.Datamanager.Parse("#currentplaystate") 'MyMode = iDVBViewer.Datamanager.GetAll 'MyMode = iDVBViewer.Datamanager.Parse("#menufocustext-2") MsgBox(MyMode) If MyMode = "no graph" Then iDVBViewer.SendCommand "63" End If The problem might be that the graph doesnt collapse really. If you want to have an automated reset of the graph, i d suggest to look for the bandwidth. I think its not possible without the miniepg plugin, but i am not sure. But then you can check for a bandwidth, lets say lower then 0.25 Mbit, and then reset. Careful here, it might be a good idea to check if its DVB TV or a video/DVD/BR. A reset might be not enough though. Certain situations seem to require a "close graph" and then a re-tune of the channel. At least this seem to be the way to overcome network and CI issues. Edited December 9, 2010 by mague Link to comment
acegis Posted December 9, 2010 Author Share Posted December 9, 2010 A reset might be not enough though. Certain situations seem to require a "close graph" and then a re-tune of the channel. At least this seem to be the way to overcome network and CI issues. You are absolutely right, not always reset graph helps and not always change channel helps... Only 100% sure is to restart DVBViewer - and it is a bit annoying. DVBViewer itself is a great product but comparing to "standard" SAT receivers is less stable. I think this auto reconnect function should be implemented on the design level. My guess is the current design is OK for situation where there is direct access to local DVB device, where any lack of connectivity means ERROR and maintenance is required. In case of remote source, lack of connectivity should have the meaning "currently we are having no connectivity, but it is only transitory and we try later to reconnect :-)" IMHO. I lob for implementing of auto reconnect in new version, my post here http://www.DVBViewer.tv/forum/topic/43520-auto-reconnect-to-rs/ but so far no answer... Link to comment
desweil Posted December 9, 2010 Share Posted December 9, 2010 DVBViewer is not designed to be a perfect STB device. That's what optimized Hardware/Software solutions like STB are for. DVBViewer has to work with countless combinations of hardware, software, drivers, Decoders, tv tuners, windows versions, in local and remote situations, over WLAN, LAN etc. and costs only 15€ while being developed by some 2-3 people. It is not possible to be perfectly stable and fitting for every scenario. There will always be issues liek yours, where DVBViewer would have to overcome problems of other devices like your network for example. DVBViewer can not consider all of these possibilities and present a solution. I think these issues can mostly be oversome by things like skripts etc. Link to comment
acegis Posted December 9, 2010 Author Share Posted December 9, 2010 (edited) ...and costs only 15€ while being developed by some 2-3 people As fan of DVBViever I offered @hackbart help with the nearshor low-cost development in PL... but no interest :-/ pity, pity... DVBViewer is not designed to be a perfect STB device. That's what optimized Hardware/Software solutions like STB are for. DVBViewer has to work with countless combinations of hardware, software, drivers, Decoders, tv tuners, windows versions, in local and remote situations Anyway, "Kopf hoch :-)" currently there is no better software for DVB receiving, but continuous improvement is required :-) Edited December 9, 2010 by acegis Link to comment
majstang Posted December 9, 2010 Share Posted December 9, 2010 The problem might be that the graph doesnt collapse really. If you want to have an automated reset of the graph, i d suggest to look for the bandwidth. I think its not possible without the miniepg plugin, but i am not sure. But then you can check for a bandwidth, lets say lower then 0.25 Mbit, and then reset. Careful here, it might be a good idea to check if its DVB TV or a video/DVD/BR. A reset might be not enough though. Certain situations seem to require a "close graph" and then a re-tune of the channel. At least this seem to be the way to overcome network and CI issues. Thanks for the idea, mague! Unfortunately my commitment to this script is not strong enough if it is not possible to get a working solution with the DVBV COM interface alone. Hopefully the developers do check why graph does not close properly when RS and DVBViewer break connection. As it is now is useless and no scripts will work what so ever. Could be a bug. Link to comment
mague Posted December 9, 2010 Share Posted December 9, 2010 Hi majstang, i uploaded a plugin. It doesnt do the job automagically , but manual through the OSD and remote control. Maybe this does the job for you. I worked on it for a while now, because bad weather conditions may cause my smartcard to hang up and i wanted to reset by remote control. Lazy me http://www.DVBViewer.tv/forum/topic/43658-resetgraph-plugin/ Link to comment
mague Posted December 9, 2010 Share Posted December 9, 2010 Hopefully the developers do check why graph does not close properly when RS and DVBViewer break connection. As it is now is useless and no scripts will work what so ever. Could be a bug. I tend to think this is a problem of communication with the decoders. The devs probably cant know when a stream is broken. At least no with a "professional" solution. Link to comment
majstang Posted December 9, 2010 Share Posted December 9, 2010 I tend to think this is a problem of communication with the decoders. The devs probably cant know when a stream is broken. At least no with a "professional" solution. Yes, devs cant know when a stream is broken, but my thought was why RS only focuses on releasing the tuner and does nothing when it comes to releasing the unicast device when you do initialize the stop service or the configuration. That could explain why graph gets stuck in an indefinite state. Should be possible to gracefully release the unicast device and close the DVBV graph I think. Well, I honestly have quite little understanding of the inner workings of RS, so I may be on thin ice here. Link to comment
majstang Posted December 10, 2010 Share Posted December 10, 2010 @mague When checking the DVBViewer debuglog what happens when RS releases the tuner, this is the result: 09.12.10 23:29:53.710 Gotstr SIG 10009.12.10 23:30:03.956 Gotstr SIG 100 09.12.10 23:30:06.762 Gotstr CAMAVAIL 0 09.12.10 23:30:06.770 SocketDataAvailable Error: 0 The unicast device never get released in DVBViewer. The only thing in DVBViewer that gets inactivated is the "Show CAM" in View menu. Trying to query this yield nothing, cuz the Show CAM has no value (it is a pop-up menu). When starting the service and rebuilding the grap manually one get an another CAMAVAIL value: 09.12.10 23:56:54.340 Gotstr CAMAVAIL -1 I would imagine you will get the same result when having disconnection problems during bad weather and such. We now have two different values that could be useful to work with. Problem is how to query them? Do you think it would be possible to get/query the CAMAVAIL value somehow or possibly the SocketDataAvailable Error? If this was doable I do think it would be possible to automate the reconnect script. Reading the COM documentation does not give any clues for me. Maybe you know some way? Link to comment
Recommended Posts