• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    REST API for smart sleep enabled nodes

    scheduled pinned locked moved General Discussion
    4 posts 2 posters 547 views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • mtiutiuM offline
      mtiutiu
      global:last-edited-by, mtiutiu

      Hi,

      @jkandasa First of all great work! I really like this project and its simplicity. I'm sorry if I double post this but I have one simple question - when doing REST API calls to send messages to a specific node/sensor id does this work for sleeping nodes?
      I'm asking this because I tried yesterday to perform a REST API call using the sendRawMessage endpoint for a smart sleep enabled node and I noticed that it doesn't work all the time (I used your example from here). I mean sometimes it got the message but most of the times it didn't. I also have a custom widget on the dashboard for controlling it which was creating using this tutorial and it works all the time. Now I don't know how much the two are related behind the scenes but by using the REST API it seems not so reliable for me.

      Is there another way of accomplish this or am I missing something here?
      Or in another words is the sendRawMessage endpoint aware of smart sleep enabled sensors (if this makes sense) ?

      Forgot to mention - I'm using the MySensors back-end with a serial gateway and MyController version: 1.4.0.

      Thank you for your help.

      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @mtiutiu
        global:last-edited-by,

        @mtiutiu Seems sendRawMessage not using/sensing sleeping node(need to confirm by checking the code.)

        The following API using sleeping node logic,

        PUT: https://enveedu.mycontroller.org/mc/rest/sensors/updateVariable

        You can get the sensor variable id by editing the sensor variable.

        Payload:
        {
          "id":1186,
          "value":1
        }
        
        mtiutiuM one-reply-to-this-post last-reply-time reply quote 0
        • mtiutiuM offline
          mtiutiu @jkandasa
          global:last-edited-by,

          @jkandasa

          That's what I did in the end as a "workaround" and it works. I don't like this approach very much because I have to inspect what id I need to use as it seems to be different from the real node sensor id.
          It would be nice to have that working using the sendRawMessage endpoint also. I can open an issue on Github if needed.

          Thanks.

          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
          • jkandasaJ offline
            jkandasa @mtiutiu
            global:last-edited-by,

            @mtiutiu said in REST API for smart sleep enabled nodes:

            It would be nice to have that working using the sendRawMessage endpoint also. I can open an issue on Github if needed.

            Yes, please open a ticket. I will check and update you. Thanks!

            one-reply-to-this-post last-reply-time reply quote 0
            • first-post
              last-post

            0

            online

            644

            users

            532

            topics

            3.4k

            posts
            Copyright © 2015-2025 MyController.org | Contributors | Localization