I'm having some issues with the following config.
# Logging
import logging
loglevel = logging.DEBUG
logformat = '%(asctime)-15s %(module)s %(message)s'
# MQTT Broker
broker = 'localhost'
port = 1884
username = 'redacted'
password = 'redacted'
lwt = None # Where the MQTT LWT will be publied to. Ignore if None
# List of services we will be using. Omit services you won't be using
# This loads the respective service plugins from the services/ directory
services = ['mqtt', 'pushover']
# Outgoing MQTT publishes
mqtt_config = {
'host' : 'localhost',
'username' : 'redacted',
'password' : 'redacted',
'port' : 1884,
'qos' : 0,
'retain' : False
}
mqtt_targets = {
'owntracks' : [ 'events/notifications/owntracks' ]
}
pushover_config = None # This service requires no configuration
pushover_targets = {
'owntracks' : ['redacted', 'redacted'],
}
# Republishes
mqtt_targets = {
'owntracks' : ['events/notifications/owntracks'],
}
# Subs
topicmap = {
'owntracks/bucks/#' : ['mqtt:owntracks'],
'owntracks/sina/#' : ['mqtt:owntracks'],
'events/notifications/owntracks' : ['pushover:owntracks']
}
def owntracksTopicDataMap(topic):
if type(topic) == str:
try:
# owntracks/username/device
parts = topic.split('/')
username = parts[1]
deviceid = parts[2]
except:
deviceid = 'unknown'
username = 'unknown'
return dict(username=username, device=deviceid)
return None
topicdatamap = {
'owntracks/+/+' : owntracksTopicDataMap
}
# Used by: pushover
prioritymap = {
'events/notifications/owntracks' : -1,
'events/notifications/warn' : 0,
'events/notifications/alert' : 1
}
formatmap = {
##'owntracks/bucks/+' : '{topic} at {lat}/{lon}\n'
}
titlemap = {
'events/notifications/owntracks' : 'OwnTracks',
#'notification/warn' : 'Warning',
#'notification/error' : 'Error'
}
I'm getting the following log when a message is published to owntracks/bucks/nexus4:
2014-02-16 11:26:15,074 mqttwarn Topic [owntracks/bucks/nexus4] going to ['mqtt:owntracks']
2014-02-16 11:26:15,075 mqttwarn New `mqtt:owntracks' job: owntracks/bucks/nexus4
It should (tm) format the message and then publish it to events/notifications/owntracks where it should be picked up by the pushover connector. However, no message is ever published. Instead the task just hangs and cannot be exited without a kill -9. Ideas?