curl -X POST localhost:10026/v2/entities/ES0021000001111111AA/attrs -s -S -H 'Content-Type: application/json' -H 'fiware-service: desarrollo_mb3' -H 'fiware-servicepath: /energia' -d @- <<EOF
{"areaServed":{"value":"Ayuntamiento de Alcobendas"},"name":{"value":"Punto de suministro 1"},"address":{"value":"Avenida de España, 2"},"location":{"value":{"type":"Point","coordinates":[-3.643898968,40.543613027]},"type":"geo:json"},"electricityRateName":{"value":"2.0A"},"maximumPowerAvailableP1":{"value":"5"},"maximumPowerAvailableP2":{"value":""},"maximumPowerAvailableP3":{"value":""},"maximumPowerAvailableP4":{"value":""},"maximumPowerAvailableP5":{"value":""},"maximumPowerAvailableP6":{"value":""},"distributor":{"value":"i-DE"},"supplier":{"value":"Iberdrola"}}
EOF
We get this error:
{"error":"NoResourcesAvailable","description":"You cannot use more than one geo location attribute when creating an entity [see Orion user manual]"}
And this in log traces:
time=Wednesday 21 Oct 09:43:30 2020.349Z | lvl=WARN | corr=e0854e42-1381-11eb-8ef2-0242ac110013 | trans=1602838577-171-00000001111 | from=172.17.0.1 | srv=desarrollo_mb3 | subsrv=/energia | comp=Orion | op=AlarmManager.cpp[405]:badInput | msg=Raising alarm BadInput 172.17.0.1: attempt to define a geo location attribute [location] when another one has been previously defined []
Having this entity at DB (note there is no location):
With this upgrade (adding a location field):
We get this error:
And this in log traces:
Note that
[]
has no sense here...