POST Setpoint

Things to come.
Post Reply
User avatar
oakbarn
Posts: 777
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

POST Setpoint

Post by oakbarn » Sun Jan 03, 2016 5:28 pm

I see that the Setpoint is also READ ONLY rather than being able to Post. If you could Post, then a javascript routine could be written where a Duty Cycle could be changed similar to the Temp Setpoint Adjustment Page.

I remember what was said about the SetPoint issues with different Outs, but that could be a non issue for a single Out being controlled by the Probe. You could create the logic in javascript so that the setpoint was for a specific Out that was being used.

User avatar
oakbarn
Posts: 777
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: POST Setpoint

Post by oakbarn » Mon Jan 04, 2016 8:45 am

POST /process/{process_id}/state/{state_id}/output_controllers
OutputController {
mode (integer, optional) = ['0-unused' or '1-direct' or '2-duty cycle' or '3-differential' or '4-PID'],
heat (boolean, optional),
input (integer, optional),
swing (integer, optional),
setpoint (integer, optional)

Looks like Setpoint could be set here in the Process State Output controller in the API :oops:

brahn
Posts: 539
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: POST Setpoint

Post by brahn » Mon Jan 04, 2016 10:02 am

That's correct, and that's also the primary reason why the setpoint attribute of the temp endpoint is read-only. The setpoint is an attribute of the state/output control, not the temp probe. Allowing changes to the setpoint from the temp endpoint creates a number of potential issues. What we're currently looking at is adding an attribute to the temp endpoint containing the URL of the state that is currently controlling the setpoint. That way you could send the request to the correct place without having to determine yourself which state is controlling the setpoint.

I notice in your post that you mention duty cycle in reference to changing the setpoint on a temp probe. That's a little misleading because duty cycle is not tied in any way to a temp probe unless you're using PID, in which case you wouldn't want to manually change the duty cycle.

User avatar
oakbarn
Posts: 777
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: POST Setpoint

Post by oakbarn » Mon Jan 04, 2016 3:21 pm

Yes, I understand that the Temp has nothing to do with the "duty cycle". It is just that I manually monitor a Temp Probe when I use duty cycle. Alao came accross that .setpoint in the Temp section of the API. I will try to remember in my "posts" not to confuse the issue.

Since POST /process/{process_id}/state/{state_id}/output_controllers
has .setpoint attribute, I would assume that posting to an specific process:state:output that has .mode as "2-duty cycle" would update the "duty cycle"?

User avatar
JonW
Site Admin
Posts: 1606
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: POST Setpoint

Post by JonW » Mon Jan 04, 2016 3:44 pm

oakbarn wrote:Since POST /process/{process_id}/state/{state_id}/output_controllers
has .setpoint attribute, I would assume that posting to an specific process:state:output that has .mode as "2-duty cycle" would update the "duty cycle"?
Correct.

brahn
Posts: 539
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: POST Setpoint

Post by brahn » Mon Jan 04, 2016 4:01 pm

Correct. And as long as the output is already set to duty cycle on that state, you only need to update setpoint. eg,

Code: Select all

[{setpoint: 750}]
to update the setpoint on output 0 to 75%. I'm pretty sure that's the syntax anyway, I'd need to double check to be sure, but you only need to specify the attribute you want to change.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest