Re: DMRmonitor setup

Peter M0NWI


Got it, the pointer was when you said it should be getting the config.

You'd hardcoded 9000, and I'd not opened that port back into the cloud host firewall!!

All OK now, thanks, really nice page, but I'm utilitarian anyway.

Great stuff Cort.



From: <> on behalf of Steve N4IRS <szingman@...>
Sent: 20 July 2017 19:21
Subject: Re: [DVSwitch] DMRmonitor setup
That's what I get for not keeping up with the code. ;)

On 7/20/2017 2:20 PM, Cort N0MJS wrote:
Actually, they’re totally different. tcp_client was the first attempt at using TCP and then I build web_tables… but because I knew Steve was using tcp_client, I didn’t want to just overwrite it, so made a new file with a more accurate name…. like I said, this thing is far, far from prime time :)

set logging to DEBUG and you’ll know if you’re getting the config and building the it’s internal dictionaries… that’s gonna be really noisy… just try and prettyprint CTABLE…. if there’s stuff there, you got the config, if it stays empty, you didn’t.

On Jul 20, 2017, at 12:37 PM, Peter M0NWI <peter-martin@...> wrote:

Thanks Cort, I'll add some debug statements, but I'm not sure the config is being dumped at all, or i don't see a message tell me it has, you're right, it doesn't crash, I just keep getting the errors.

Can I just confirm that i should just be running web_tables, and that tcp_client is called by it?


Sent from Outlook
From: <> on behalf of Cort N0MJS <n0mjs@...>
Sent: 20 July 2017 17:57:56
Subject: Re: [DVSwitch] DMRmonitor setup
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:


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# ./
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: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/", line 88, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 73, in callWithContext
    return{ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/", line 214, in doRead
    return self._dataReceived(data)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/", line 220, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/", line 180, in dataReceived
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/", line 225, in _consumeData
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/", line 352, in _consumePayload
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/", line 398, in _processPayload
  File "./", line 413, in stringReceived
  File "./", line 370, in process_message
  File "./", 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']


I've tried, but getting stuck now.


Cort Buffington

Cort Buffington

Join to automatically receive all group messages.