Skip to content

Commit

Permalink
Include leading slash in root-topic
Browse files Browse the repository at this point in the history
OpenHAB has hard time finding topics without leading slash.
  • Loading branch information
Yveaux committed Aug 18, 2014
1 parent 3b62de9 commit ced9238
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mqttGateway1.pl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sub variableTypeToIdx
S_RAIN S_UV S_WEIGHT S_POWER S_HEATER S_DISTANCE S_LIGHT_LEVEL S_ARDUINO_NODE
S_ARDUINO_RELAY S_LOCK S_IR S_WATER };

use constant topicRoot => 'mySensors'; # Omit trailing slash
use constant topicRoot => '/mySensors'; # Include leading slash, omit trailing slash

my $mqttHost = 'localhost'; # Hostname of MQTT broker
my $mqttPort = 1883; # Port of MQTT broker
Expand Down
2 changes: 1 addition & 1 deletion mqttGateway2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ sub variableTypeToIdx
use enum qw { P_STRING=0 P_BYTE P_INT16 P_UINT16 P_LONG32 P_ULONG32 P_CUSTOM };
use constant payloadTypesToStr => qw{ P_STRING P_BYTE P_INT16 P_UINT16 P_LONG32 P_ULONG32 P_CUSTOM };

use constant topicRoot => 'mySensors'; # Omit trailing slash
use constant topicRoot => '/mySensors'; # Include leading slash, omit trailing slash

my $mqttHost = 'localhost'; # Hostname of MQTT broker
my $mqttPort = 1883; # Port of MQTT broker
Expand Down

0 comments on commit ced9238

Please sign in to comment.