Requesting time from MQTT gateway



  • Hi All

    I have search and search the forum for an answer to my question but no luck so far :-S

    Some information about my setup:

    MQTT gateway using ENC28J60 module on an Arduino Uno.

    TimeAwareSensor sketch on an Arduino Uno.

    I haven´t done any changes to the lib, just dowloaded version 1.4 from mysensors.org

    Now I have some problems with getting the time from the controller, on the serial interface of the TimeAwareSensor I get this:

    sensor started, id 50
    send: 50-50-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
    send: 50-50-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
    send: 50-50-0-0 s=255,c=3,t=11,pt=0,l=5,st=ok:Clock
    send: 50-50-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
    send: 50-50-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time
    send: 50-50-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time
    send: 50-50-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0

    Now it seems like the controller, in my case the MQTT gateway, never respond back with the current time. Do I need to configure anything on the gateway so it is able to send the time?

    I tried to to send the time using a MQTT client and the following happening on the MQTT Gateway:

    snow/50/255/I_TIME
    0;0;3;0;9;send: 0-0-50-50 s=255,c=1,t=63,pt=0,l=10,st=ok:1420988733
    C0 00
    D0 00
    0;0;3;0;9;read: 50-50-0 s=255,c=3,t=1,pt=0,l=10:1420988733
    snow/50/255/V_
    30 1A 00 0E 73 6E 6F 77 2F 35 30 2F 32 35 35 2F 56 5F 31 34 32 30 39 38 38 37 33 33

    Now the snow/50/255/I_TIME is send with t=63, it should be t=1 i guess, so maybe that´s why it doesn´t work.

    So to sum up, my questions are as follow:

    Do I need to configure anything on the MQTT gateway so it can respond to time request?

    Is it supported to send the time using MQTT, like snow/50/255/I_TIME <time since 1970>?

    And when I try to do it why is it seen as t=63?

    Thanks in advance


  • Admin

    You should probably report MQTT gateway problems to @Damme here:
    http://forum.mysensors.org/topic/303/mqtt-broker-gateway/



  • Seems to be same issue as I posted in "RTC sensor and Openhab". I guessed the problem was on the Openhab side but looking at the output from the various logs it seems that the MQTT causes this and this post points to the same cause.


Log in to reply
 

Suggested Topics

  • 3
  • 3
  • 2
  • 4
  • 2
  • 2

13
Online

11.2k
Users

11.1k
Topics

112.5k
Posts