Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. OpenHAB
  4. RealTimeClockDisplaySensor.ino - no fetch time from controller

RealTimeClockDisplaySensor.ino - no fetch time from controller

Scheduled Pinned Locked Moved OpenHAB
displaymqtt broker gatmqtt openhabrtc
6 Posts 4 Posters 3.0k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    osalval
    wrote on last edited by
    #1

    Hi, I'm not a software men.
    I have working well MQTT Gateway with Openhab

    The sketch RealTimeClockDisplaySensor.ino compile in Arduino 1.0.6 with a lot of red lines "avrdude" but finish anyway.
    This is that monitor shows:

    sensor started, id 22
    send: 22-22-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
    send: 22-22-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
    read: 0-0-22 s=255,c=3,t=6,pt=0,l=1:M
    send: 22-22-0-0 s=255,c=3,t=11,pt=0,l=9,st=ok:RTC Clock
    send: 22-22-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
    RTC has set the system time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
    requesting time
    send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:

    So it did not get time from controller. Is it neccesary add something in openhab?

    O 1 Reply Last reply
    0
    • O osalval

      Hi, I'm not a software men.
      I have working well MQTT Gateway with Openhab

      The sketch RealTimeClockDisplaySensor.ino compile in Arduino 1.0.6 with a lot of red lines "avrdude" but finish anyway.
      This is that monitor shows:

      sensor started, id 22
      send: 22-22-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
      send: 22-22-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
      read: 0-0-22 s=255,c=3,t=6,pt=0,l=1:M
      send: 22-22-0-0 s=255,c=3,t=11,pt=0,l=9,st=ok:RTC Clock
      send: 22-22-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
      RTC has set the system time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:
      requesting time
      send: 22-22-0-0 s=255,c=3,t=1,pt=0,l=0,st=ok:

      So it did not get time from controller. Is it neccesary add something in openhab?

      O Offline
      O Offline
      osalval
      wrote on last edited by
      #2

      @osalval
      By the way I find, THE ONLY one library: LiquidCrystal, that Works with Arduino V1.5.8:

      https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
      LiquidCrystal_V1.2.1.zip
      https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip

      I still can not fetching time from controller. What i shoul do with openHAB and MQTTGateway?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        matias53
        wrote on last edited by
        #3

        Hi, did you find a solution for this. same conditions as you.
        OpenHab + MQTT gw

        I can´t get time from the controller.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbj
          wrote on last edited by
          #4

          I have not observed that Openhab can answer any controller-type messages. For any such messages I have had to build my own logic to fix it.

          In this case the message is of type 3 (= internal message) with a subtype of 1 (= I_TIME) and Openhab does not have a clue what this is until you define an item and use rules to respond correctly.

          In other cases I have found that the easiest route around it is to define an own message using for example a V_VAR type and then pick this one up in Openhab.

          Good Luck!

          greglG 1 Reply Last reply
          0
          • M mbj

            I have not observed that Openhab can answer any controller-type messages. For any such messages I have had to build my own logic to fix it.

            In this case the message is of type 3 (= internal message) with a subtype of 1 (= I_TIME) and Openhab does not have a clue what this is until you define an item and use rules to respond correctly.

            In other cases I have found that the easiest route around it is to define an own message using for example a V_VAR type and then pick this one up in Openhab.

            Good Luck!

            greglG Offline
            greglG Offline
            gregl
            Hero Member
            wrote on last edited by
            #5

            @mbj Could you please elaborate on how you allow a sensor/actuator to query OH for a V_VAR ? I know i need to do this for one of my devices when i move it from Vera, so any examples would be a terrific help!

            M 1 Reply Last reply
            0
            • greglG gregl

              @mbj Could you please elaborate on how you allow a sensor/actuator to query OH for a V_VAR ? I know i need to do this for one of my devices when i move it from Vera, so any examples would be a terrific help!

              M Offline
              M Offline
              mbj
              wrote on last edited by
              #6

              @gregl I have used this procedure a few times:

              • Define for example a V_VAR1 message for the query (or use any other suitable message type depending on purpose),
              • Make a MQTT binding for this message i Openhab (for example bind it to a switch, a number or whatever fits the purpose)
              • Make a rule in Openhab that reacts on this incoming message ("When Item xxxxx received update then ......)
              • Fix whatever logic is needed in this rule so you can send the queried info back to the sensor. If no existing binding is suitable you can of course define a V_VAR2 message (or use other type which fits) for the return message.
              • In the "Incomingmessage" function use whatever logic is needed to decode the returned message.

              Reason for choosing a custom type of message (like a V_VAR2) for sending the info back is of course that it is easy to sort it out from the stream entering the incoming messages function. If you have no other incoming messages or the logic for the queried info already is in place then you do not have to think about this.

              Hope the explanation is understandable, if not please revert.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              25

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular