Set Slider Value from Machine Data #1442
supersebbo
started this conversation in
General
Replies: 1 comment 2 replies
-
Artisan has the concept of Event Quantification. The idea is that a stream of data gathered from regular sampling can be observed by such an event quantifier and on significant changes corresponding events are generated. So if the data stream represents burner values in the range from 0-100, such a quantifier can insert a gas change event "gas 60%" on a drop of the burner from 80 to 60. If that event type has a slider associated it will be moved to the new value, 60 in that case. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I'm building a websockets integration for a home-build roaster. I have got most things working but one challenge I can't fathom is how to set slider values based on data from the machine. This is mostly for initialization as I notice the sliders currently remember their last setting in Artisan rather than the actual value from the machine.
What I want to achieve is a two-way control, so the slider value is updated from the machine, and changes to the slider are sent to the machine. I can do the latter quite easily:
send({{"command": "burner", "value":"{}"}})
This is working. But how to read the value from the machine and update the slider in Artisan?
Assume the current burner value is in the
getData
response at node["data"]["burner"]
.There is an example for button state setting in the docs, but not slider state setting.
read({{"command": "getRoasterState"}});button(_["data"]["state"] == "ready")
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions