Giter Club home page Giter Club logo

sentilo's Introduction

sentilo's People

Contributors

mmasquefa avatar sentilo-io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentilo's Issues

Authentication Issue

Hi I've followed steps provided in your docs but getting auth error :attached snapshot.
sentilo_err1
sentilo_error

More reasonable display for Sensor's Bool type

At the moment the display of Sensor's Bool type on Catalog is Null and No Null. I think it's confusing and they should be shown as their values True and False. It'll make more sense

sentilomap

sensor

Cannot test REST API because of error 403 "SSL access is required"

Hi

The provided VM is setup with REST API running at http://:8081/

However when accessing for testing, it always returns error 403 "SSL access is required"

It seems the error due to:

  1. Code in SentiloRequestHandler.java, method handle currently calls request.checkSSLAccess(), in details:
public void checkSSLAAccess() throws SSLRequiredException {
    final String schemeAccess = extractHeader(HttpHeader.X_FORWARDED_PROTO);
    final boolean sslNeeded = RequesterContextHolder.getContext().getMetadata().isRestHttps();

    if (sslNeeded && !"https".equals(schemeAccess)) {
      throw new SSLRequiredException();
    }
  }
  1. While the server is started without any SSL concern, all of the tries (including setup an SSL reverse proxy) both failed

I hope this could be resolved soon for the testing VM, like either of these ways:

  1. Temporarily comment the SSL check code above, build and update the VM
  2. Update the code of starting the server to concern SSL and expose it as https instead of http

Thanks

I'm sorry I asked the same question again

Hello sentilo developers:

Five days ago I was asked a question here, and you tell me this type of question is better to ask on the Google Groups page, and I put question to Google Groups page, but until now no one answered me,
I'm still in confusion, can you help me? I will thank you very much.

Regards
yandong

sentilo-platform-server does not work in eclipse

i am trying to build the project within eclipse for 2 weeks. i could not succeed.
what i have done is so far:

  1. i have run the maven commands and imported into eclipse.
  2. i have created tomcat7 runtime environment in eclipse.
  3. i have added new server to that environment.
  4. i have deployed the web-catalog to the server.
  5. i could not start the sentilo-platform-server in tomcat.

i am using ubuntu 14.04.

  • my runtime environment points the /usr/share/tomcat7 directory.

  • i shut down tomcat7 before i open eclipse and start tomcat7 in eclipse.

  • i have tried to start SentiloServer.java but error occurred.

    By the way, there is 2 sentilo-server directories.
    snapshot01

I have tried to run it 2 of them separately in 4 ways.

  • Run each SentiloServer.java as java application gives this error:
    snapshot03
  • Run each SentiloServer.java on localhost which is tomcat7 gives this error:
    snapshot02

Lastly, i tested the out of the box installation which building project, placing in tomcat7 server and running bin files. it works perfectly and also i have written provider and application that works with it, no problem.

i have stuck in this point. i could not find any github issue, google group question or documents about this. could you help me please?

GTE internal alerts

The alerts with trigger condition greater than or equals doesn't work properly.

a bug in sentilo-catalog-web's sensor Latest data

Hello sentilo developers:
I was download the latest sentilo 1.3.0 in your website, and successfully installed on my computer.
the sensor's latest data always response empty when i view it in sentilo-catalog-web.
the problem is not because of time zone, and I found the reason in the log,
here is the sentilo-catalog-webto's data query request i found in log:
"Executing http call GET http://127.0.0.1:8081/data/ydprovider/ydsensor?limit=10"
the response is always empty because the sensor ID is wrong, the sensor ID should be "ydprovider.ydcomponent.ydsensor".
how can I solve this problem?

many thanks
yandong

Graphics with data between two dates instead of last 10.

Hi,

I'm trying to add a new functionality to the sentilo-catalog web.
The component_Detail.jsp displays the information for a sensor ID with a graphic that shows the last 10
observations.
I want to modify this one or create a new one (in that case we should be able to choose which graphic we want to watch) to show the data from the observation between two dates.
¿Is it able with the current REST API?

Thanks in advance.

Problem adding external alerts using API

When try to create an external alert using API,

{"alerts":[ {"id":"TITAN_1001", "name":"TITAN_1001", "description":"asdasd ad dsasdasd", "type":"EXTERNAL"}]}

server returns an error saying that request is wrong because entity field is mandatory.

This is not documented in the API spec. Additionally it should be an optional parameter because Sentilo knows the entity who is making the request.

Group POIS in viewer

When there are a lot of pois in a small area, they overlap each others. We should group them depending on the selected zoom and the concentration of sensors.

Docker deployment

Hi,

I try to deployment a SENTILO server and I was wondering if there are any docker images to make it quick and easy.

In case it doesn't exist, is there a plan to dockerize the architecture?

Thanks,
Diego

Improvements in universal viewer

Improvements and optimisation in universal viewer:
-Georeferenced search in mongoDB
-Private elements will be displayed in the map if the user is administrator
-Optimisation of data exchanged between the front-end and the server
-When returning from an element detail, the filters and map position must be maintained
-Redesign of POIs images for component types
-Tuning of POI clustering and enhancements in spiderfy
-Improvements in info-box: redesign of L&F and several new fields added

Add photography to components

Add a new field for component and component type to store an URL which will show the photo of the component.
If the specific component has the field filled, this photo will be the displayed one. If this field is empty, the default photo for the component type will be displayed. If both fields are empty, the photo won't be shown.
This photo will be displayed in the public element details.

Support for JDK 7 and JDK 8

Currently, Sentilo only works in a JDK 6 environment. It would be desirable that Sentilo supports JDK7 and JDK 8 environments, too.

Components with more than one coordinate

Currently, the components can only have a coordinate and be represented as POIs. The component location should permit to set several coordinates with the purpose of represent streets or areas.

Suddenly unable to publish sensors data

Sentilo version: 1.9.0

Our platform-server returns the following error:

image

Every single data our providers are trying to publish, they all return the following error:

Observation % has been rejected because sensor [XXXXXX] belonging to provider [yyyyy] doen't exist on Sentilo.

However, in mongodb everything is fine:

image

And the user mongodb is using -> "platform-user" is active:

image

Considerations to note:

  1. Everything was working until we restarted the contexts to change the catalog-web leaflet map layer.
  2. Once restarted, suddenly the providers that up to a moment ago were publishing without problems, suddenly started to be unable to publish data in our sentilo
  3. We have more or less 20 sensors operating but not publishing data at the moment, which means we are losing a bunch of data every minute.

New component type icons

Currently the component type icons are loaded from a hardcoded list.
Improve the icons load, retrieving them from a specific folder of the WAR.

New features in the Catalog Console

Add new information and capacities to the Catalog Console:

  • Component's list: show access type and component type
  • Sensor's list: show access type
  • Row number in lists: save user preferences for lists using a cookie
  • Add active subscriptions at application details
  • Add active subscriptions at provider details
  • Add component list at provider details
  • Generic excel generation for exporting of lists
  • Allow multiple updating of public/private attribute for components and sensors
  • Allow filtering using label fields
  • When returning from an element details to the list, maintain filtering and pagination

Junit alarm test fails when doing the build

When performing the build I've got the following error:

Results :

Failed tests: checkFrozenAlerts(org.sentilo.agent.alert.test.repository.FrozenRepositoryImplTest): expected:<alertTest[2]> but was:<alertTest[1]>

If anyone else is reporting this error, I presume that this should be caused for some synchronization problem, because, when I switch the order of the assertion's array the build works fine.

@test
public void checkFrozenAlerts() {
final Set members = new HashSet(Arrays.asList("providerTest:sensorTest:alertTest1", "providerTest:sensorTest:alertTest2"));

when(operations.rangeByScore(any(String.class), any(Double.class), any(Double.class))).thenReturn(members);

final List<InternalAlert> alerts = repository.checkFrozenAlerts();

verify(operations).rangeByScore(any(String.class), any(Double.class), any(Double.class));
Assert.assertTrue(alerts.size() == 2);

/*
Assert.assertEquals(alerts.get(0).getId(), alertId1);
Assert.assertEquals(alerts.get(0).getProviderId(), providerId);
Assert.assertEquals(alerts.get(0).getSensorId(), sensorId);
Assert.assertEquals(alerts.get(1).getId(), alertId2);
Assert.assertEquals(alerts.get(1).getProviderId(), providerId);
Assert.assertEquals(alerts.get(1).getSensorId(), sensorId);
*/
Assert.assertEquals(alerts.get(1).getId(), alertId1);
Assert.assertEquals(alerts.get(1).getProviderId(), providerId);
Assert.assertEquals(alerts.get(1).getSensorId(), sensorId);
Assert.assertEquals(alerts.get(0).getId(), alertId2);
Assert.assertEquals(alerts.get(0).getProviderId(), providerId);
Assert.assertEquals(alerts.get(0).getSensorId(), sensorId);
}

This work for me as a contingency for now, but it is needed take a look at it.

Specific map for routes

Currently the public map displays components as POIs. In case of mobile components, they will show their last received location as described in #3 .
It is necessary to get a new specific map for showing the mobile elements and its recent routes.

Disabling sensors in viewer application

Even if you disable a sensor through the administration console, you can continue seeing their data in the component detail.
Works perfectly when disabling components, they are not visibles in the map.

Sometimes I cannot change location type of a component

Sometimes I cannot change location type of a component. For example when I was creating new component I chose type “Static” but when component was saved, it was with type “Mobile”. Also sometimes I cannot change type of existing component.

New concept "Technical details" for sensors and components

It will be good to append a new set of properties for sensors and components with the purpose of storing technical information like: producer, MAC address, serial number, power type, connectivity...

This info can be stored in the additional data properties, but it will be better to standardize it, because it's information which is useful for all kinds of sensors and components.

Can't pass the auth when lauching sentilo-server

Hi,

I've got this error when i launch the sentilo-server. I followed all the step to install the platform, but maybe i've missed something. could you help me on this ?

2014-07-07 10:01:10,816 [platformScheduler-1] WARN  org.sentilo.platform.server.auth.impl.AuthorizationServiceImpl - Error al llamar al catalogo para recuperar la lista de autorizaciones
org.sentilo.platform.common.exception.CatalogAccessException: ; nested exception is org.sentilo.common.exception.RESTClientException:
        at org.sentilo.platform.service.impl.CatalogServiceImpl.translateException(CatalogServiceImpl.java:258) ~[sentilo-platform-service-1.4.0.jar:na]
        at org.sentilo.platform.service.impl.CatalogServiceImpl.getPermissions(CatalogServiceImpl.java:67) ~[sentilo-platform-service-1.4.0.jar:na]
        at org.sentilo.platform.server.auth.impl.AuthorizationServiceImpl.loadActivePermissions(AuthorizationServiceImpl.java:123) ~[sentilo-platform-server-1.4.0.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_55]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_55]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_55]
        at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) [spring-context-3.2.0.RELEASE.jar:3.2.0.RELEASE]
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) [spring-context-3.2.0.RELEASE.jar:3.2.0.RELEASE]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_55]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_55]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_55]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_55]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
Caused by: org.sentilo.common.exception.RESTClientException:
        at org.sentilo.common.rest.impl.RESTClientImpl.validateResponse(RESTClientImpl.java:183) ~[sentilo-common-1.4.0.jar:na]
        at org.sentilo.common.rest.impl.RESTClientImpl.executeHttpCall(RESTClientImpl.java:207) ~[sentilo-common-1.4.0.jar:na]
        at org.sentilo.common.rest.impl.RESTClientImpl.executeHttpCall(RESTClientImpl.java:188) ~[sentilo-common-1.4.0.jar:na]
        at org.sentilo.common.rest.impl.RESTClientImpl.get(RESTClientImpl.java:97) ~[sentilo-common-1.4.0.jar:na]
        at org.sentilo.common.rest.impl.RESTClientImpl.get(RESTClientImpl.java:85) ~[sentilo-common-1.4.0.jar:na]
        at org.sentilo.common.rest.impl.RESTClientImpl.get(RESTClientImpl.java:81) ~[sentilo-common-1.4.0.jar:na]
        at org.sentilo.platform.service.impl.CatalogServiceImpl.getPermissions(CatalogServiceImpl.java:64) ~[sentilo-platform-service-1.4.0.jar:na]
        ... 14 common frames omitted 

Components/sensors deletion problem

It seems there's a little bug in the components/sensors deletion procedure. In both cases, if I select an item then press "delete selected", nothing happens.

I think this is caused by the deleteSelected's alert message:

deleteSelected('components','This will remove all component's associated sensors and alerts. Are you sure to proceed?');

deleteSelected('sensors','This will remove all sensor's associated alerts. Are you sure to proceed?');

The quotation marks in "component's" and in "sensor's" cause a syntax error.

Best regards

API REST - Alarm service bug

As documentation said, for publish a new alarm related to an alert we should send something like this as body message:

{"message": "any alarm message"}

But if we try the following request:

 PUT http://<sentilo host>:<sentilo port>/alarm/alert1

 {"message": "Threshold limit exceeded : 32"}

, we will get an error such as the following:

{"code":500,"message":"Something went wrong. Please try again. If the problem persists, 
contact your support site and provide the following error code: SIE99-1426508914661"}

Alarms not shown

After installing the latest version from the git repository alarms are not shown on the web-catalog.

Commenting the line 84 in AlarmMessage.java and it's corresponding test (alarmMessage() in ClientDomainTest) alarms are shown. Obviously other things may have broken.

I've done that changes because Observation class has similar structure, regarding timestamps and time, but setTimestamp method doesn't have the commented line and it works (observations are shown).

The error log:

2018-02-22 09:37:48,605 UTC [sentilo-20180212 - catalog] [http-bio-8080-exec-9] ERROR org.sentilo.web.catalog.aop.aspect.CatalogExceptionTranslationInterceptor - SIE05-1519292268602 - Internal system error.java.lang.IllegalArgumentException: Error parsing date 20/02/2018 12:37:55 at org.sentilo.common.utils.DateUtils.stringToDate(DateUtils.java:95) ~[sentilo-common-1.7.0.jar:na] at org.sentilo.common.utils.DateUtils.toMillis(DateUtils.java:85) ~[sentilo-common-1.7.0.jar:na] at org.sentilo.platform.client.core.domain.AlarmMessage.setTimestamp(AlarmMessage.java:84) ~[sentilo-platform-client-java-1.7.0.jar:na] at org.sentilo.web.catalog.aop.aspect.TranslateTimestamp.translateAlarmsTimestamp(TranslateTimestamp.java:86) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:603) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.aspectj.AspectJAfterReturningAdvice.afterReturning(AspectJAfterReturningAdvice.java:58) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.sentilo.web.catalog.service.impl.SensorServiceImpl$$EnhancerByCGLIB$$70c924cb.getLastAlarmsMessages(<generated>) [spring-core-3.2.3.RELEASE.jar:na] at org.sentilo.web.catalog.controller.admin.SensorController.getLastAlarms(SensorController.java:208) [classes/:na] at org.sentilo.web.catalog.controller.admin.SensorController$$FastClassByCGLIB$$4af728d4.invoke(<generated>) [spring-core-3.2.3.RELEASE.jar:na] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.sentilo.web.catalog.controller.admin.SensorController$$EnhancerByCGLIB$$e494eccd.getLastAlarms(<generated>) [spring-core-3.2.3.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) [servlet-api-3.0.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) [servlet-api-3.0.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat7-websocket.jar:7.0.68] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-catalina-7.0.68.jar:7.0.68] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-catalina-7.0.68.jar:7.0.68] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.sentilo.web.catalog.security.access.TenantAccessControlFilter.doFilter(TenantAccessControlFilter.java:75) [classes/:na] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436) [tomcat-catalina-7.0.68.jar:7.0.68] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) [tomcat-coyote-7.0.68.jar:7.0.68] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) [tomcat-coyote-7.0.68.jar:7.0.68] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [tomcat-coyote-7.0.68.jar:7.0.68] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_161] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_161] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote-7.0.68.jar:7.0.68] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161] Caused by: java.text.ParseException: Unparseable date: "20/02/2018 12:37:55+0000" at java.text.DateFormat.parse(DateFormat.java:366) ~[na:1.8.0_161] at org.sentilo.common.utils.DateUtils.stringToDate(DateUtils.java:93) ~[sentilo-common-1.7.0.jar:na] ... 94 common frames omitted S:END

Web service login

Where can I find the url for web service login or another services?

Regards

Publish connection pool

The connection pool used in the publish/subscribe mechanism only supports two simultaneous connections with the same host. This can provoke timeouts when the server suffers an overload.

regarding sensor.js file

Hello
I am working on sentilo project with raspberry-pi client
So firstly to check interaction of client with sentilo so I am doing LED operation
I want that LED blink automaticaly and will show the output will be 1 and 0 automatically so I have to implement sensor.js file so plz help me to get the code of this prototype so the
sensor.js file below

module.exports = {

/**
 * Retrieve data from the sensor
 * 
 * @returns {String}
 */
readSensorValue : function() {

    // TODO: Implement this method

    // Return some random value between 0 and 255
    var sensorValue = Math.floor((Math.random() * 255));

    return sensorValue;
}

};

Thank You

some questions about alert and alarm

Hello sentilo developers:

I'm learning to use sentilo and its REST API, when I test alert and alarm, I met some questions that I don't understand, can you help me?

  • The first question is:

The purpose of the internal alert is obvious, but what is the purpose of the external alert?


  • The second question is:

The sentilo architecture page say "when the value received from a sensor doesn't met any of the conditions defined, the alert agent publishes an event (alarm) notifying it". is it means alarms are automatically generated by sentilo agent?

I create two alerts for my sensor "ydsensor", "ydsensor_max_alert" and "ydsensor_min_alert" trigger, conditions are respectively "Greater than 50" and "Less than 30".

Then I publish a observations for this sensor, javascript code is as follows:

var data = {"observations":[{"value":888}]};
$.ajax({
type: "PUT",
data: JSON.stringify(data),
url: "http://localhost:8081/data/ydprovider/ydsensor",
headers: {"IDENTITY_KEY":"c956c302086a042dd0426b4e62652273e05a6ce74d0b77f8b5602e0811025066"}
});

And publish successfully.

The value of this obdervation is greater than 50, it should automatically trigger the one of alerts "ydsensor_max_alert", and the alert agent should publishes an event (alarm) notifying it.

The sentilo-agent-alert-server is work normally, but when I retrieve alarms using REST API, I did not find a new alarm associated with "ydsensor_max_alert", javascript code is as follows:

$.ajax({
type: "GET",
url: "http://localhost:8081/alarm/ydsensor_max_alert?limit=10",
headers: {"IDENTITY_KEY":"02dd3e77c5600f16c03f37ed58bb0972ab8360cdd741e77acd2798d9928b3859"}
});

I can only find the alarms I manually published by using REST API "Publish Alarm".

Where I am wrong?


  • The third question is:

What does it mean that "only the administrator can register internal alerts." in api doc "Create alerts".

I can create two type of alerts through the sentilo-catalog-web, but when I create a internal alert through the REST API, it returns "403 You are not authorized to insert/update internal alerts", and it returns "500 Something went wrong.....error code: SIE00-1413444660980" when I create a external alert.

code is as follows:

//add a internal alert
var data = {"alerts":[
{"id":"ydsensor_equal_alert",
"name":"ydsensor_equal_alert",
"description":"ydsensor equal alert",
"type":"INTERNAL",
"trigger":"EQ",
"expression":"25",
"component":"ydcomponent",
"sensor":"ydsensor"
}
]};
$.ajax({
type: "POST",
data: JSON.stringify(data),
url: "http://localhost:8081/catalog/alert/ydprovider",
headers: {"IDENTITY_KEY":"0ea631ba9a4c8a21a1fdb10afb99b97070da4036c3cb47effecca8c49d29ba02"}
});

Whether set header IDENTITY_KEY of application(application type is "administration" and has ydprovider's "administration" permission) or IDENTITY_KEY of providers, it all will returns 403 response.

//add a external alert
var data = {"alerts":[
{"id":"REC_ALERT_001",
"name":"REC_ALERT_001",
"description":"Custom alert to monitorize that maximum daily values for sensor REC_001 ranged from 60 and 80",
"type":"EXTERNAL"
}
]};
$.ajax({
type: "POST",
data: JSON.stringify(data),
url: "http://localhost:8081/catalog/alert/ydprovider",
headers: {"IDENTITY_KEY":"0ea631ba9a4c8a21a1fdb10afb99b97070da4036c3cb47effecca8c49d29ba02"}
});

Whether set header IDENTITY_KEY of application(application type is "administration" and has ydprovider's "administration" permission) or IDENTITY_KEY of providers, it all will returns 500 response.

Can you tell me where I am wrong?

Regards and many thanks.
yandong

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.