Giter Club home page Giter Club logo

evnotifybackend's Introduction

EVNotify

EVNotify allows you to control your electric vehicle and let you notify when the specified preset state of charge has been achieved.

🚧 🚧 🚧

This repository contains the "v2" code of the app. EVNotify is under active development for the next generation "v3". The corresponding repository of v3 is currently still private. I just want to let you know, that in the upcming weeks the first official tests will start with you. Thanks for all of your patience. The project is alive, and v3 will be ready to test soon (and will be open source later).

🚧 🚧 🚧

Note:

This repository contains the frontend/client source code. For the backend please visit: https://github.com/EVNotify/EVNotifyBackend. EVNotify is still in an early stage of development. Errors or unexpected behavior may occur. Furthermore, not all features may be implemented yet. Stay tuned and please report any issues or suggestions.

The idea behind EVNotify

Originally this application was developed to have a possibility to remotely see the charging state for the Hyundai IONIQ, which isn't possible in Europe due to missing BlueLink connection. Then I decided to enhance it so you'll get notified when the desired state of charge has been achieved. Also I want to support more cars in the future.

Imagine the following situation: You are charging your electric vehicle on a fast charger. To proceed with your road trip, you need to charge until 80%. You are drinking a coffee in the meantime. But you want to drive away as fast as possible because every minute that passes costs time and money. Normally you have to check for the charging state every few minutes, leave everything, physically needs to go to the car, which is annoying. With EVNotify you can just check the state of charge remotely - or simply gets notified when the desired state of charge is set so you can go. Without having to worry every about your state of charge every few minutes. Simply enjoy!

Features and benefits of EVNotify

  • free to use - available on the Google Play Store
  • state of charge monitoring
  • multiple notification possibilities if desired state of charge had been achieved (e.g. Mail, Push, Telegram)
  • easy to use
  • use your existing hardware
  • connect multiple devices together
  • continuous development
  • open source
  • API documentation for developers
  • integrated charging stations finder
  • more features and supported cars will be added soon

Prerequisites

To use EVNotify you need to download the Android Application linked above. The app must be installed on an Android device with Android version greater than Android 4.1 (Android 5 or greater recommended). The android device must have a Bluetooth connection and optionally an internet connection. The app also runs on Android TV Sticks. EVNotify communicates over the OBD2 interface of the car, so a Bluetooth capable OBD2-dongle is required. For supported OBD2 dongle please have a look at the wiki.

Contributing

Feel free to help and to contribute to this repository. Even if you can't code, feel free to create issues if you have discovered a bug or a strange behavior. If you want to commit code, please create a pull request for it in a separate branch (dev or a feature-branch, not master!). If you are a developer and want to contribute, have a look at the CONTRIBUTING.md file.

How it works

EVNotify interacts with the electric vehicle over a Bluetooth-capable OBD2-Dongle. The device interacting with the Dongle, must be an Android device and has to support Bluetooth. For full functionality, an internet connection is required. The readout and monitoring of the state of charge works locally, the notifications are sent over the internet.

The App of EVNotify as well as the Backend has an integrated mechanism to track errors with a tool called Rollbar. This allows faster tracking of uncaught errors.

Rollbar Error Tracking

Need help?

Have a look at the Wiki here for EVNotify.

Additional notes

The use of the software is at your own risk. I am not liable for damage caused by improper use or cheap, fake OBD2 dongle.

evnotifybackend's People

Contributors

125m125 avatar asmaps avatar gplay97 avatar greenkeeper[bot] avatar imarkus avatar juupke avatar lkreimann avatar waffle-iron avatar

Stargazers

 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

evnotifybackend's Issues

createLogs cron wrong when sync active

When there are currently data receiving (because user is currently charging / driving) and the cron is running, it will be seperated in new logs. The cron must check the very last timestamp - and choose the latest with activity of two hours ago or so - and only insert, if the next activity is not coming within the next few minutes / an hour.

An in-range update of nodemailer is breaking the build 🚨

Version 4.6.8 of nodemailer was just published.

Branch Build failing 🚨
Dependency nodemailer
Current Version 4.6.7
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

nodemailer is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 8 commits.

  • bc2b520 v4.6.8
  • 624cbc4 Merge pull request #921 from Limbozz/fix/dns-resolve
  • d4ca847 Use first IP address from DNS resolution when using a proxy.
  • 058afbc bumped dev deps
  • 170025f Merge pull request #897 from gabegorelick/ses-return-raw-email
  • 3aa0896 Return raw email from SES transport
  • 33b62e2 Merge pull request #896 from gabegorelick/stream-jsdoc
  • 81198b1 Fix some incorrect JSDoc

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

TypeError: Cannot read property 'NORMAL_SPEED' of undefined

View details in Rollbar: https://rollbar.com/gplay97/EVNotifyBackend/items/180/


TypeError: Cannot read property 'NORMAL_SPEED' of undefined
  File "/home/gplay97/EVNotifyBackend/modules/helper/index.js", line 89, in Object.calculateTime
            estimatedNormalTime: ((!port || port === 'normal_charge_port') ? parseFloat((amountToCharge / (realChargingSpeed || speeds[car].NORMAL_SPEED)).toFixed(2)) : null),
  File "/home/gplay97/EVNotifyBackend/modules/qr/index.js", line 242, in qrStatus
                        codeObj.estimatedTime = helper.calculateTime(
  File "/home/gplay97/EVNotifyBackend/modules/qr/index.js", line 95, in db.query
            callback(err, ((!err && dbRes && dbRes[0]) ? dbRes[0] : null));
  File "/home/gplay97/EVNotifyBackend/modules/db/index.js", line 30, in Query.db.query
                    if (typeof callback === 'function') callback(err, queryRes);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 502, in Query.<anonymous>
          fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 468, in Query._callback
          ret = fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Sequence.js", line 83, in Query.Sequence.end
            this._callback.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 139, in Query._handleFinalResultPacket
      this.end(this._loadError, results, fields);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 123, in Query.EofPacket
      this._handleFinalResultPacket(packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 278, in Protocol._parsePacket
      sequence[packetName](packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 76, in Parser.write
          this._onPacket(this._packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 38, in Protocol.write
      this._parser.write(buffer);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 91, in Socket.<anonymous>
          connection._protocol.write(data);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 502, in Socket.<anonymous>
          fn.apply(this, arguments);
  File "events.js", line 116, in emitOne
  File "events.js", line 211, in Socket.emit
  File "_stream_readable.js", line 263, in addChunk
  File "_stream_readable.js", line 250, in readableAddChunk
  File "_stream_readable.js", line 208, in Socket.Readable.push
  File "net.js", line 601, in TCP.onread

RangeError: Invalid status code: undefined

View details in Rollbar: https://rollbar.com/gplay97/EVNotifyBackend/items/27/


RangeError: Invalid status code: undefined
  File "_http_server.js", line 190, in ServerResponse.writeHead
  File "_http_server.js", line 181, in ServerResponse._implicitHeader
  File "_http_outgoing.js", line 635, in write_
  File "_http_outgoing.js", line 754, in ServerResponse.end
  File "/EVNotifyBackend/node_modules/express/lib/response.js", line 211, in ServerResponse.send
        this.end(chunk, encoding);
  File "/EVNotifyBackend/server.js", line 62, in onError
            res.status(err.status).send('Request could not be processed');
  File "/EVNotifyBackend/node_modules/express/lib/router/layer.js", line 71, in Layer.handle_error
        fn(error, req, res, next);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 315, in trim_prefix
          layer.handle_error(layerError, req, res, next);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 284, in <unknown>
          trim_prefix(layer, layerError, layerPath, path);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 335, in Function.process_params
        return done();
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 275, in next
        self.process_params(layer, paramcalled, req, res, function (err) {
  File "/EVNotifyBackend/node_modules/express/lib/router/layer.js", line 67, in Layer.handle_error
        return next(error);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 315, in trim_prefix
          layer.handle_error(layerError, req, res, next);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 284, in <unknown>
          trim_prefix(layer, layerError, layerPath, path);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 335, in Function.process_params
        return done();
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 275, in next
        self.process_params(layer, paramcalled, req, res, function (err) {
  File "/EVNotifyBackend/node_modules/express/lib/router/route.js", line 127, in next
          return done(err);
  File "/EVNotifyBackend/node_modules/express/lib/router/layer.js", line 97, in Layer.handle [as handle_request]
        next(err);
  File "/EVNotifyBackend/node_modules/express/lib/router/route.js", line 137, in next
          layer.handle_request(req, res, next);
  File "/EVNotifyBackend/node_modules/express/lib/router/route.js", line 112, in Route.dispatch
      next();
  File "/EVNotifyBackend/node_modules/express/lib/router/layer.js", line 95, in Layer.handle [as handle_request]
        fn(req, res, next);
  File "/EVNotifyBackend/node_modules/express/lib/router/index.js", line 281, in <unknown>
            return layer.handle_request(req, res, next);

adjust report module for new statistics handling

Lately, v2 has restructured the sync handling (a1e63c7) to use only one statistic entry for a sync that contains all given properties instead of creating one entry for each property.

This requires now a restructure / rewrite of report module that creates the excel report (first implementation at least).

Previously there was something like that:

[{
"akey": "123456",
"type": "soc_bms",
"value": 12,
"timestamp": 123456789
},{
"akey": "123456",
"type": "soc_display",
"value": 12.5,
"timestamp": 123456789
},
{
"akey": "123456",
"type": "latitude",
"value": 50.12345,
"timestamp": 133333333
}]

In order to build the charging history for example, you needed to iterate over all entries, filter desired types out where type soc_display || soc_bms and timestamp === currentTimestamp to find current row.

Now it has been restructured, new structure looks like this:

[{
"akey": "123456",
"timestamp": 123456789,
"soc_display: 12.5,
"soc_bms": 12,
"latitude": null,
"longitude":null
},{
"akey": "123456",
"timestamp": 133333333,
"soc_display: null,
"soc_bms": null,
"latitude": 50.12345,
"longitude": 8.12345
}]

So to retrieve corresponding rows, you only need to determine if soc_display or soc_bms is not null (for charging history) and then iterate. Same is for location history (latitude / longitude,..)

Telegram Bot placeholder support

Certain actions requires or will require dynamic parsing and extending values. So instead of combining them after the translation, dynamically parse it within translation string.

E.g. : "Your state of charge is at {{SOC}}%."

I'd like to pull day's logs once a day how can I do that?

VW data API's are inadequate and I'd like to pull data for my own analysis and Grafana.

What EVNotify Backend endpoint could be used for something like this?

Is there an endpoint I could use to remove already fetched logs from EVNotify?

Database restructuring

Restructure database - split account and settings -> own table settings with reference to accounts. Furthermore add new table for upcoming debug data which will be transfered from client to backend

An in-range update of moesif-express is breaking the build 🚨

The dependency moesif-express was updated from 2.5.1 to 2.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

moesif-express is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 10 commits.

  • 8e5e3bf Version bump: release capture outgoing
  • 526e1c4 Update: README, add get(string) function to mock req.
  • 76d521f Fixed: spelling error.
  • 3052636 Fix: removed ip package dependency.
  • 0a8e4bd Feature: Capture-outgoing documentation.
  • c2b730f Feature: capture-outgoing all tested.
  • 4c42d83 Feature: Capture outgoing: Integrated With Middleware object.
  • b1fca15 Feature: capture outgoing - unit test works before integration.
  • 9f40c5c Merge branch 'master' into feature-capture-outgoing
  • e5ec09d Feature: Capture Outgoing

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

missing server test for syncSoC

the missing server test for syncSoC function led to a mistake. Fortunately, it was detected very early, so it doesn't affect any users. But the server test should be done very quickly to ensure that everything is working fine after the database restructuring update.

Setup Airbrake for your Node application

Installation

Using npm

npm install airbrake

Manual

{
  "dependencies": {
    "airbrake": "~2.0.0"
  }
}

Basic example

This is the minimal example that you can use to test Node Airbrake with your project.
The common use case for this module is to catch all 'uncaughtException' events on the process object and send them to Airbrake (You can find your project ID and API KEY with your project's settings):

var airbrake = require('airbrake').createClient(
  '<Your project ID>', // Project ID
  '<Your project API KEY>' // Project key
);
airbrake.handleExceptions();

throw new Error('I am an uncaught exception');

Note: the above will re-throw the exception after it has been successfully delivered to Airbrake, causing your process to exit with status 1.

If you want more control over the delivery of your errors, you can also manually submit errors to airbrake:

var airbrake = require('airbrake').createClient(
  '<Your project ID>', // Project ID
  '<Your project API KEY>' // Project key
);
var err = new Error('Something went terribly wrong');
airbrake.notify(err, function(err, url) {
  if (err) throw err;

  // Error has been delivered, url links to the error in airbrake
});

For more information please visit our official GitHub repo.

SyntaxError: Unexpected token o in JSON at position 1


SyntaxError: Unexpected token o in JSON at position 1
  File "<anonymous>", line unknown, in JSON.parse
  File "/node_modules/body-parser/lib/types/json.js", line 88, in parse
        return JSON.parse(body, reviver)
  File "/node_modules/body-parser/lib/read.js", line 116, in <unknown>
          req.body = parse(str)
  File "/node_modules/raw-body/index.js", line 262, in invokeCallback
          callback.apply(null, args)
  File "/node_modules/raw-body/index.js", line 251, in done
          invokeCallback()
  File "/node_modules/raw-body/index.js", line 307, in IncomingMessage.onEnd
          done(null, string)
  File "events.js", line 105, in emitNone
  File "events.js", line 207, in IncomingMessage.emit
  File "_stream_readable.js", line 1047, in endReadableNT
  File "internal/process/next_tick.js", line 102, in _combinedTickCallback
  File "internal/process/next_tick.js", line 161, in process._tickCallback

enumerations

implement enumerations for errors, variables, etc.

language files with translation module

add translation module with language files which could easily be extended.

  • translation module

  • german language file

  • english language file

Feel free to contribute for the language files (especially for the english one ;-) )

More languages may be supported in the future.

server tests

Implement server tests.

/EDIT:
Server tests has been implemented.

TypeError: Cannot read property 'token' of undefined


TypeError: Cannot read property 'token' of undefined
  File "/EVNotifyBackend/user/index.js", line 323, in Query._callback
            callback(err, ((err)? false : ((queryRes[0].token === token)? true : false)));   // whether or not the token is equal
  File "/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Sequence.js", line 88, in Query.Sequence.end
            this._callback.apply(this, arguments);
  File "/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 139, in Query._handleFinalResultPacket
      this.end(this._loadError, results, fields);
  File "/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 123, in Query.EofPacket
      this._handleFinalResultPacket(packet);
  File "/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 279, in Protocol._parsePacket
      sequence[packetName](packet);
  File "/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 76, in Parser.write
          this._onPacket(this._packetHeader);
  File "/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 39, in Protocol.write
      this._parser.write(buffer);
  File "/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 103, in Socket.<anonymous>
          connection._protocol.write(data);
  File "events.js", line 115, in emitOne
  File "events.js", line 210, in Socket.emit
  File "_stream_readable.js", line 266, in addChunk
  File "_stream_readable.js", line 253, in readableAddChunk
  File "_stream_readable.js", line 211, in Socket.Readable.push
  File "net.js", line 585, in TCP.onread

Rollbar user tracking

set tracking for user on rollbar module to allow tracking of corresponding AKey in case of any error to be able to reconstruct errors better.

An in-range update of rollbar is breaking the build 🚨

The dependency rollbar was updated from 2.4.7 to 2.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollbar is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v2.5.0

This is a minor version release because the meaning of the scrubFields configuration option has changed slightly. If you upgrade without any changes we may end up scrubbing more fields than you had before. Please see the second bullet point below for how this has changed.

  • The way we work with network requests for telemetry is a bit janky because of how XHR requests work and because we want to capture data without manual instrumentation. We do this via a monkey patch, this release changes a little bit of the semantics of that monkey patch to try to capture telemetry data in more cases. (#682)

  • When you set the scrubFields configuration option, we have two choices, we either:

    • concat your supplied list to the default
    • overwrite the default with whatever you supply

    If we do the first then how do you remove things you don't want scrubbed but which are in the default list? If we do the second, how do you add all of the defaults without having to copypasta them from our code?

    This release introduces the configuration boolean overwriteScrubFields which will determine which of the above two behaviours we follow. By default we will concat the scrubFields in the configuration that you set with the default set of fields defined in our package.json. If you set overwriteScrubFields to true then we will instead use your scrubFields value by itself ignoring whatever is currently set.
    (#684)

Commits

The new version differs by 7 commits.

  • fd7f22d Release v2.5.0
  • 3027a29 Merge pull request #684 from rollbar/expose-options-to-ts-for-debugging
  • 6b3c197 Handle scrubFields specially to concat by default and provide a boolean to overwrite
  • adeb139 Concat configured scrub fields with default
  • 5d0a160 Merge pull request #682 from rollbar/telemetry-rework
  • b50fd24 Run the telemetry filter at capture time to handle the majority of cases, but re-run on the way out of copy to handle network telemetry event race conditions
  • 3953b16 XHR readyState and network telemetry

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Feature Request: Drive Logs without location

As I don`t need/want to have my drives logged on a fancy map, I had location disabled for the sending app and now use PnP w/o GPS, but would like to have some data, logged for staistical purposes, i. e.:

timesstamps of start/stop, duration and SoC consumed.
Energy consumed, distance and average consumption could be calculated for cars where CEC, CED and ODO is availible.

Thank you!

An in-range update of rollbar is breaking the build 🚨

Version 2.3.6 of rollbar was just published.

Branch Build failing 🚨
Dependency rollbar
Current Version 2.3.5
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

rollbar is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits.

  • f01319f Release v2.3.6
  • f9e35c3 Merge pull request #542 from rollbar/react-native-fixes
  • d172d8b better diagnositics for understanding when predicates stop reporting, and replace error with catch as the fetch promise api is slightly different

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of moesif-express is breaking the build 🚨

The dependency moesif-express was updated from 2.6.3 to 2.6.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

moesif-express is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.6.4

Fixes:

  • Missing content-type dependency which may cause a failure if not already present in app (usually it is)
Commits

The new version differs by 9 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Multiple instances Telegram issue

As reported a few days ago, Telegram messages has been sent out multiple times. This behaviour was caused by the new cluster mode the new server is running. It also wrotes error log constinuous every few seconds due to multiple telegram webhooks.

To avoid this, we need to ensure if there is currently an open webhook - and only start one, if no webhook is currently running.

Error: Can't set headers after they are sent.

View details in Rollbar: https://rollbar.com/gplay97/EVNotifyBackend/items/182/


Error: Can't set headers after they are sent.
  File "_http_outgoing.js", line 491, in validateHeader
  File "_http_outgoing.js", line 498, in ServerResponse.setHeader
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 771, in ServerResponse.header
        this.setHeader(field, value);
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 170, in ServerResponse.send
          this.set('Content-Type', setCharset(type, 'utf-8'));
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 267, in ServerResponse.json
      return this.send(body);
  File "/home/gplay97/EVNotifyBackend/modules/integrations/abrp/index.js", line 23, in db.query
                        res.json({
  File "/home/gplay97/EVNotifyBackend/modules/db/index.js", line 30, in Query.db.query
                    if (typeof callback === 'function') callback(err, queryRes);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 525, in Query.<anonymous>
          fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 491, in Query._callback
          ret = fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Sequence.js", line 83, in Query.Sequence.end
            this._callback.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 139, in Query._handleFinalResultPacket
      this.end(this._loadError, results, fields);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 72, in Query.OkPacket
        this._handleFinalResultPacket(packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 291, in Protocol._parsePacket
      sequence[packetName](packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 433, in Parser._parsePacket
        this._onPacket(packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 43, in Parser.write
        this._parsePacket(packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 38, in Protocol.write
      this._parser.write(buffer);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 91, in Socket.<anonymous>
          connection._protocol.write(data);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 525, in Socket.<anonymous>
          fn.apply(this, arguments);
  File "events.js", line 116, in emitOne
  File "events.js", line 211, in Socket.emit
  File "_stream_readable.js", line 263, in addChunk
  File "_stream_readable.js", line 250, in readableAddChunk

Second User not possible

I have set up successful the Server and connected with i Android Phone and a BT Dongle. But when i want to use a second Smartphone (android) to look at the values i couldn't get access. All tough is use the same Server Settings, akey and token-
I get as response that the credentials are incorrect. Is it only possible to connect one User to the Server?

socInfo request

add new request to retrieve state of charge information (last submitted state of charge, timestamp and remaining kilometers)

Telegram Multilanguage Support for commands

add support for different languages on the commands like /help.

The "normal" notification message already supports different languages, because it is possible to retrieve the users language after he subscribed to the telegram notifications. Before that, this is not known. A workaround for that is for example the command with the language included (e.g. /help de) will output the german translation for the help text, while /help will output the english one by default.

sync specific handling

Add specific handling for future sync functions to allow fetching and setting the settings without a password - only with a valid token.

Error: Can't set headers after they are sent.

View details in Rollbar: https://rollbar.com/gplay97/EVNotifyBackend/items/181/


Error: Can't set headers after they are sent.
  File "_http_outgoing.js", line 491, in validateHeader
  File "_http_outgoing.js", line 498, in ServerResponse.setHeader
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 775, in ServerResponse.header
        this.setHeader(field, value);
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 174, in ServerResponse.send
          this.set('Content-Type', setCharset(type, 'utf-8'));
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 271, in ServerResponse.json
      return this.send(body);
  File "/home/gplay97/EVNotifyBackend/modules/integrations/abrp/index.js", line 30, in token.validateToken
                res.json(err || 'unauthorized');
  File "/home/gplay97/EVNotifyBackend/modules/token/index.js", line 20, in db.query
            callback(err, (!err && dbRes && dbRes[0] && dbRes[0].token === token));
  File "/home/gplay97/EVNotifyBackend/modules/db/index.js", line 30, in Query.db.query
                    if (typeof callback === 'function') callback(err, queryRes);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 525, in Query.<anonymous>
          fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 491, in Query._callback
          ret = fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Sequence.js", line 83, in Query.Sequence.end
            this._callback.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 139, in Query._handleFinalResultPacket
      this.end(this._loadError, results, fields);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 123, in Query.EofPacket
      this._handleFinalResultPacket(packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 291, in Protocol._parsePacket
      sequence[packetName](packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 433, in Parser._parsePacket
        this._onPacket(packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 43, in Parser.write
        this._parsePacket(packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 38, in Protocol.write
      this._parser.write(buffer);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 91, in Socket.<anonymous>
          connection._protocol.write(data);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 525, in Socket.<anonymous>
          fn.apply(this, arguments);
  File "events.js", line 116, in emitOne
  File "events.js", line 211, in Socket.emit
  File "_stream_readable.js", line 263, in addChunk

Charging session broken into 15-minute segments

For whatever reason (I don't know if this is an issue in the EVNotify app, or the backend, or the web frontend, my last charging session, which lasted several hours on an AC charger, got broken into lots of small 15-minute charging segments.

image

I don't think this is intended. I think it should show up as one long charging session, and summarise the total charged kWh, total time etc...

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.