nMQTT library in HomeGenie



  • Hi,

    I'm trying to adapt CptJacks script for HomeGenie to allow for sending messages to the MySensor MQTT Gateway. (Currently it only supports receiving of messages.)

    Problem is that the 'messages' are not arriving at the sensors, the Topic works fine, but the message part doesn't arrive.

    With MQQTLens I can get the message to arrive at my test node, in WireShark the message looks like this:

    0000   02 de ad 00 00 42 c8 f7 33 a4 79 87 08 00 45 00  .....B..3.y...E.
    0010   00 40 24 48 40 00 80 06 54 33 c0 a8 00 02 c0 a8  .@$H@...T3......
    0020   00 ea 54 f6 07 5b 53 74 eb 49 27 43 ef 8c 50 18  ..T..[St.I'C..P.
    0030   40 79 4c 24 00 00 30 16 00 13 4d 79 4d 51 54 54  @yL$..0...MyMQTT
    0040   2f 32 31 2f 31 2f 56 5f 4c 49 47 48 54 31        /21/1/V_LIGHT1
    

    When I send a message through HomeGenie (nMQTT) the message looks like this:

    0000   02 de ad 00 00 42 c8 f7 33 a4 79 87 08 00 45 00  .....B..3.y...E.
    0010   00 42 23 c8 40 00 80 06 54 b1 c0 a8 00 02 c0 a8  .B#.@...T.......
    0020   00 ea 5c 8e 07 5b b7 16 40 1f 2a f4 dd 49 50 18  ..\..[..@.*..IP.
    0030   40 df 97 3c 00 00 32 18 00 13 4d 79 4d 51 54 54  @..<..2...MyMQTT
    0040   2f 32 31 2f 31 2f 56 5f 4c 49 47 48 54 00 01 31  /21/1/V_LIGHT..1
    

    As you can see, there is a small difference, a 00 01 between the topic and message.

    Is there a way that I can change the MySensor code to strip the 00 01 from the message, or is there another way I can accomplish this?


  • Admin

    0x00 usually is a string terminator.Not sure what low-level stuff HomeGenie adds to the transmission. Maybe you should have a peek at the code



  • Thanks Hek, I've had a quick look at the code (and also posted in the HomeGenie forums) but haven't been able to find the cause yet.

    I posted here hoping that someone else may have seen this before and could point me in the right direction. I think I'll have to download the nMQTT code to see if I can find it there.

    Thanks.



  • I think I've found the problem, have submitted a bug report to HomeGenie.


Log in to reply
 

Suggested Topics

  • 13
  • 1
  • 21
  • 3
  • 3

15
Online

11.4k
Users

11.1k
Topics

112.7k
Posts