OpenSprinkler Forums Comments, Suggestions, Requests Feature Request: IFTTT

  • This topic has 22 replies, 6 voices, and was last updated 3 years ago by Ray.
Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #36731

    Christopher Hanley
    Participant

    An API that can be interfaced with IFTTT (ifttt.com) would potentially open up a world of possibilities.

    I was honestly looking at RachIO at first because it has IFTTT hooks already.  I’ve bought several products and subscribed to many websites (they call them channels) simply because they can utilize IFTTT.  If nothing else, it would be good advertising for the Opensprinkler product.

    #36748

    Ray
    Keymaster

    I did look at RachIO’s IFTTT a little while ago. For the micrcocontroller-based OS, this will probably only be available once we have cloud-based service, because the microcontroller is not powerful enough to handle the requests directly. For Pi and BBB it should be achievable locally without going through cloud.

    #40313

    rohitashs
    Participant

    Hi,

    So is this on the roadmap? If yes by when would it be available? I’m very interested in this as it would let me integrate with my Smartthings hub.

    Cheers
    Rohitash

    #41208

    Daniel
    Participant

    Hello Ray,

    I wish you, as well as everybody on the forum, an Happy New Year !

    Is there any recent or near future evolution considering the availability of IFTTT functions with OS, since (as far as I understand) cloud base-services are now available ?…

    Thanks a lot for your answer.

    Daniel

    #41253

    Ray
    Keymaster

    Hi Daniel, we haven’t made any progress on integrating IFTTT. I think to begin with, I would like to hear some concrete examples or typical usage scenarios, in order to find the best way to integrate it. For example:
    – What are the typical triggers: are they based on time, sensor values, or cloud data?
    – Does IFTTT completely take over the control (hence sprinkler programs will not run), or should it co-exist with programs?
    – If it co-exists with programs, what happens if there is a conflict (i.e. programs are running and IFTTT is telling the controller to do something else?)

    #41271

    Daniel
    Participant

    Hello Ray,

    thank you for answering me !

    I am currently an user of IFTTT for the control of a connected thermostat (Netatmo), and I really appreciate the powerness of the IFTTT DO-buttons that allow me to control the thermostat more easily and quickly than with the web UI (or even than smartphone dedicated application), for example to :
    – switch to frost guard mode or to away mode (for a preset duration)
    – turn the thermostat off
    – switch to manual mode (a selected setpoint for a preset duration)
    – switch to a selected schedule

    These DO-buttons are based on the available Actions (“That” in IFTTT), as defined by Netatmo.

    The available Triggers (“IF” in IFTTT) for the Netatmo thermostat are the followings :
    – Entering manual mode
    – Entering / Exiting away mode
    – Entering / Exiting frost guard mode
    – Low battery alert

    For your information, I have also a Netatmo meteo-station with no IFTTT Actions, but with a lot of Triggers, based on Temperature (Internal or External) value, on Humidity value, on Pressure value, etc… I can then also use these Triggers to control the thermostat using IFTTT recipes…

    Finally, I also use IFTTT DO-button capability to control a Wemo connected plug that allows me to switch (On/Off) any electrical appliance (external light for example).

    Regarding now the OpenSprinkler system, I think it could be usefull to be able to improve the manual control of the system, for example (this is “my” minimum required actions list, but other Actions can be added) :
    – Start a selected program
    – Start a selected station for a preset duration
    – Stop a running program or station (started either by IFTTT or by OS)
    – Switch the wheather adjustment method to Manual (or back to Auto)
    – Set % Watering to a preset value

    In my opinion, IFTTT should co-exist with OS, that means that the last order received either from IFTTT or from OS must have the priority (as it is the case with the Netatmo thermostat…).

    OpenSprinkler Triggers could be :
    – Starting / Ending a program (show the Name of the program)
    – Starting / Stopping a station (show the Name of the station)
    – Rain detected (if a rain sensor is attached)
    – Low flow value (if a flow sensor is attached, low limit to be preset)
    – …

    So, to summarize, what you “just have to do” is :
    – create the OpenSprinkler IFTTT Channel (the controller)
    – create the OpenSprinkler IFTTT Triggers as described above
    – create the Opensprinkler IFTTT Actions as described above
    and we will just have to create the IFTTT Recipes…

    Please let me know if I have been clear enough 😉

    Thanks again, best regards.

    Daniel

    #45085

    Daniel
    Participant

    Hello Ray,

    almost one year after our discussion, I recently (2 days ago) noticed that IFTTT is now available for OpenSprinkler, and I want to warmly thank you for that !!!

    I am currently far from the location where my OS is installed, so I cannot perform any test before some weeks or monthes. However, I am already thinking about the IFTTT applets I can prepare, mainly using the “Maker” and “Button widget” capabilities to interface with the OS functions.

    I have attentively read the os-api-2.1.7.pdf document, and I think I understood how I can send to the OS the following requests :
    – Manually run a station (using cm) : http://os-ip/cm?pw=xxx&sid=0&en=1&t=360
    – Manually stop a station (using cm) : http://os-ip/cm?pw=xxx&sid=0&en=0
    – Manually start a program (using mp) : http://os-ip/mp?pw=xxx&pid=0&uwt=0
    but I am now wondering how I could stop a running program (whatever the way it has been started, manually or automatically) ?
    Edit : it seems that I can use the “Change controller variables” (cv), “Reset all stations” (rsn) : http://os-ip/cv?pw=xxx&rsn=1
    Am I right ?

    Another thing I wish to be able to do is to inhibit (prevent) the future starting of any program, and reversely (other widget) authorize (= remove the inhibition) this starting : this is something I have to do sometimes for example when the wheather forecast are bad or when the recent watering has been quite excessive. When I want to inhibit the future program(s), I have to look inside several pages of the UI in order to uncheck the “enabled” box on each program, which is not always easy to do on a smartphone…
    Edit : it seems that I also can use the “Change controller variables” (cv), “Operation enable” (en) :
    inhibit = disable : http://os-ip/cv?pw=xxx&en=0
    authorize = enable : http://os-ip/cv?pw=xxx&en=1
    Am I right too ?

    Thank you for your answer and help, best regards, and Happy New Year in advance.

    Daniel

    #45155

    Ray
    Keymaster

    To your first question: yes, the reset all stations command (http://os-ip/cv?pw=xxx&rsn=1) will do it.

    To your second question, yes, you can change the controller enable bit (http://os-ip/cv?pw=xxx&en=0) to prevent any station from running. Note that each program also has an ‘enable’ bit, so if you want to allow some programs to keep running but disable other programs you can also set each individual program’s enable bit.

    #45183

    Daniel
    Participant

    Hi Ray,
    thanks a lot for your answer and confirmation !

    If I want to disable only a program as per your suggestion, I suppose that I have to use the Change Program Data (cp) command as follows :
    http://os-ip/cp?pw=xxx&pid=xxx&en=0

    Am I still correct ?

    #45272

    Ray
    Keymaster

    Well, on second thought, it’s actually more complicated than that. The /cp command:
    https://openthings.freshdesk.com/solution/articles/5000716363-api-document-firmware-2-1-7-current-
    (page 8) actually requires providing the entire list of program parameters, and the enable bit is part of the ‘flag’ byte. I agree this is not really user friendly, and it remained this way due to backward compatibility issues. It is, however, be pretty easy to modify the firmware slightly to introduce a new command, say /ep, dedicated to enable or disable the enable bit of a program.

    #45287

    Daniel
    Participant

    Thank you Ray for your answer !

    Unfortunately, I am not able to modify the firmware, even slightly, to introduce a new command dedicated to enable or disable the enable bit of a program, something that would be usefull for me ! Do you intend to introduce this command in the future ?

    For the time being, I will just use the “Change controller variables” (cv), “Operation enable” (en) command as described above.

    Many thanks anyway.

    Best regards from France,

    Daniel

    #45357

    Ray
    Keymaster

    We can certainly add this to future firmware. You said you are not able to modify the firmware, even slightly, I am curious did you follow the instructions here:
    https://openthings.freshdesk.com/solution/articles/5000165132-how-to-compile-opensprinkler-firmware
    and it didn’t work, or did you feel it’s too technical and didn’t try?

    #45371

    Daniel
    Participant

    Hi Ray,

    thank you for adding this “enable program” command (ep) to your “todo list” when updating the firmware…

    As far as I am concerned, I am technically unable to modify the firmware as I don’t have the basic skill to do it. And given my age (68), I think it’s too late for me to consider learning Arduino programming. So I didn’t try the instructions in your above link…

    However, building IFTTT applets using the API existing commands is something that I can do, and I am quite happy and even proud of it…

    So, thank you again for your help !

    Regards.

    #45904

    codahq
    Participant

    Daniel, respect! You are awesome.

    #46270

    Daniel
    Participant

    Hello everybody,


    @codahq
    :
    Many thanks…


    @Ray
    :
    As I just arrived to my summer location, I started my OpenSprinkler installation and I tried to manage it using IFTTT orders as stated above. And after correction of the password, that I had not written in the MD5 form (!), everything is working well !!! So many thanks for your help…

    The only remaining thing is the add of the “enable program” command (ep), in order for me to be able to inhibit a selected program, as the “Operation enable” (en) command is not so suitable as it inhibits everything, including the manual start of any station…

    Best regards anyway !

    #48156

    Daniel
    Participant

    Hello Ray,

    nice to be back on this forum…

    Do you still intend to add the command /ep in order for me to be able to inhibit or authorize one program independently of other programs, as explained above ?

    Thanks in advance for this.

    Best regards.

    Daniel

    #48400

    Ray
    Keymaster

    Yes that’s still in the plan and we haven’t forgot about it. Too many things piling up at the moment and I am looking for the end of this semester to get back to work on OpenSprinkler firmware. Sorry about the long delay!

    #50515

    Daniel
    Participant

    Hello Ray,

    back to my summer location, my OS is working well, but I’m still expecting the change that we discussed last year !

    Do you still intend to make it ? That would be great for me !

    Thanks anyway, best regards from Europa !

    #50567

    Ray
    Keymaster

    Manually start a program through web API is implemented. See user manual:
    https://openthings.freshdesk.com/solution/articles/5000716363-api-documents
    section 12: manually start a program (it’s there since firmware 2.1.7).

    Enabling/disabling a program through web API unfortunately hasn’t been implemented — apologies that it fell through the crack, but it’s on the todo list now with a high priority as it’s fairly easy to implement.

    #50587

    Daniel
    Participant

    Hi Ray,

    Thanks a lot for your quick answer ! Manually starting of a program was already implemented in my IFTTT actions !

    For Enabling/disabling a program, I will wait until you implement the function in a future firmware version ; even if it is something easy (for you), I understand that you are very busy and cannot make it so urgently !

    Best regards.

    Daniel

    #51039

    AlexanBlack
    Participant
    #51070

    Daniel
    Participant

    @gclub

    If your question is for me, yes, I am still waiting for the API command for Enabling/disabling a specific program !

    Thank you, best regards.

    Allez la France !

    #51180

    Ray
    Keymaster

    Never mind the gclub post — it’s a spam post.

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

OpenSprinkler Forums Comments, Suggestions, Requests Feature Request: IFTTT