Requesting time from Openhab



  • Hey Guys,
    I appreciate all the answers given to all the questions before mine in helping me figure out this stuff. I have a question about the requestTime() function and how we can handle it when being sent to Openhab. I have set up openhab with the MySensors binding as was talked about in another thread, and all looks good on that front. But, I am trying to get a response back to the node from the requestTime() and I can't figure out how to handle this request from the Openhab side of things. I can see the message come into the Openhab log ...

    02:13:23.415 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSP:MSG:READ 101-101-0 s=255,c=3,t=1,pt=0,l=0,sg=0:
    02:13:23.419 [DEBUG] [rs.internal.protocol.MySensorsReader] - 101;255;3;0;1;
    

    But how do I get Openhab to react to this message?

    I have tried adding a dummy item with this id and setting up a rule to try to intercept but to no avail, the rule with...
    received update or received command don't seem to fire, so I am at a loss.

    Any help would be much appreciated for this.
    Thanks


  • Hero Member

    @brynt I suppose you're refering to the Openhab2 binding.

    The answer for an request for time is not implemented yet. I need to look into this, shouldn't be that hard though.

    Till I'm able to implement this you may implement a rule with the "expert mode" 😉

    https://github.com/tobof/openhab2-addons/wiki/Expert-mode-(rule-based)



  • Hi Tim,

    Thanks for the response. I did try to add the MySensors Message binding from the UI but it seems to fail when adding as a new thing and just sits there as shown below.

    0_1478366587410_upload-4a152b27-4634-41f8-ba64-a6ed526352be

    When I first try to add the Mysensors message you get the following

    10:34:13.403 [WARN ] [io.rest.core.thing.ThingTypeResource] - Cannot find channel type: mysensors:mySensorsMessage-channel
    

    and then once saving

    10:35:54.128 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type mysensors:mysensorsMessage.
    10:35:54.245 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'mysensors:mysensorsMessage:8764e963' has been added.
    

    As I said I had tried to create a custom sensor thing with the child id 255 to intercept the message in a rule but did not seem to want to work either. Anyway not a big deal at least I can get everything else working fine.

    Great work by the way 🙂

    Thanks again for the response.


  • Hero Member

    @brynt So, I was wrong: the answer to I_TIME was already implemented, but a bug was preventing it to work in combination with skipStartupCheck. I've fixed the bug and uploaded a current jar.

    Please show me your configuration for the MySensorsMessage Thing. It should work.

    A custom sensor with child id 255 expects a custom value, not an internal message, so it must not work. 🙂


Log in to reply
 

Suggested Topics

  • 22
  • 2
  • 10
  • 7
  • 4
  • 5

63
Online

11.4k
Users

11.1k
Topics

112.7k
Posts