neo.exe Posted November 18, 2023 Share Posted November 18, 2023 On 11/17/2023 at 5:28 AM, Seba said: No, as intents doesn't give the flexibility HTTP server does. But in addition, EUC World will soon also include BLE server in addition to HTTP server, so maybe this will be viable solution for you? that could be good for stand alone devices. By the way, the HTTP server don't report PWM? 1 Quote Link to comment Share on other sites More sharing options...
Seba Posted November 18, 2023 Share Posted November 18, 2023 1 hour ago, neo.exe said: that could be good for stand alone devices. By the way, the HTTP server don't report PWM? Of course it does - in EUC World it's called "safety margin" and it's safe to assume that security margin is an inverse of what is called PWM. So 100 % of safety margin may be treated as 0 % PWM and vice versa. Safety margin WKI (well-known identifier) is "vsmg". Here's the API call to get just this value: Request GET http://<ip_address>:8080/api/values?filter=vsmg Parameters: filter - reqular expression used to request only certain WKIs; if not defined all values will be returned attrs - attributes to return (0 - minimal set of attributes, 1 - standard set of attributes, 2 - all attributes); defaults to 1 Response { "vsmg": { "v": 100, "d": true, "i": false, "t": "Safety Margin", "p": 4 } } Minimal set of attributes (always returned): v - value n - value as long (only for value type 1) d - true if value is valid, false otherwise i - true if imperial unit should be used (note: this is only information about EUC World configuration, value is always send in metric system, so it's up to the API user/consumer to perform necessary conversion) p - value type (0 - string, 1 - string + long, 2 - int, 3 - long, 4 - float, 5 - double, 6 - temperature, 7 - speed, 8 - distance, 9 - per distance, 10 - date&time or duration, 11 - altitude) Additional attributes returned when "param" > 0: t - title a - age (time of last update) Additional attributes returned when "param" > 1: y - validity; time in milliseconds how long after being updated value is considered valid tz - time zone ("UTC" for example, only for value type 10) sm - metric suffix ("km/h" for example) si - imperial suffix ("mph" for example) If value has never been updated or initialized, some attributes won't be returned. API will be expanded in upcoming releases, especially few additional attributes will be included like format string etc. 2.36.1 version that - when I write this post is pending Google Play review and should be available within next 1-2 days - introduced charger controller API at /api/charger endpoint. I'm preparing detailed API documentation that will be published at EUC World website. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.