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. Development
  3. Requesting time from MQTT/Openhab - How?

Requesting time from MQTT/Openhab - How?

Scheduled Pinned Locked Moved Development
mqtt openhab
3 Posts 1 Posters 1.9k Views 1 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.
  • greglG Offline
    greglG Offline
    gregl
    Hero Member
    wrote on last edited by
    #1

    Im currently scratching my head trying to work out the best way to provide a sensor the current time, via MQTTClientGateway and Openhab.

    I don't have access to my hardware here ( im at work ) so cant test a lot of this, but I thought id put it out here now in case anyone has some ideas/thoughts..or solution ;-)

    Q: What message is sent to MQTT when a sensor node requests the time?

    Q: What does the Openhab "item" look like to watch for the request. This would then run a rule to return the epoch time back to the sensor node.

    Q: What MQTT message needs to be returned to the node?

    1 Reply Last reply
    0
    • greglG Offline
      greglG Offline
      gregl
      Hero Member
      wrote on last edited by
      #2

      To answer myself, the mqtt message sent is onto topic
      mygateway1-out/x/255/3/0/1

      (where x is the node id )

      and the reply is likewise sent back to

      mygateway1-in/4/255/3/0/1 - with a payload being the epoch time

      So now to work out the plumbing within Openhab. I already have a Number item with the epoch time (albeit in UTC)...so just need to work on the rules.

      1 Reply Last reply
      0
      • greglG Offline
        greglG Offline
        gregl
        Hero Member
        wrote on last edited by
        #3

        My memory is sh*t.... i even replied to this relevant post!
        http://forum.mysensors.org/topic/812/realtimeclockdisplaysensor-ino-no-fetch-time-from-controller/6

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        18

        Online

        12.0k

        Users

        11.2k

        Topics

        113.4k

        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