• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Home-Assistant and Node-RED integration with Duet

Scheduled Pinned Locked Moved
General Discussion
3
4
1.1k
Loading More Posts
  • 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.
  • undefined
    xnaron
    last edited by 6 Feb 2018, 22:05

    I'm trying to create some automation around my Duet controllers and integrate them into home-assistant and node-red. When I load the URL for the duet the headers contain content-encoding: "gzip" . I've tried to uncompress with gzip and have been unable to get any data. A simple test with curl

    curl -H "Accept-Encoding: gzip" -I http://192.168.0.16/#
    HTTP/1.1 500 Unknown message type or not authenticated

    In node-red I have tried to push the http payload into a gzip node but it yields an array of char. Converting that array into a string and it is not readable. Also tried to push it into a json node but that failed as well.

    Has anyone tried to do this type of integration? Any pointers appreciated.

    thanks,
    Brendin

    1 Reply Last reply Reply Quote 0
    • undefined
      Danal
      last edited by 6 Feb 2018, 22:34

      [[language]]
      curl http://192.168.86.100 | gzip -d | more

      Works for me.

      More importantly,

      [[language]]
      curl http://192.168.86.100/rr_status
      ```Returns an uncompressed JSON payload.
      All the "rr_…." interface requests are documented here: [https://github.com/chrishamm/DuetWebControl](https://github.com/chrishamm/DuetWebControl)

      Delta / Kossel printer fanatic

      1 Reply Last reply Reply Quote 0
      • undefined
        xnaron
        last edited by 6 Feb 2018, 23:32

        Thank you. Exactly what I was looking for,

        1 Reply Last reply Reply Quote 0
        • undefined
          darookee
          last edited by 7 Feb 2018, 09:17

          Remember to call /rr_disconnect afterwards or you will get old status messages in your webui

          1 Reply Last reply Reply Quote 0
          3 out of 4
          • First post
            3/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA