openenergymonitor / emonhub

Python service linking and decoding input to MQTT & Emoncms
90 stars 83 forks source link

Syntax errors in EmonHubMqttInterfacer #187

Open delboy711 opened 1 year ago

delboy711 commented 1 year ago

While commissioning my new emoncms server I came across a couple of syntax errors in EmonHubMqttInterfacer. In my application I am sending mqtt messages into emonhub for transmission over RF69 radio so am using parts of emonhub most users will not use.

On line 265 payload = msg.payload,decode() syntax error "NameError: name 'decode' is not defined"

corrected line is payload = msg.payload.decode()

On line 267 self._log.debug("Nodeid: "+str(nodeid)+" values: "+msg.payload) syntax error "TypeError: can only concatenate str (not "bytes") to str"

corrected line is self._log.debug("Nodeid: "+str(nodeid)+" values: "+str(msg.payload))