My application-in-progress in simple words is an industrial sensor monitor. Every time a new product is produced an operator pushes a button (ie, a post to losant) to increase a counter.
When operator starts working in a production order that counter needs to be reset to zero, then while producing it has to increase, and finally to stop at a given value (production order completed).
Example of indicator:
3/10 units produced. 30%
One option I thought of is to use Indicator block but I couldn’t find a way of setting custom starting moment on which Historical time starts to count. Also a downside of this option is that is slow due to dashboard refreshing rate (5 seconds at most, so the operator would perceive a delay when he/she pushes the button).
The other option I thought of is to use Losant API. My intention is that when device posts its state, losant updates counter in the cloud, and then notifies client of that update passing a JSON object. So communication would start from server to client. I dug through documentation and I found that I can attach to device state stream.
I tried the example with curl and had no problem,
How can I subscribe to device state updates from client side? I tried using HTML5
EventSourcewith no luck.
Using a polyfill is a possible solution for Authorization Header support?
Any suggestions will be welcome,