# node-red-contrib-transittime

> node-red transit time calc

Latest version **1.0.8** (published 2020-12-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-red-contrib-transittime
pnpm add node-red-contrib-transittime
yarn add node-red-contrib-transittime
bun add node-red-contrib-transittime
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2020-12-18 |
| First published | 2020-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 39.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | LaV |
| Maintainers | lvenier |
| Keywords | node-red, transit, transittime, yoctu, logistics |

## Links

- npm: https://www.npmjs.com/package/node-red-contrib-transittime
- Repository: https://github.com/lvenier/node-red-contrib-transittime
- Homepage: https://github.com/lvenier/node-red-contrib-transittime#readme
- Issues: https://github.com/lvenier/node-red-contrib-transittime/issues
- npm.io page: https://npm.io/package/node-red-contrib-transittime

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.8 (latest) — 2020-12-18
- 1.0.7 — 2020-02-12
- 1.0.6 — 2020-02-06
- 1.0.5 — 2020-02-06
- 1.0.4 — 2020-02-06
- 1.0.3 — 2020-01-31
- 1.0.2 — 2020-01-31
- 1.0.1 — 2020-01-31
- 1.0.0 — 2020-01-31
- 0.9.8 — 2020-01-30
- 0.9.7 — 2020-01-30
- 0.9.6 — 2020-01-30
- 0.9.5 — 2020-01-30
- 0.9.4 — 2020-01-30
- 0.9.3 — 2020-01-30
- … 3 more at https://npm.io/package/node-red-contrib-transittime/versions

## README

# node-red-contrib-transittime

[![Build Status](https://api.travis-ci.org/lvenier/node-red-contrib-transittime.svg?branch=master)](https://travis-ci.org/lvenier/node-red-contrib-transitTime)
[![npm version](http://img.shields.io/npm/v/node-red-contrib-transittime.svg?style=flat)](https://npmjs.org/package/node-red-contrib-transittime "View this project on npm")
[![Github Issues](http://img.shields.io/github/issues/lvenier/node-red-contrib-transitTime)](https://github.com/lvenier/node-red-contrib-transitTime/issues)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

Transit Time Palette for Node-Red

## Input / Output

### inputs :

msg.payload.distance: trip distance in kms.

msg.payload.config: the required vehicle and trip information : 
- speed in km/hours
- drivingTime in hours
- maxDrivingTime in hours
- breakTime in hours
- restTime in hours

Example : 

```{speed: 1.16, drivingTime: 240, maxDrivingTime: 720, breakTime:30, restTime:480}```

### output :

return msg.payload.transitTime in hours.

## Test

You can check the flow in the sample directory to have a better understanding of the input and output.
It provides 2 examples :
- timestamp with predefined set of data
- api get/post to input values

## Demo
UI : https://transittime.yoctu.com/ui

API : curl -X POST https://transittime.yoctu.com/api/ -H 'Content-type: application/json' -d '{ "distance": 500, "config": {"speed":60,"drivingTime":240,"maxDrivingTime":720,"breakTime":30,"restTime":480}}'

## Contributors and Thanks

Thank you

@misterbh for the first version, test and algorythm

LaV.

---
_Source: https://npm.io/package/node-red-contrib-transittime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
