OpenSprinkler Forums OpenSprinkler Unified Firmware Current 2.3.3 API and MQTT docs?

Tagged: 

  • This topic has 1 reply, 2 voices, and was last updated 2 weeks ago by Ray.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #79137

    dkebler
    Participant

    I have built the docker (rpi) image for 2.3.3 and that’s running great!

    Best I have have been able to find is API docs for 2.2.0
    https://raysfiles.com/os_compiled_firmware/docs/2.2.0/OSAPI2.2.0(1).pdf

    and for MQTT nothing but this post which only mentions subscribing to topics and noting about publishing control topics
    https://openthings.freshdesk.com/support/solutions/articles/5000859089-how-to-use-mqtt

    Mostly I just want to be able to manually turn on a station/zone via api or mqtt like one can do in the web ui

    Currently I can get json data via the api so I know I can curl via api but when I try any of the control commands (e.g. mp, cr) they are ignored.

    so for example

    should run program 0 (first)
    curl https://myurl/mp?pw=opendoor&pid=0&uwt=0

    or

    should run first station for one minute
    curl https://myurl/cr?pw=opendoor&t=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

    both return

    {"result":16} whatever that means?

    I could do this via a mqtt publish but as I mentioned I cannot find any information of the equivalent mqtt topics to the api commands.

    need more input preferably current documentation

    #79157

    Ray
    Keymaster

    The MQTT feature currently only supports publishing (i.e. for notification etc.), it does NOT support subscribing yet (i.e. receiving command). It’s quite easy to add support for subscription, but it hasn’t been done yet.

    If you run a command using curl, you should put the command around “”, otherwise it will cut off at special characters like &. In fact, you should also use the -g option because characters like [ will also throw it off because it’s a globbing character. For example:

    curl -g "https://demo.opensprinkler.com/mp?pid=0&uwt=0"

    should work (note that the demo website is not password protected so I ignored the pw= parameters. Also note that the password needs to be a md5 checksum, so your ‘opendoor’ will not work. Instead, you should use the md5 checksum of opendoor, which is a6d82bced638de3def1e9bbb4983225c

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Current 2.3.3 API and MQTT docs?