Code Monkey home page Code Monkey logo

databus's People

Contributors

easility avatar hopcroft avatar jcollinsnrel avatar nrelbuilder avatar thisisbrians 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

Watchers

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

databus's Issues

Dashboard View does not show current table list

New Tables and data were created by modbus client. The tables are listed correctly under the Database detail screen (My Databus -> Databases), but the Dashboard view still shows a series of [presumably fictitious] Tables and charts.

Requesting high priority because it makes the system difficult to demonstrate.
[Priority: 8 high]

Feature request: Table properties

When you click on the name of a table, you see a list of the columns in the table and a column indicating whether those columns are indexed. It would be helpful to also see the type for each column (integer, float, string) so that you know what type of data to expect when you download it. Thanks,

[Priority: low]

postdataV1 api returns http error 400 on a valid data file

I have an Android app that sends data files every minute to databus. Every once in a while I get back an http error 400 (bad request). However when I try to send this file again either through the same code or via curl, it uploads fine.

When I looked at the databus log file for the time period of the error I see

WARN: There was a problem parsing the JSON request.
org.codehaus.jackson.JsonParseException: Unexpected end-of-input: expected close marker for ARRAY (from [Source: java.io.StringReader@898e150; line: 1, column: 1])
at [Source: java.io.StringReader@898e150; line: 1, column: 24607]
at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) ~[jackson-core-asl-1.9.8.jar:1.9.8]

But the file is valid json (I ran it through jsonlint and it also sends correctly the 2nd time). Given that databus is reporting the error on the first character, and this is a 26K file, my guess is that the problem is really some kind of temporary network connection issue and it is not actually getting the complete file, or not getting any file in the http POST, but the databus code is not catching that at a higher level and is sending bad or empty data to the parser, which generates the 400 error.

The problem is that then I can't detect the difference between a legitimately bad file and a temporary connection error, in which case I want to retry sending the file.

Bug: User List delete/update

When using the internal user list for authentication, log in as an administrative user and create a user. Then delete the user, and create a new user with the same name (for a password reset for example). Now the user list shows two entries for that username. Repeat the delete and create, and now there are three entries, etc. The user can log in with the most recent password, but if the user was listed as an administrator, they will not have administrator privileges.

web interface for data upload

The pages for csv upload through the web interface do not have any navigation buttons. Request: add the standard header & footer, or some other form of navigation elements, to the pages related to csv uploatd. In particular, the "success" page has no navigation elements at all.
Priority medium because the ratio of value for demo ("polish") to effort is high.
[Priority 5 medium]

Bug: User add screen label

In the web interface, when you click a button for Add User, Add Robot, or Add Group, the resulting screen for entering the information for the User/Robot/Group is always labeled "Add User".

Request: Non-Active Directory User Authentication

I'd like to run DataBus on a publicly-accessible server and I can't use our organizational Active Directory server for authentication in this case (IT dept. says no). The number of people who will need access to the server is very small and easily managed. So, feature request: another way to manage user authentication and log in to DataBus. Maybe using the server's user list with PAM or similar? Or, if I understand correctly, DB is keeping a small database of users who have logged in; can there be an interface to modify this user database?

view software revision number in web interface

The web interface shows "version 1.0 beta" in a relatively large and visible location. That value hasn't been changing, and its not (IMHO) a good use of the space. Request: display a more granular version number (build number?) in a sub-menu or About link, so that the admin can verify that the latest updates were applied correctly.
[priority: 2 (low)]

Clean up conf file

Low-priority request to re-arrange the webapp configuration file to put the "user-configurable" items near the top (date format, server address, AD domain) with verbose comments.
[Priority: 1 low]

modbus client ssh connection drops

modbus client runs but is unable to post data. No new tables are created. Error appears to be related to ssh connection to databus server? Logfile:

INFO: Starting ModBusClient...
2013-07-01 18:10:54,510 [-] [main] g.n.m.ModBusClient main
INFO: Starting ModBusClient2222...
2013-07-01 18:10:54,511 [-] [main] g.n.m.ModBusClient main
INFO: username=robot-modbus1
key=3C8OTHB880.CAPACITANCE2.18VPS2E7B2KLO
port=9000
2013-07-01 18:10:54,672 [-] [main] g.n.c.DatabusSender <init>
INFO: username=robot-modbus1 key=3C8OTHB880.CAPACITANCE2.18VPS2E7B2KLO deviceTable=null str=null port=9000
2013-07-01 18:10:54,889 [-] [main] g.n.c.DatabusSender <init>
INFO: hostUrl=https://localhost:9000
2013-07-01 18:10:54,897 [-] [main] g.n.m.ModBusClient loadMeters
INFO: Processing line = pa_b2_elec_2DL1_1209_freq_pv,PM820,Panel 1209 (1209 [208V]) Frequency,2L,Electricity,,16.94.16.42/502,Slave 4
2013-07-01 18:10:54,898 [-] [main] g.n.m.ModBusClient registerWithDatabus
INFO: Registering Device serial#=pa_b2_elec_2DL1_1209_freq_pv if MeterMeta has true
2013-07-01 18:10:54,899 [-] [main] g.n.m.ModBusClient registerWithDatabus
INFO: Registering Device serial#=pa_b2_elec_2DL1_1209_freq_pv
2013-07-01 18:10:54,899 [-] [main] g.n.m.ModBusClient registerWithDatabus
INFO: Registering pa_b2_elec_2DL1_1209_freq_pv3phaseRealPower
2013-07-01 18:10:54,900 [-] [main] g.n.c.DatabusSender postNewStream
INFO: 3phaseRealPowerposting new stream=pa_b2_elec_2DL1_1209_freq_pv3phaseRealPower
2013-07-01 18:10:54,963 [-] [main] g.n.c.DatabusSender registerNewStream
INFO: registering a new table=pa_b2_elec_2DL1_1209_freq_pv3phaseRealPower in database=Database1
2013-07-01 18:10:55,098 [-] [main] g.n.c.DatabusSender post
INFO: failed to post, continuing on to next request
2013-07-01 18:10:55,104 [-] [main] g.n.m.ModBusClient loadMeters
WARN: Exception while reading csv file: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at gov.nrel.consumer.DatabusSender.post(DatabusSender.java:248) ~[modbus.jar:na]
    at gov.nrel.consumer.DatabusSender.registerNewStream(DatabusSender.java:181) ~[modbus.jar:na]
    at gov.nrel.consumer.DatabusSender.postNewStream(DatabusSender.java:158) ~[modbus.jar:na]
    at gov.nrel.modbusclient.ModBusClient.registerWithDatabus(ModBusClient.java:489) [modbus.jar:na]
    at gov.nrel.modbusclient.ModBusClient.loadMeters(ModBusClient.java:279) [modbus.jar:na]
    at gov.nrel.modbusclient.ModBusClient.main(ModBusClient.java:167) [modbus.jar:na]
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902) ~[na:1.6.0_27]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208) ~[na:1.6.0_27]
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:674) ~[na:1.6.0_27]
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:119) ~[na:1.6.0_27]
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:147) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:154) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:106) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.entity.StringEntity.writeTo(StringEntity.java:177) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:98) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108) ~[httpclient-4.2.1.jar:4.2.1]
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:122) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:271) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:197) ~[httpclient-4.2.1.jar:4.2.1]
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:257) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) ~[httpcore-4.2.1.jar:4.2.1]
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:712) ~[httpclient-4.2.1.jar:4.2.1]
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:517) ~[httpclient-4.2.1.jar:4.2.1]
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) ~[httpclient-4.2.1.jar:4.2.1]
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) ~[httpclient-4.2.1.jar:4.2.1]
    at gov.nrel.consumer.DatabusSender.post(DatabusSender.java:230) ~[modbus.jar:na]
    ... 5 common frames omitted
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:482) ~[na:1.6.0_27]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883) ~[na:1.6.0_27]
    ... 24 common frames omitted
2013-07-01 18:10:55,106 [-] [main] g.n.m.ModBusClient main
INFO: done

View Chart does not work

In the web interface, the "View Chart" link for a table, linked from the Database Properties page (My Databus -> Databases -> [link to database]), does not work. See attached screenshot.

[Priority 9 high]

view_chart_dnw

Chart Help

Request: Add a section for "Charts" to the online Help. Not the API interface, but using the built-in chart features. Thanks.

Clean up references to "NREL"

Request: clean up references to NREL in documentation and web interface. For example, the footer contains a "Need Help?" link to NREL webmaster. The Help pages refer to "the Databus Server" at databus.nrel.gov.
I expect some references to remain, for example, something in the footer like: "Databus was developed at the National Renewable Energy Laboratory" and a link to the NREL Databus.
[Priority: 3 low]

Saving Table description causes a crash

In the web interface, adding a description to a Table and clicking the "Save" button causes a crash. Output from play is below.

(I'm guessing this will be addressed in the upcoming "My Databus" re-write)
[Priority: 7 medium]

@6em5fo27c
Internal Server Error (500) for request POST /old/groups/models.SecureSchema_%24%24_javassist_21@328908cd/savetable

Oops: RuntimeException
An unexpected error occured caused by exception RuntimeException: java.lang.InstantiationException

play.exceptions.UnexpectedException: Unexpected Error
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:294) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
at Invocation.HTTP Request(Play!) ~[na:na]
Caused by: java.lang.RuntimeException: java.lang.InstantiationException
at com.alvazan.play.NoSqlModel.create(NoSqlModel.java:41) ~[playorm.jar:na]
at com.alvazan.play.NoSqlPlugin.bind(NoSqlPlugin.java:46) ~[playorm.jar:na]
at play.plugins.PluginCollection.bind(PluginCollection.java:587) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
at play.data.binding.Binder.bind(Binder.java:112) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
at play.mvc.ActionInvoker.getActionMethodArgs(ActionInvoker.java:682) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:514) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:509) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:187) ~[play-1.2.x-1.1.0-2002-6-gbed17df.jar:na]
... 1 common frames omitted
Caused by: java.lang.InstantiationException: null
at com.alvazan.play.NoSqlModel.create(NoSqlModel.java:38) ~[playorm.jar:na]
... 8 common frames omitted

Remove demo data from Production Mode

When a new DataBus installation is created, it is populated with lots of "demo" data, like agg1Db, groupofusersandgroups, etc. This is useful for Demo mode, but not for Production. Note this demo data is created in Production mode for installations that are not using Active Directory.
[Priority: high]

Request: more result codes

When creating tables, the server returns code 400 both in the case of an error (such as malformed json data), and in the case of "table already exists". This makes it difficult for a client to determine if they need to resend the table request or not.

Timestamp Support

Add support for uploading data with timestamps in ASCII string ISO 8601 UTC basic format, e.g.:

20132406T180830Z

(Ref: http://en.wikipedia.org/wiki/ISO_8601)

Maybe throw in a few other less-common formats while you're at it (extended 8601, UTC offset, UK common (aka "Excel North America", etc).

Edit: changed to medium priority after further discussion
[Priority: 4 medium]

Clicking on Table in "Database Properties" causes crash

Select My Databus -> Databases -> [select database]
Scroll down to list of Tables, and click on the name of any table in the list produces an error:

 ERROR: 

@6epel9m80
Internal Server Error (500) for request GET /tables/pa_b2_elec_2DL1_1209_freq_pvFrequency

No route found (In /app/views/gui/MyStuff/tableEdit.html around line 5)
No route able to invoke action MyStuff.postTable with arguments {group=models.SecureSchema_$$_javassist_21@5c46a4fa} was found.

play.exceptions.NoRouteFoundException: No route found
    at play.templates.BaseTemplate.throwException(BaseTemplate.java:83) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:258) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.templates.Template.render(Template.java:26) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.templates.GroovyTemplate.render(GroovyTemplate.java:203) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.Controller.renderTemplate(Controller.java:670) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.Controller.renderTemplate(Controller.java:650) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.Controller.render(Controller.java:705) ~[play-1.2.x-1.1.0-2208.jar:na]
    at controllers.gui.MyStuff.tableEdit(MyStuff.java:84) ~[webapp:na]
    at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:587) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:538) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:514) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:509) ~[play-1.2.x-1.1.0-2208.jar:na]
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:187) ~[play-1.2.x-1.1.0-2208.jar:na]
    at Invocation.HTTP Request(Play!) ~[na:na]

"Oops, an error occured" server error 500 when registering table data

I am trying to register my table columns via java code, but I always get an internal server error 500 result with error message "Oops, an error occured". I am logging the json string I am sending to the registerV1 api and if I copy that string from the log and paste it into a file and send using curl, it works fine. If I then try again with my code, I get the error that the table exists, so I know that the register module is getting to the point of parsing my json. I am sending the json as a stream entity. This code works fine when I send data using the postdataV1 api.

Code looks like so:
logger.info("post data to: " + registerUrl);
HttpPost httpPost = new HttpPost(registerUrl);
httpPost.setHeader("Content-Type", "application/json");
DefaultHttpClient httpClient = new DefaultHttpClient();
httpClient.getCredentialsProvider().setCredentials( new AuthScope(mServer, 9000),
new UsernamePasswordCredentials("robot-robotTest2", "45580RCV5S.ALPHA1.1PT80JZFNKHUG"));

String androidID = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);
String tableJson = "{"datasetType":"RELATIONAL_TABLE", "modelName":"ANDROID4_" + androidID + "", "schema":"sensorTest", " + tableCols + "}";
try {
httpPost.setEntity(new StringEntity(tableJson));
} catch (UnsupportedEncodingException e1) {
logger.severe("encoding error in json string");
e1.printStackTrace();
return;
}

try {
// do the post
logger.info("sending table data: " + tableJson);
HttpResponse response = httpClient.execute(httpPost);
StatusLine status = response.getStatusLine();
logger.info("http post response: " + status.getStatusCode() + " - " + status.getReasonPhrase());

log looks like this:
10-17 11:11:38.638: I/TableProvisioner(3089): post data to: http://15.185.92.96:9000/api/registerV1
10-17 11:11:38.658: I/TableProvisioner(3089): sending table data: {"datasetType":"RELATIONAL_TABLE", "modelName":"ANDROID4_910e2872a4e96f5e", "schema":"sensorTest", "columns":[{"name":"time","dataType":"BigInteger","isIndex":true,"isPrimaryKey":true},{"name":"ROTX","dataType":"BigDecimal","isIndex":false,"isPrimaryKey":false},{"name":"ROTY","dataType":"BigDecimal","isIndex":false,"isPrimaryKey":false},{"name":"ROTZ","dataType":"BigDecimal","isIndex":false,"isPrimaryKey":false}]}
10-17 11:11:38.848: I/TableProvisioner(3089): http post response: 500 - Internal Server Error
10-17 11:11:38.848: E/TableProvisioner(3089): http post error: 500 -
10-17 11:11:38.848: E/TableProvisioner(3089):
10-17 11:11:38.848: E/TableProvisioner(3089):
10-17 11:11:38.848: E/TableProvisioner(3089): <title>Application error</title>
10-17 11:11:38.848: E/TableProvisioner(3089):
10-17 11:11:38.848: E/TableProvisioner(3089):
10-17 11:11:38.848: E/TableProvisioner(3089):
10-17 11:11:38.848: E/TableProvisioner(3089):

Oops, an error occured


10-17 11:11:38.848: E/TableProvisioner(3089):


10-17 11:11:38.848: E/TableProvisioner(3089): This exception has been logged with id 6fo4f81f7.
10-17 11:11:38.848: E/TableProvisioner(3089):


10-17 11:11:38.848: E/TableProvisioner(3089):
10-17 11:11:38.848: E/TableProvisioner(3089):

Copy/paste the table data from the log into a file and sending vial curl looks like this:
kbrems@ubuntu:~/sensorTest$ curl -X POST -w "\nRESULT CODE:%{http_code}\n" --header "Content-Type:application/json" --user robot-robotTest2:45580RCV5S.ALPHA1.1PT80JZFNKHUG -d @dbTable4.txt http://15.185.92.96:9000/api/registerV1
{"modelName":"ANDROID4_910e2872a4e96f5e","groups":[]}
RESULT CODE:200

kbrems@ubuntu:~/sensorTest$ cat dbTable4.txt
{"datasetType":"RELATIONAL_TABLE", "modelName":"ANDROID4_910e2872a4e96f5e", "schema":"sensorTest", "columns":[{"name":"time","dataType":"BigInteger","isIndex":true,"isPrimaryKey":true},{"name":"ROTX","dataType":"BigDecimal","isIndex":false,"isPrimaryKey":false},{"name":"ROTY","dataType":"BigDecimal","isIndex":false,"isPrimaryKey":false},{"name":"ROTZ","dataType":"BigDecimal","isIndex":false,"isPrimaryKey":false}]}

Demo "mode" vs "script" [comment/discussion]

It appears that the "initial turn-on" for the Databus code that external users can download has a sort of "demo mode" built-in, with some fake users, and fake data. Is this correct?

This seems like it is asking for trouble- you have to have a build system which supports production and test builds, or modes or something, and the code contains a lot of stuff that is not related to the core functionality.

Instead, is it possible instead to a "demo script" which would provision a Database, make a few Tables, and load them with fake data? A new user could run this script after installing Databus for the first time. The script could even have "pause and press any key" features, where the user is invited to look at the web interface and see the new database listed, now click on Tables and see the tables, now click on Charts and see the data, etc.

This would make for cleaner code, illustrate the API capabilities, and serve as a programming example.

Cors or JSONP support

Hi,

Thanks for creating a great product. We're writing a AngularJS frontend to interact with Databus, but it seems like the API does not support CORS or JSONP to allow HTML5 cross site applications to work.

We really only want to do GET requests to get time series out for plotting and displaying.

It seems like something you can add relatively easily. I found these links:
http://empirewindrush.com/tech/2013/12/17/cors-and-play/
http://stackoverflow.com/questions/14430119/play-2-0-1-and-setting-access-control-allow-origin

Thanks,
Johann

modbus client doesn't start

Can't start the modbus client. Log file:

hopcroft@capacitance2:~/modbus/logs$ tail -f logback.log 
2013-06-28 15:39:17,899 [-] [pool-3-thread-1] g.n.m.ModBusClient run
WARN: Exception
java.lang.ArrayIndexOutOfBoundsException: 1
    at gov.nrel.modbusclient.ModBusClient.poll(ModBusClient.java:326) ~[modbus.jar:na]
    at gov.nrel.modbusclient.ModBusClient$1.run(ModBusClient.java:188) ~[modbus.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [na:1.6.0_27]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.6.0_27]
    at java.lang.Thread.run(Thread.java:679) [na:1.6.0_27]
2013-06-28 15:39:18,894 [-] [main] g.n.m.ModBusClient main
INFO: exiting

My meters.csv file:

Serial Number,Model,Description,Building,Phenomena,Zone,IP,Slave
pa.b2.elec:2DL1-1209.freq.pv,PM820,Panel 1209 (1209 [208V]) Frequency,2L,Electricity,,16.94.16.42,Slave 4
pa.b2.elec:2DL1-1209.real-pwr-tot.pv,PM820,Panel 1209 (1209 [208V]) Real Power Phase Total,2L,Electricity,,16.94.16.42,Slave 4

The first entry in my meterModel.json file (just for an example):

"PM820": {
        "3phaseRealPower":{
            "type":"direct",
            "registers":[
            {
                "register":1143,
                "type":"TWO_BYTE_INT_SIGNED",
                "modifier":10.0
            }]
        },

The ModBusClient.poperties file:

databus-url=https://localhost:9000
# The database is the database you plan to have the modbus tables in
database=Database1
# The user with write access to the database specified above this line
user=robot-modbus1
# The password for the user for authentication
#key=941RCGA.B2.1JGZZ11OZOCEZ
key=3C8OH9NOK0.CAPACITANCE2.18K10W4Y5XQJI

thread-pool-size=10
#the poll time of each device
estimated-poll-time=60000
# set to 0 for infinite loop
number-of-iterations=0

#Unused properties, leave commented out unless you know what you are doing
#deviceTable=modbusstreamMeta
#streamTable=modbusdeviceMeta
DATABUS_HOST_URL=http://localhost:9000/
modName=modRaw

Application Secret Key [low priority]

The application secret key is the same for all installations. It would be better if a new key was generated during the build process, so that different customers will not have the same key. A simple (not super high crypto validated) random generator would be fine here.

Ability to delete Databases and Tables

Request for the ability to delete Databases and Tables. Especially necessary while Table names must be unique in the system. Prefer web interface because it is an administrative thing, not likely to be automated, but API interface would be fine in the short term.

[Priority: 8 high]

Log level does not seem to work

Setting the log level in the configuration file with

application.log

does not seem to affect the output from Play. I was assuming I could use the log4j levels TRACE, DEBUG, INFO, WARN, ERROR and FATAL ?

Request: compact multi-row upload

When uploading multiple entries, you have to specify the table for every entry. For example:

{"_dataset":[
            {"_tableName":"timeSeriesExample","time":1360006292000,"value":162.6911},
            {"_tableName":"timeSeriesExample","time":1360006293000,"value":163.6911}
    ]
}

The name of the table is redundant. The message would be more efficient if the table could be specified once per upload message. Something like:

{"_tableName":"timeSeriesExample","_dataset":[
            {"time":1360006292000,"value":162.6911},
            {"time":1360006293000,"value":163.6911}
    ]
}

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.