Skip to content

Sensors - Give Genericity Back  #13

@benjaminplanche

Description

@benjaminplanche

With the modifications done to integrate the Sunspots, we have lost in genericity.

The function createSensor and createMeasure in *services.js` can no longer be applied to any other kind of sensor but Sunspot.

  • createMeasure must be independent from the type of measure (not only for light and temp). It would be probably better if the Sunspots were sending 2 requests, one with the parameters '{type: "luminosity", value: ...}and one with '{type: "temperature", value: ...}, instead of only one with all the data.
  • createMeasure must still take into account the sensors able to correctly pass the data through the body of the requests. A condition could be done so that if the body doesn't contain the required parameters, the header is checked.
  • createSensor got a new parameter, baseUrl but not every sensor has such a base. We should discuss this...?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions