amg0,
thanks for your feedback, it would be great to receive more feedbacks from you.
the API technology should be chosen so that it enables multiple client device types, it should be pervasive enough to be the same available api for multiple kind of device ( desktop , phone , tablet ) so http and cross browser supported api are typically a good choice.
Support of http already in our roadmap
the API need to offer ability to query metadata about devices capabilities. for instance an ability, to determine dynamically based on the device type what actions does it support , with what parameters & types. VERA was indirectly doing so with its upnp standard using XML file. was cumbersome but the functionality was somehow there, it is possible to enumerate devices and determine what actions is supported then dynamically construct a UI to trigger these actions
In our API - items are abilities, it will be available in next version of API documentation
web socket events is good for a push model sry to client but on some restricted devices, an alternate way ( based on a PULL model ) could be offered in http to read from a message queue
In order to have a great performance its very important to have good point-to-point communication and overcome hurdles which were put forward by HTTP. Also we like a full-duplex communication and possibility to have real time responses from the hub. All the WebSocket handshakes can be “checked” by the browsers using embedded developer tools in them, so you can easily use it.
Great performance, speed and stability of communication are the main goals.
But again http already in our roadmap.
I would not call “id” the parameter used for matching a request with a response. id typically identifies and object , the match request/response could be named something like “context” or “callback data”
I think mostly depends on preferences
I would from day 1 state that any timestamp / date is in ISO format yyyy-mm-dd:hh:mm:ss.uuuuZ GMT time , the UI would be in charge to translate to local timezone of the user
We are running scenes locally on hub including sunrise and sunset scenes.
Its mandatory for hub to know the region.
Very short actions responses should be synchronous , but medium to long actions responses could be asynchronous with the event based model for the actual result
Most of our APIs are synchronous.
events : very import to allow for easy filtering by the reader of events. so events must have mandatory fields ( type for the event type, source for the event source / sender ). then data fields can be event type specific
It is implemented: we have events and mandatory fields, detailed description will be available in next version of API documentation
Waiting for more feedbacks from you.