Re: DMRmonitor setup


Cort N0MJS <n0mjs@...>
 

DMRmonitor is really i its infancy. I’m not really happy with a lot of it, but it’s out there. The hyphen shouldn’t be a problem — hyphens are valid in strings. 

The problem you’re getting is it’s trying to set a dictionary value for the key "IPSC-GB7HS” and that key does not exist.

Most probable answer is that you’re getting an RCM message before the first dump of the config dict from DMRlink to web_tables… Does it kill the web_tables process? If not, does the problem persist past the first load of the config table into web_tables? I’m making wild speculation here — but without looking deeper than I have time to, I know there are a number of circumstances with this code where things aren’t stable until it’s been running for a few seconds (maybe up to a minute) because of numerous “chicken and egg” problems — but I’ve never had it terminate the process on me, the errors just stop after all of the data has been loaded in… and often times it only happens when the repeaters are active right on startup of web_tables.

Yeah, I know, poor programming… It’s how I work… get it working at all, then clean it up.


My vacation is over now and time to dig into things is scarce. If I were troubleshooting this problem, and it was clear web_tables had received a config dump from dmrlink, I’d add temporary code to prettyprint CTABLE and _name between lines 122 and 123 and find out what’s going on that way.


0x49 DE N0MJS

On Jul 20, 2017, at 11:25 AM, Peter M0NWI <peter-martin@...> wrote:

Cort/Steve,

I'm trying to get the DMRMonitor package running, but struggling and could do with a steer?

I've downloaded and setup the DMRlink bridge code using the socket-reporting branch (in /opt/dmrrep), also installed and configured the DMRmonitor package (in /opt/dmrrep/dmrmonitor) and its dependencies, I have got the 2 talking connected to each other, and I can also surf to the webpage being served from the code.  When running the application interactively I'm getting error messages on the data coming into dmrmonitor from dmrlink, and the web template is not filling out.  DMRLink is running supporting all the repeater bridging without problem.

I've checked the DMRlink.cfg and I've got the 2 options RCM and and CON_APP set to true.

I'm wondering if have a hyphen in the middle of my IPSC names, is not allowed?

This is what I'm getting;

root@www:/opt/dmrrep/dmrmonitor# ./web_tables.py
INFO:root:ID ALIAS MAPPER: 'peer_ids.csv' successfully downloaded
INFO:root:ID ALIAS MAPPER: 'subscriber_ids.csv' successfully downloaded
INFO:root:Initiating Connection to Server.
INFO:root:Connected.
INFO:root:Resetting reconnection delay
INFO:root:static website requested: <Request at 0xb618276c method=GET uri=/ clientproto=HTTP/1.1>
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 88, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 73, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 214, in doRead
    return self._dataReceived(data)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 220, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 180, in dataReceived
    self._consumeData()
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 225, in _consumeData
    self._consumePayload()
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 352, in _consumePayload
    self._processPayload()
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 398, in _processPayload
    self.stringReceived(self._payload.getvalue()[:-1])
  File "./web_tables.py", line 413, in stringReceived
    process_message(data)
  File "./web_tables.py", line 370, in process_message
    process_rcm(_message[1:])
  File "./web_tables.py", line 137, in process_rcm
    CTABLE[_name]['PEERS'][_source][_ts]['STATUS'] = _status
exceptions.KeyError: 'IPSC-GB7HS'
INFO:root:Lost connection.  Reason: [Failure instance: Traceback (failure with no frames): <type 'exceptions.KeyError'>: 'IPSC-GB7HS']

<dummyfile.0.part>

I've tried, but getting stuck now.

73,
Peter



Cort Buffington
785-865-7206

Join main@DVSwitch.groups.io to automatically receive all group messages.