Giter Club home page Giter Club logo

fiware-device-simulator's People

Contributors

cayetanobv avatar gtorodelvalle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fiware-device-simulator's Issues

Negatives values using time-random-linear-interpolator

Hi again team,

When using time-random-linear-interpolator and last x-axis value (24) value is not included and previous (and actually the last) x-axis value is 0, simulation gives negative numbers.

Tested example (with available parking spots):

"time-random-linear-interpolator([[0,0],[7,0],[8,random(0,30)],[14,random(50,100)],[16,100],[18,random(60,100)],[22,random(30,80)],[23,0]])"

Between 23:00 and 23:59 hours values are always negative.

I think this is not exactly a bug, but I have reported you to take it in mind (and maybe ... can we add a remark in docs?).

Thanks!

Simulator emits end when TokenNotAvailable error is raised

Hi team,

When a TokenNotAvailable error is raised (i.e. due to maintenance tasks) simulator emits an end signal and all jobs are canceled. Could it be a good idea to put a new parameter setting a timeout (or number of attemps with a time interval)?

Thanks for all your great work!

New attribute-function-interpolator does not work with "complex" attribute names

Hi @gtorodelvalle ,

New attribute-function-interpolator does not work properly with "complex" attribute names.

Example 1:

"attribute-function-interpolator(${{camino-nuevo-01}{___Consumo_ModBus__energía_acumulada_activa_}} + ${{camino-nuevo-01}{___Consumo_activo_instantáneo__R+S+T_}})"

Example 2:

"attribute-function-interpolator(function add(a, b) { return a + b; }; add(${{camino-nuevo-01}{___Consumo_ModBus__energía_acumulada_activa_}},${{camino-nuevo-01}{___Consumo_activo_instantáneo__R+S+T_}});)"

Thanks!

geo:json example is not correct

it should be , for a Polygon, for instance:

{ 
   "type": "geo:json",
   "value": {
      "type": "Polygon",
       "coordinates": [
        [
          [-3.80356167695194, 43.46296641666926 ],
          [-3.803161973253841,43.46301091092682 ],
          [-3.803147082548618,43.462879859445884],
          [-3.803536474744068,43.462838666196674],
          [-3.80356167695194, 43.46296641666926]
        ]
    ]
   }
}

Attribute values with zero (of type number) does not work

Hi team,

I found a bug: if you put a value attribute with zero (of type number, not like a string... "0") simulator returns a Validator error (SimulationConfigurationNotValid). Example:

        {
          "name": "lowestFloor",
          "type": "Number",
          "value": 0
        }

HINT: I think this is caused because this IF check:

function validateValue(value, attributeType, attributeIndex, parentType, parentIndex, callback) {
  if (!value) {
    return callback(new fdsErrors.SimulationConfigurationNotValid('The ' + parentType + ' configuration information ' +
      'at array index position ' + parentIndex + ' includes ' +
      (attributeType === 'static' ? 'a staticAttributes' : 'an active') + ' attribute at array index position ' +
      attributeIndex + ' missing the value property'));
  }

Thanks!

Integer return support for time-random-linear-interpolator

Hi again team,

In certain situations is important that time-random-linear-interpolator returns integer instead of float.

Example: availableSpotNumber attribute in parkings entities.

Float returns by default is a good choice so maybe an optional parameter (when you want integer returns) in time-random-linear-interpolator is a possible solution.

Thanks!

Repeated data with time-random-linear-interpolator

Hi team,

I was storing data from simulations on a PostgreSQL database via ContextBroker subscription and I detect repeated data. With this information you can see the problem:

  • The config file which I was using.
  • I turn off logger and print via console.log the content of options object returned by getRequestOptions() during simulations.
  • Data stored on database.

Config file

The config file wich I was using is:
REMARK: this is a reduce-interval-config to show the problem with a dummy entity (other simulations wich we are doing has the scheduler to update each hour at o'clock: "0 0 * * * *"; this scheduler has the same problem with interpolations).

{
  "domain": {
    "service": "xxxxxxxxxxxxx",
    "subservice": "/xxxxxxxxxxxxxxxx"
  },
  "contextBroker": {
    "protocol": "https",
    "host": "xxxxxxxxxxxxxxx",
    "port": 10027, 
    "ngsiVersion": "1.0"
  },
  "authentication": {
    "protocol": "https",
    "host": "xxxxxxxxxxxxxxxxxxx",
    "port": 15001,
    "user": "xxxxxxxxxxxxxxxxxxx",
    "password": "xxxxxxxxxxxxx"
  },
  "entities": [
    {
      "entity_name": "WasteContainer:DTO:001",
      "entity_type": "WasteContainer_dummytesting",
      "schedule": "0 * * * * *",
      "active": [
        {
          "name": "fillingLevel",
          "type": "Number",
          "value": "time-random-linear-interpolator([[0,0],[1,random(0.03,0.035)],[2,random(0.035,0.038)],[3,random(0.038,0.040)],[4,random(0.040,0.042)],[6,random(0.044,0.045)],[7,random(0.045,0.049)],[8,random(0.049,0.055)],[9,random(0.055,0.07)],[10,random(0.07,0.08)],[11,random(0.085,0.088)],[12,random(0.088,0.090)],[13,random(0.090,0.095)],[14,random(0.095,0.12)],[15,random(0.12,0.13)],[16,random(0.13,0.15)],[17,random(0.15,0.19)],[18,random(0.19,0.25)],[19,random(0.25,0.35)],[20,random(0.35,0.55)],[21,random(0.55,0.75)],[22,random(0.75,0.85)],[23,random(0.85,0.91)],[24,0.95]])",
          "metadata": [
            {
              "name": "dateUpdated",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            },
            {
              "name": "TimeInstant",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            }
          ]
        },
        {
          "name": "temperature",
          "type": "Number",
          "value": "time-random-linear-interpolator([[0,random(8,10)],[10,random(10,15)],[14,random(25,35)],[20,random(10,15)],[24,random(8,10)]])",
          "metadata": [
            {
              "name": "dateUpdated",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            },
            {
              "name": "TimeInstant",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            }
          ]
        },
        {
          "name": "methaneConcentration",
          "type": "Number",
          "value": "time-random-linear-interpolator([[0,random(1700,1600)],[20,random(1600,1700)],[21,random(1700,1750)],[22,random(1750,1800)],[23,random(1800,1850)],[24,random(1800,1850)]])",
          "metadata": [
            {
              "name": "dateUpdated",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            },
            {
              "name": "TimeInstant",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            }
          ]
        },
        {
          "name": "dateUpdated",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
        },
        {
          "name": "TimeInstant",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
        },
        {
          "schedule": "0 0 0 * * *",
          "name": "dateLastEmptying",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
        },
        {
          "schedule": "0 0 0 1 * *",
          "name": "dateNextActuation",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 2592000})"
        }
      ],
      "staticAttributes": [
        {
          "name": "refWasteContainerModel",
          "type": "Text",
          "value": "WasteContainerModel:001"
        },
        {
          "name": "containerIsle",
          "type": "Text",
          "value": "WasteContainerIsle:Oeste"
        },
        {
          "name": "isleId",
          "type": "Text",
          "value": "WasteContainerIsle:Oeste"
        },
        {
          "name": "serialNumber",
          "type": "Text",
          "value": "WasteContainer:DTO:001"
        },
        {
          "name": "location",
          "type": "geo:json",
          "value": {
            "type": "Point",
            "coordinates": [-3.6661827564239498,40.51538151533159]
          }
        },
        {
          "name": "category",
          "type": "List",
          "value": "surface"
        },
        {
          "name": "storedWasteOrigin",
          "type": "Text",
          "value": "municipal"
        },
        {
          "name": "storedWasteKind",
          "type": "List",
          "value": "organic"
        },
        {
          "name": "status",
          "type": "Text",
          "value": "ok"
        }
      ]
    },
    {
      "entity_name": "WasteContainer:DTO:002",
      "entity_type": "WasteContainer_dummytesting",
      "schedule": "0 * * * * *",
      "active": [
        {
          "name": "fillingLevel",
          "type": "Number",
          "value": "time-random-linear-interpolator([[0,0],[1,random(0.03,0.035)],[2,random(0.035,0.038)],[3,random(0.038,0.040)],[4,random(0.040,0.042)],[6,random(0.044,0.045)],[7,random(0.045,0.049)],[8,random(0.049,0.055)],[9,random(0.055,0.07)],[10,random(0.07,0.08)],[11,random(0.085,0.088)],[12,random(0.088,0.090)],[13,random(0.090,0.095)],[14,random(0.095,0.12)],[15,random(0.12,0.13)],[16,random(0.13,0.15)],[17,random(0.15,0.19)],[18,random(0.19,0.25)],[19,random(0.25,0.35)],[20,random(0.35,0.55)],[21,random(0.55,0.75)],[22,random(0.75,0.85)],[23,random(0.85,0.91)],[24,0.95]])",
          "metadata": [
            {
              "name": "dateUpdated",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            },
            {
              "name": "TimeInstant",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            }
          ]
        },
        {
          "name": "temperature",
          "type": "Number",
          "value": "time-random-linear-interpolator([[0,random(8,10)],[10,random(10,15)],[14,random(25,35)],[20,random(10,15)],[24,random(8,10)]])",
          "metadata": [
            {
              "name": "dateUpdated",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            },
            {
              "name": "TimeInstant",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            }
          ]
        },
        {
          "name": "methaneConcentration",
          "type": "Number",
          "value": "time-random-linear-interpolator([[0,random(1700,1600)],[20,random(1600,1700)],[21,random(1700,1750)],[22,random(1750,1800)],[23,random(1800,1850)],[24,random(1800,1850)]])",
          "metadata": [
            {
              "name": "dateUpdated",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            },
            {
              "name": "TimeInstant",
              "type": "DateTime",
              "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
            }
          ]
        },
        {
          "name": "dateUpdated",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
        },
        {
          "name": "TimeInstant",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
        },
        {
          "schedule": "0 0 0 * * *",
          "name": "dateLastEmptying",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 0})"
        },
        {
          "schedule": "0 0 0 1 * *",
          "name": "dateNextActuation",
          "type": "DateTime",
          "value": "date-increment-interpolator({\"origin\": \"now\", \"increment\": 2592000})"
        }
      ],
      "staticAttributes": [
        {
          "name": "refWasteContainerModel",
          "type": "Text",
          "value": "WasteContainerModel:001"
        },
        {
          "name": "containerIsle",
          "type": "Text",
          "value": "WasteContainerIsle:Oeste"
        },
        {
          "name": "isleId",
          "type": "Text",
          "value": "WasteContainerIsle:Oeste"
        },
        {
          "name": "serialNumber",
          "type": "Text",
          "value": "WasteContainer:DTO:001"
        },
        {
          "name": "location",
          "type": "geo:json",
          "value": {
            "type": "Point",
            "coordinates": [-3.6661827564239498,40.51538151533159]
          }
        },
        {
          "name": "category",
          "type": "List",
          "value": "surface"
        },
        {
          "name": "storedWasteOrigin",
          "type": "Text",
          "value": "municipal"
        },
        {
          "name": "storedWasteKind",
          "type": "List",
          "value": "organic"
        },
        {
          "name": "status",
          "type": "Text",
          "value": "ok"
        }
      ]
    }
  ]
}

Console output

I turn off logger and print via console.log the content of options object returned by getRequestOptions() during simulations.
Below you can see last 4 data simulated.

{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:001","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.14502703439583997,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.262Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.262Z"}]},{"name":"temperature","type":"Number","value":23.42275215456418,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.264Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.264Z"}]},{"name":"methaneConcentration","type":"Number","value":1658.188205893035,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.265Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.265Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.265Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.265Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:002","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.13920668016956184,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.267Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.268Z"}]},{"name":"temperature","type":"Number","value":25.187363179070726,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.268Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.268Z"}]},{"name":"methaneConcentration","type":"Number","value":1642.26780736004,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.268Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.268Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.268Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.268Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:001","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.13493448426364918,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.739Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.739Z"}]},{"name":"temperature","type":"Number","value":27.361201117591317,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.739Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.739Z"}]},{"name":"methaneConcentration","type":"Number","value":1647.6041703213123,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.739Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.739Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.739Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.739Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:002","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.14129206007206807,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.741Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.741Z"}]},{"name":"temperature","type":"Number","value":26.0318044051237,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.742Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.742Z"}]},{"name":"methaneConcentration","type":"Number","value":1685.3477727529826,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.742Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.742Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:09:00.742Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:09:00.742Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:001","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.14611523775849494,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.272Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.272Z"}]},{"name":"temperature","type":"Number","value":26.377185984133067,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.272Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.272Z"}]},{"name":"methaneConcentration","type":"Number","value":1659.2416882670175,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.272Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.272Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.272Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.272Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:002","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.14772411968481422,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.273Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.273Z"}]},{"name":"temperature","type":"Number","value":24.439551415465147,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.273Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.273Z"}]},{"name":"methaneConcentration","type":"Number","value":1681.2019530270481,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.273Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.273Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.273Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.273Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:001","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.148040835322657,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.738Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.738Z"}]},{"name":"temperature","type":"Number","value":26.006644917943046,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.738Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.738Z"}]},{"name":"methaneConcentration","type":"Number","value":1664.8902234638808,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.738Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.738Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.738Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.738Z","metadatas":[]}]}],"updateAction":"APPEND"}}
{"method":"POST","url":"https://195.235.93.224:10027/v1/updateContext","rejectUnauthorized":false,"headers":{"Content-Type":"application/json","Accept":"application/json","Fiware-Service":"urbo","Fiware-ServicePath":"/geographica","X-Auth-Token":"7037a7168dce4627a59cddf921e88caa"},"json":true,"body":{"contextElements":[{"id":"WasteContainer:DTO:002","type":"WasteContainer_dummytesting","isPattern":false,"attributes":[{"name":"refWasteContainerModel","type":"Text","value":"WasteContainerModel:001","metadatas":[]},{"name":"containerIsle","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"isleId","type":"Text","value":"WasteContainerIsle:Oeste","metadatas":[]},{"name":"serialNumber","type":"Text","value":"WasteContainer:DTO:001","metadatas":[]},{"name":"location","type":"geo:json","value":{"type":"Point","coordinates":[-3.6661827564239498,40.51538151533159]},"metadatas":[]},{"name":"category","type":"List","value":"surface","metadatas":[]},{"name":"storedWasteOrigin","type":"Text","value":"municipal","metadatas":[]},{"name":"storedWasteKind","type":"List","value":"organic","metadatas":[]},{"name":"status","type":"Text","value":"ok","metadatas":[]},{"name":"fillingLevel","type":"Number","value":0.15120912243767332,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.745Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.745Z"}]},{"name":"temperature","type":"Number","value":23.480185064771728,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.745Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.745Z"}]},{"name":"methaneConcentration","type":"Number","value":1667.1766103668294,"metadatas":[{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.745Z"},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.745Z"}]},{"name":"dateUpdated","type":"DateTime","value":"2016-09-02T14:10:00.745Z","metadatas":[]},{"name":"TimeInstant","type":"DateTime","value":"2016-09-02T14:10:00.745Z","metadatas":[]}]}],"updateAction":"APPEND"}}

Data stored in table (PostgreSQL)

 id_entity        |   fillinglevel    |       TimeInstant       
------------------------+-------------------+-------------------------
 WasteContainer:DTO:002 | 0.151209122437673 | 2016-09-02 14:10:00.745
 WasteContainer:DTO:001 | 0.148040835322657 | 2016-09-02 14:10:00.738
 WasteContainer:DTO:002 | 0.147724119684814 | 2016-09-02 14:10:00.273
 WasteContainer:DTO:001 | 0.146115237758495 | 2016-09-02 14:10:00.272
 WasteContainer:DTO:002 | 0.141292060072068 | 2016-09-02 14:09:00.742
 WasteContainer:DTO:001 | 0.134934484263649 | 2016-09-02 14:09:00.739
 WasteContainer:DTO:002 | 0.139206680169562 | 2016-09-02 14:09:00.268
 WasteContainer:DTO:001 |  0.14502703439584 | 2016-09-02 14:09:00.265
 WasteContainer:DTO:002 | 0.153099141337598 | 2016-09-02 14:08:00.742
 WasteContainer:DTO:001 | 0.147210149570679 | 2016-09-02 14:08:00.74
 WasteContainer:DTO:002 | 0.135899888315548 | 2016-09-02 14:08:00.266
 WasteContainer:DTO:001 | 0.147026064514493 | 2016-09-02 14:08:00.262
 WasteContainer:DTO:002 | 0.139298297385608 | 2016-09-02 14:07:00.743
 WasteContainer:DTO:001 | 0.133552964761931 | 2016-09-02 14:07:00.74
 WasteContainer:DTO:002 | 0.151867175612832 | 2016-09-02 14:07:00.227
 WasteContainer:DTO:001 | 0.144203685145825 | 2016-09-02 14:07:00.224
 WasteContainer:DTO:002 | 0.136373207422439 | 2016-09-02 14:06:00.743
 WasteContainer:DTO:001 | 0.133928582547233 | 2016-09-02 14:06:00.739
 WasteContainer:DTO:002 | 0.138674432682339 | 2016-09-02 14:06:00.28
 WasteContainer:DTO:001 | 0.144820262875874 | 2016-09-02 14:06:00.277
 WasteContainer:DTO:002 |  0.14342775981524 | 2016-09-02 14:05:00.742
 WasteContainer:DTO:001 | 0.151611933407063 | 2016-09-02 14:05:00.738
 WasteContainer:DTO:002 |  0.14745198164174 | 2016-09-02 14:05:00.278
 WasteContainer:DTO:001 | 0.136188166534994 | 2016-09-02 14:05:00.276
 WasteContainer:DTO:002 | 0.138098833223805 | 2016-09-02 14:04:00.743
 WasteContainer:DTO:001 | 0.150395393401384 | 2016-09-02 14:04:00.739
 WasteContainer:DTO:002 | 0.145274788182229 | 2016-09-02 14:04:00.24
 WasteContainer:DTO:001 | 0.134708060447127 | 2016-09-02 14:04:00.237
 WasteContainer:DTO:002 | 0.134414789361646 | 2016-09-02 14:03:00.742
 WasteContainer:DTO:001 | 0.137161461537238 | 2016-09-02 14:03:00.74
 WasteContainer:DTO:002 | 0.140403889478883 | 2016-09-02 14:03:00.279
 WasteContainer:DTO:001 | 0.135385780443437 | 2016-09-02 14:03:00.276
 WasteContainer:DTO:002 | 0.133513047108582 | 2016-09-02 14:02:00.744
 WasteContainer:DTO:001 | 0.142149455396924 | 2016-09-02 14:02:00.74
 WasteContainer:DTO:002 | 0.136174609502312 | 2016-09-02 14:02:00.266
 WasteContainer:DTO:001 | 0.138976944141866 | 2016-09-02 14:02:00.263
 WasteContainer:DTO:002 | 0.146707171716184 | 2016-09-02 14:01:00.744
 WasteContainer:DTO:001 | 0.149806109672878 | 2016-09-02 14:01:00.739
 WasteContainer:DTO:002 | 0.132528351629308 | 2016-09-02 14:01:00.231
 WasteContainer:DTO:001 | 0.146976071875387 | 2016-09-02 14:01:00.227
 WasteContainer:DTO:002 | 0.144896769952029 | 2016-09-02 14:00:00.743
 WasteContainer:DTO:001 | 0.130837104553357 | 2016-09-02 14:00:00.74
 WasteContainer:DTO:002 | 0.146180224344134 | 2016-09-02 14:00:00.278
 WasteContainer:DTO:001 |  0.14029757082928 | 2016-09-02 14:00:00.275
 WasteContainer:DTO:002 | 0.138806411282315 | 2016-09-02 13:59:00.744
 WasteContainer:DTO:001 |  0.13345098115236 | 2016-09-02 13:59:00.74
 WasteContainer:DTO:002 | 0.145017149269038 | 2016-09-02 13:59:00.267
 WasteContainer:DTO:001 |  0.13981843659759 | 2016-09-02 13:59:00.265
 WasteContainer:DTO:002 |  0.13210528708389 | 2016-09-02 13:58:00.746
 WasteContainer:DTO:001 |   0.1415150286227 | 2016-09-02 13:58:00.74
 WasteContainer:DTO:002 | 0.142199876540418 | 2016-09-02 13:58:00.272
 WasteContainer:DTO:001 | 0.144685401647585 | 2016-09-02 13:58:00.267
 WasteContainer:DTO:002 | 0.139237229720922 | 2016-09-02 13:57:00.741
 WasteContainer:DTO:001 | 0.144964029422612 | 2016-09-02 13:57:00.738
 WasteContainer:DTO:002 | 0.130571949947393 | 2016-09-02 13:57:00.281
 WasteContainer:DTO:001 | 0.143144689640263 | 2016-09-02 13:57:00.278
 WasteContainer:DTO:002 | 0.145310030595399 | 2016-09-02 13:56:00.744
 WasteContainer:DTO:001 | 0.142046386240671 | 2016-09-02 13:56:00.738
 WasteContainer:DTO:002 | 0.135676638723041 | 2016-09-02 13:56:00.26
 WasteContainer:DTO:001 | 0.131106050404099 | 2016-09-02 13:56:00.257
 WasteContainer:DTO:002 | 0.138786508618893 | 2016-09-02 13:55:00.756
 WasteContainer:DTO:001 | 0.143123882259436 | 2016-09-02 13:55:00.753
 WasteContainer:DTO:002 | 0.147096855133772 | 2016-09-02 13:54:00.745
 WasteContainer:DTO:001 | 0.130395047869766 | 2016-09-02 13:54:00.741
 WasteContainer:DTO:002 | 0.138262128877686 | 2016-09-02 13:53:00.803
 WasteContainer:DTO:001 | 0.146412818348617 | 2016-09-02 13:53:00.799
 WasteContainer:DTO:002 | 0.133358644062032 | 2016-09-02 13:52:00.805
 WasteContainer:DTO:001 | 0.130686452643635 | 2016-09-02 13:52:00.8
 WasteContainer:DTO:002 | 0.139089937914163 | 2016-09-02 13:51:00.754
 WasteContainer:DTO:001 | 0.142545062250574 | 2016-09-02 13:51:00.751
 WasteContainer:DTO:002 | 0.142313595062199 | 2016-09-02 13:50:00.803
 WasteContainer:DTO:001 | 0.129373563226933 | 2016-09-02 13:50:00.8
 WasteContainer:DTO:002 | 0.144440454348107 | 2016-09-02 13:49:00.766
 WasteContainer:DTO:001 | 0.134754697142169 | 2016-09-02 13:49:00.763
 WasteContainer:DTO:002 | 0.142042899824679 | 2016-09-02 13:48:00.802
 WasteContainer:DTO:001 | 0.137145458925515 | 2016-09-02 13:48:00.798
 WasteContainer:DTO:002 | 0.132755550757477 | 2016-09-02 13:47:00.801
 WasteContainer:DTO:001 | 0.133016526405777 | 2016-09-02 13:47:00.798
 WasteContainer:DTO:002 | 0.139542972866135 | 2016-09-02 13:46:00.765
 WasteContainer:DTO:001 | 0.131417323073916 | 2016-09-02 13:46:00.761
 WasteContainer:DTO:002 | 0.132908147081616 | 2016-09-02 13:45:00.75
 WasteContainer:DTO:001 | 0.141609767758637 | 2016-09-02 13:45:00.747
 WasteContainer:DTO:002 | 0.139177746608543 | 2016-09-02 13:44:00.801
 WasteContainer:DTO:001 | 0.139224192242759 | 2016-09-02 13:44:00.798
 WasteContainer:DTO:002 |    0.132645055481 | 2016-09-02 13:43:00.795
 WasteContainer:DTO:001 | 0.131068867582401 | 2016-09-02 13:43:00.793
 WasteContainer:DTO:002 | 0.142657779745292 | 2016-09-02 13:42:00.802
 WasteContainer:DTO:001 | 0.133128981444985 | 2016-09-02 13:42:00.799
 WasteContainer:DTO:002 | 0.129867344975549 | 2016-09-02 13:41:00.8
 WasteContainer:DTO:001 | 0.134600144684431 | 2016-09-02 13:41:00.798
 WasteContainer:DTO:002 | 0.131878737506146 | 2016-09-02 13:40:00.773
 WasteContainer:DTO:001 | 0.133010962724996 | 2016-09-02 13:40:00.77
 WasteContainer:DTO:002 | 0.139113744159811 | 2016-09-02 13:39:00.749
 WasteContainer:DTO:001 | 0.129990729069221 | 2016-09-02 13:39:00.746
 WasteContainer:DTO:002 | 0.140736117785719 | 2016-09-02 13:38:00.802
 WasteContainer:DTO:001 | 0.140274562297156 | 2016-09-02 13:38:00.798
 WasteContainer:DTO:002 | 0.129851677214921 | 2016-09-02 13:37:00.801
 WasteContainer:DTO:001 | 0.129926879573769 | 2016-09-02 13:37:00.798
 WasteContainer:DTO:002 | 0.137991331203841 | 2016-09-02 13:36:00.793
 WasteContainer:DTO:001 | 0.138227511884645 | 2016-09-02 13:36:00.79
 WasteContainer:DTO:002 | 0.138766445592434 | 2016-09-02 13:35:00.803
 WasteContainer:DTO:001 | 0.137053214272407 | 2016-09-02 13:35:00.8
 WasteContainer:DTO:002 |  0.12779212193486 | 2016-09-02 13:34:00.764
 WasteContainer:DTO:001 | 0.139984533169152 | 2016-09-02 13:34:00.76
 WasteContainer:DTO:002 | 0.135350439213449 | 2016-09-02 13:33:00.763
 WasteContainer:DTO:001 | 0.128711423876579 | 2016-09-02 13:33:00.759
 WasteContainer:DTO:002 | 0.130168918194715 | 2016-09-02 13:32:00.777
 WasteContainer:DTO:001 | 0.129463136550349 | 2016-09-02 13:32:00.774
 WasteContainer:DTO:002 | 0.135957269204004 | 2016-09-02 13:31:00.745
 WasteContainer:DTO:001 | 0.133780210310128 | 2016-09-02 13:31:00.742
 WasteContainer:DTO:002 | 0.135904532083077 | 2016-09-02 13:30:00.745
 WasteContainer:DTO:001 | 0.126714440245414 | 2016-09-02 13:30:00.743
 WasteContainer:DTO:002 | 0.132712835055543 | 2016-09-02 13:29:00.793
 WasteContainer:DTO:001 | 0.129191810645163 | 2016-09-02 13:29:00.789
 WasteContainer:DTO:002 | 0.134802945920577 | 2016-09-02 13:28:00.802
 WasteContainer:DTO:001 | 0.131862489419058 | 2016-09-02 13:28:00.799
 WasteContainer:DTO:002 |  0.13320350866334 | 2016-09-02 13:27:00.799
 WasteContainer:DTO:001 | 0.128687682501739 | 2016-09-02 13:27:00.796
 WasteContainer:DTO:002 |  0.12744085470424 | 2016-09-02 13:26:00.801
 WasteContainer:DTO:001 | 0.127482731376775 | 2016-09-02 13:26:00.798
 WasteContainer:DTO:002 | 0.133663938410076 | 2016-09-02 13:25:00.801
 WasteContainer:DTO:001 | 0.133938797989783 | 2016-09-02 13:25:00.798
 WasteContainer:DTO:002 | 0.129945479898248 | 2016-09-02 13:24:00.762
 WasteContainer:DTO:001 | 0.130675224256236 | 2016-09-02 13:24:00.76
 WasteContainer:DTO:002 | 0.131288413285084 | 2016-09-02 13:23:00.801
 WasteContainer:DTO:001 | 0.128094310704735 | 2016-09-02 13:23:00.798
 WasteContainer:DTO:002 | 0.126805518261312 | 2016-09-02 13:22:00.765
 WasteContainer:DTO:001 |  0.12615115513769 | 2016-09-02 13:22:00.761
 WasteContainer:DTO:002 | 0.131787362519302 | 2016-09-02 13:21:00.76
 WasteContainer:DTO:001 | 0.125765562528861 | 2016-09-02 13:21:00.757
 WasteContainer:DTO:002 | 0.128328831400722 | 2016-09-02 13:20:00.769
 WasteContainer:DTO:001 |  0.13558536064035 | 2016-09-02 13:20:00.766
 WasteContainer:DTO:002 | 0.129369916366336 | 2016-09-02 13:19:00.803
 WasteContainer:DTO:001 | 0.133395796655134 | 2016-09-02 13:19:00.798
 WasteContainer:DTO:002 | 0.128671206279425 | 2016-09-02 13:18:00.745
 WasteContainer:DTO:001 |  0.12725437261234 | 2016-09-02 13:18:00.743
 WasteContainer:DTO:002 | 0.126578618868759 | 2016-09-02 13:17:00.749
 WasteContainer:DTO:001 | 0.128034869365511 | 2016-09-02 13:17:00.746
 WasteContainer:DTO:002 | 0.131172888757351 | 2016-09-02 13:16:00.792
 WasteContainer:DTO:001 | 0.128212925299381 | 2016-09-02 13:16:00.789
 WasteContainer:DTO:002 | 0.131699528234312 | 2016-09-02 13:15:00.788
 WasteContainer:DTO:001 | 0.129051752832602 | 2016-09-02 13:15:00.786
 WasteContainer:DTO:002 | 0.124165461804485 | 2016-09-02 13:14:00.763
 WasteContainer:DTO:001 | 0.132595370445556 | 2016-09-02 13:14:00.759
 WasteContainer:DTO:002 | 0.129853408496361 | 2016-09-02 13:13:00.743
 WasteContainer:DTO:001 | 0.122770139084275 | 2016-09-02 13:13:00.74
 WasteContainer:DTO:002 | 0.127550457011908 | 2016-09-02 13:12:00.79
 WasteContainer:DTO:001 | 0.122981462980621 | 2016-09-02 13:12:00.787
 WasteContainer:DTO:002 | 0.130056876468356 | 2016-09-02 13:11:00.803
 WasteContainer:DTO:001 | 0.123377803948591 | 2016-09-02 13:11:00.8
 WasteContainer:DTO:002 | 0.126070661795093 | 2016-09-02 13:10:00.79
 WasteContainer:DTO:001 |  0.12556630056429 | 2016-09-02 13:10:00.787
 WasteContainer:DTO:002 | 0.124647640460869 | 2016-09-02 13:09:00.8
 WasteContainer:DTO:001 | 0.125695416277391 | 2016-09-02 13:09:00.798
 WasteContainer:DTO:002 | 0.132244184290525 | 2016-09-02 13:08:00.777
 WasteContainer:DTO:001 | 0.127112351386342 | 2016-09-02 13:08:00.776
 WasteContainer:DTO:002 | 0.125552384180444 | 2016-09-02 13:07:00.778
 WasteContainer:DTO:001 | 0.129488096003731 | 2016-09-02 13:07:00.775
 WasteContainer:DTO:002 | 0.125756603153655 | 2016-09-02 13:06:00.801
 WasteContainer:DTO:001 | 0.122164248446701 | 2016-09-02 13:06:00.799
 WasteContainer:DTO:002 | 0.122971034601602 | 2016-09-02 13:05:00.802
 WasteContainer:DTO:001 | 0.122497119630959 | 2016-09-02 13:05:00.799
 WasteContainer:DTO:002 | 0.125584352195263 | 2016-09-02 13:04:00.759
 WasteContainer:DTO:001 | 0.127364776903453 | 2016-09-02 13:04:00.757
 WasteContainer:DTO:002 |  0.12483883444313 | 2016-09-02 13:03:00.743
 WasteContainer:DTO:001 | 0.130164546528831 | 2016-09-02 13:03:00.739
 WasteContainer:DTO:002 | 0.122002407160588 | 2016-09-02 13:02:00.766
 WasteContainer:DTO:001 | 0.125820084249601 | 2016-09-02 13:02:00.757
 WasteContainer:DTO:002 | 0.130190931583134 | 2016-09-02 13:01:00.801
 WasteContainer:DTO:001 | 0.125948639551061 | 2016-09-02 13:01:00.799
 WasteContainer:DTO:002 | 0.122430016621947 | 2016-09-02 13:00:00.746
 WasteContainer:DTO:001 | 0.122411506036296 | 2016-09-02 13:00:00.743
 WasteContainer:DTO:002 | 0.129091747499498 | 2016-09-02 12:59:00.8
 WasteContainer:DTO:001 | 0.124913849085084 | 2016-09-02 12:59:00.798
 WasteContainer:DTO:002 | 0.125782086580254 | 2016-09-02 12:58:00.788
 WasteContainer:DTO:001 | 0.121090317819927 | 2016-09-02 12:58:00.787
 WasteContainer:DTO:002 | 0.128247624017473 | 2016-09-02 12:57:00.757
 WasteContainer:DTO:001 | 0.122326912452176 | 2016-09-02 12:57:00.753
(178 rows)

Access to other attributes within a function interpolator

Hi, @gtorodelvalle

In order to make realistic simulations some attributes might depend on other attributes at the very same data triggering. We can now access to just generated values querying the context broker with the '${{}}' syntax, but this is provoking delayed values for calculated attributes.

¿Any idea about how this can be implemented?

Regards

Can't clone simulation-configuration-* on Windows

Files simulation-configuration-JSON::HTTP-devices-, simulation-configuration-UltraLight::HTTP-devices-, simulation-configuration-UltraLight::MQTT-devices-* can't be cloned in windows as they have invalid characters in it (::).

Files should be renamed in order allow the project to be cloned in shared folders between windows and linux (for example when you use VMs)

Schedule: range values are not supported (nor value list)

Hi team,

When you are trying to use range values in shedules simulator raise a SimulationConfigurationNotValid error. This is important to avoid send values when a parking is close (i.e. between 21:00 and 7:00 - closed hours - simulator does nothing avoiding overhead).

Example (config and error raised):

  • "schedule": "0 0 6-22 * * *"
  • {"time":"2016-09-25T08:38:40.705Z","lvl":"ERROR","msg":"error event: { error: \n { [SimulationConfigurationNotValid: The entity configuration information at array index position 0 includes an invalid schedule: '0 0 6-22 * * *']\n name: 'SimulationConfigurationNotValid',\n message: 'The entity configuration information at array index position 0 includes an invalid schedule: \\'0 0 6-22 * * *\\'' } }"}

I was reviewing regular expression in validateScuedule function and this feature is not supported:

function validateSchedule(schedule, parentType, parentIndex, callback) {
  var err;
  if (schedule && !/(^once$|^(\*\/[0-9]+\s+|\*\s+|[0-9]+\s+){4,5}(\*\/[0-9]+|\*|[0-9]))/g.test(schedule)) {
    err = new fdsErrors.SimulationConfigurationNotValid('The ' + parentType + ' configuration information ' +
      'at array index position ' + parentIndex + ' includes an invalid schedule: \'' + schedule + '\'');
  }
  callback(err);
}

It is also not supported to pass a value list in schedulers like "0 0 6,22 * * *" (I reviewed cron-schedule docs and I am not sure this is supported by library although it is a classical Unix feature in crontabs). This feature is important because an example like this:

  • a parking (at parking entity level) sends two signals a day: when open at 6:00 and when close at 22:00. At parking spot level simulations for status (occupied or free) can be much more frequently (i.e. each 15 minutes).

Thanks!

Simulation breaks after a while

Hi, I'm using the simulator with the orion global instance at FIWARE Lab. After a while (from 1 hour to 24 hours) the simulator always breaks, with two possible messages:

{"time":"2016-10-28T10:39:31.674Z","lvl":"ERROR","msg":"error event: { error: { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } }"}
{"time":"2016-10-28T10:39:33.500Z","lvl":"INFO","msg":"end event"}

or

{"time":"2016-10-29T01:14:51.170Z","lvl":"ERROR","msg":"error event: { error: \n { name: 'TokenNotAvailable',\n message: 'Authorization token could not be generated due to error
(code: undefined, title: undefined, message: undefined)' } }"}
{"time":"2016-10-29T01:17:52.429Z","lvl":"INFO","msg":"end event"}

At least the simulator should be able to reconnect and keep sending messages where it was (without starting again). Also I think that when the simulator breaks this way, an status different than 0 should be returned.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.