POST Setpoint

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

POST Setpoint

Post by oakbarn »

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: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: POST Setpoint

Post by oakbarn »

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: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: POST Setpoint

Post by brahn »

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: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: POST Setpoint

Post by oakbarn »

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"?
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: POST Setpoint

Post by JonW »

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: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: POST Setpoint

Post by brahn »

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