Skip to content

Commit

Permalink
added mqtt transport tostation
Browse files Browse the repository at this point in the history
  • Loading branch information
pat1 committed Jan 6, 2016
1 parent 21fbeb5 commit d997084
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/rmap/rmapstation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,13 @@ def starttransport(self):
print "start serial"
self.transport=jsonrpc.TransportSERIAL(port=self.serial_device,baudrate=self.serial_baudrate, logfunc=self.log)

if self.transport_name == "mqtt":
print "start mqtt"
self.transport=jsonrpc.TransportMQTT(user=self.mqtt_user,
password=self.mqtt_password,
host=self.mqtt_host,
logfunc=self.log)

if self.transport is None:
raise Exception("start transport",1)

Expand Down

0 comments on commit d997084

Please sign in to comment.