Giter Club home page Giter Club logo

enocean-js's Introduction

enocean-js

GitHub

Greenkeeper badge

Code Climate coverage

Code Climate maintainability Code Climate technical debt

Total alerts Language grade: JavaScript

npm

npm

Donate to this Bitcoin address: 1MKAPeq2gY57TwUR1bMSrCGZKYsfiVGKM4

This is the monorepo for all things enocean in javascript. It is home to a library of tools to work with enocean telegrams in javascript. some of the features are:

  • a general encoder/decoder for all EEPs that runs in node.js and the browser allowing you to go from binary representation to JSON back and forth. i call it the transcoder.
  • a serialport ESP3Parser
  • a common command interface for managing your USB device
  • a transformer to turn ESP3 packets into concrete types with all their interfaces.

you can install and use these tools separately or in a complete package. so either npm install enocean-js or npm install @enocean-js/some-tool. You can find all the installable modules at the enocean-js npm organisation

You will also find some full blown apps here:

Some work has started on creating an EEP Description Language (EEPDL) based on JSON. I started creating a json-schema for it. It will be used for documentation as well as beeing an integral part of the transcoder. I will also publish the json descritions of all the EEPs for other implementers. For this to be useful, the describing language must be well defined.

slack

join the conversation

join the conversation on slack

install

npm i -S enocean-js

simple examle

nmp i -S enocean-js serialport

and then...

const SerialPort = require('serialport')
const Enocean = require('enocean-js')
const pretty = Enocean.pretty
const ESP3Parser = Enocean.ESP3Parser

const port = new SerialPort('/dev/ttyUSB0', { baudRate: 57600 })
const parser = new ESP3Parser()
port.pipe(parser)

parser.on('data', pretty.logESP3)

documentation

the documentation is still lacking, sorry... the only thing i can offer for now is the description of the content of enocean telegrams (EEP specification). It's not yet fully functional :-(

donate

if you want to support this project, consider donating something to this address:

Bitcoin: 1FLXyLHPn3N1KLznUp39uTfHqPBfoM63t4

enocean-js's People

Contributors

alaric84 avatar greenkeeper[bot] avatar holger-will avatar yguy 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enocean-js's Issues

add version update script

the version update script should look into packages/node_modules/@enocean-js/* and update the package.json of all packages to the same version

beautify README.md

the readme need some polish. if you want to help, this is a good starting point. ask me what to do and how to do it here.

CO_WR_MEM does't work

for my TCM at least it returns RET_WRONG_PARAM (address outside range of values)
for an address that is otherwise perfectly readable. In that case i would expect it to return RET_OPERATION_DENIED when i have no write access... we should have a look at this...

use es6 modules

should we use es6 modules style export?
I do think so. what i don't like is the --experimantal-modules flag.
lets test esm.js

setBits() for ByteArray

implement a setBits() function that can set one or more bits in a ByteArray given an offset in bytes and or bits, and a bit-stream length.

The payload of 4BS telegrams my contain data that is spread across 8bit Byte boundaries.

a5-20-10

CVAR should be an enum. it has a range.max:"100,255" the only sensor i found so far with multible values in this field, in fact in any field. in other places arrays are used.

the sematics are totally wrong here because the second max value (255) defines a single value not a range. enums howerver support a mixture of single values and ranges. this is even used in the same eep. (FANSP)

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

The dependency esm was updated from 3.2.0 to 3.2.1.

🚨 View failing branch.

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

esm 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 3.2.1
  • Added support for class properties to options.cjs.namedExports
  • Ensured builtin modules in .mjs files are more restricted
  • Reduced instrumentation of non-circular modules
  • Reverted require() interoperability of options.cjs.interop (#721)
Commits

The new version differs by 113 commits.

  • fb13223 Bump to v3.2.1.
  • 042bf17 Update deps.
  • 3716627 Generate Loader.init() cacheKey with the module's name.
  • 689c78b Make getModuleName() return module.filename when module.id is "."
  • 67e8725 Set explicit options to false when using a single boolean to set CJS options.
  • 0998084 Add tests for explicit fields against zero-config defaults.
  • ff1d943 Add tests for options.cjs.interop fallback.
  • e7fec56 Update set traps.
  • dada180 Simplify isUpdatableGet() isUpdatableSet().
  • 28cabe5 Refine mutable defineProperty trap.
  • f139a84 Refine immutable defineProperty trap.
  • ccfa2cc Add options.cjs.dedefault but don't enable it by default.
  • ac51317 Update acorn parser plugins.
  • 532d8f4 Rename options.cjs.interop to options.cjs.esModule.
  • 07786d2 Add instrumentation tests.

There are 113 commits in total.

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 🌴

usecases

let us know about your usecase. what app do you want to write? what information do you need? where do you need it? or any other ideas what could be useful or fun?

add manufacturer list

{ 
  MANUFACTURER_RESERVED = 0x000, PEHA = 0x001, THERMOKON = 0x002, SERVODAN = 0x003, 
  ECHOFLEX_SOLUTIONS = 0x004, OMNIO_AG = 0x005, AWAG_ELEKTROTECHNIK_AG = 0x005, HARDMEIER_ELECTRONICS = 0x006, 
  REGULVAR_INC = 0x007, AD_HOC_ELECTRONICS = 0x008, DISTECH_CONTROLS = 0x009, KIEBACK_AND_PETER = 0x00A, 
  ENOCEAN_GMBH = 0x00B, PROBARE = 0x00C, VICOS_GMBH = 0x00C, ELTAKO = 0x00D, 
  LEVITON = 0x00E, HONEYWELL = 0x00F, SPARTAN_PERIPHERAL_DEVICES = 0x010, SIEMENS = 0x011, 
  T_MAC = 0x012, RELIABLE_CONTROLS_CORPORATION = 0x013, ELSNER_ELEKTRONIK_GMBH = 0x014, DIEHL_CONTROLS = 0x015, 
  BSC_COMPUTER = 0x016, S_AND_S_REGELTECHNIK_GMBH = 0x017, ZENO_CONTROLS = 0x018, MASCO_CORPORATION = 0x018, 
  INTESIS_SOFTWARE_SL = 0x019, VIESSMANN = 0x01A, LUTUO_TECHNOLOGY = 0x01B, CAN2GO = 0x01C, 
  SAUTER = 0x01D, BOOT_UP = 0x01E, OSRAM_SYLVANIA = 0x01F, UNOTECH = 0x020, 
  DELTA_CONTROLS_INC = 0x21, UNITRONIC_AG = 0x022, NANOSENSE = 0x023, THE_S4_GROUP = 0x024, 
  MSR_SOLUTIONS = 0x025, VEISSMANN_HAUSATOMATION_GMBH = 0x025, GE = 0x26, MAICO = 0x027, 
  RUSKIN_COMPANY = 0x28, MAGNUM_ENERGY_SOLUTIONS = 0x29, KMC_CONTROLS = 0x02A, ECOLOGIX_CONTROLS = 0x02B, 
  TRIO_2_SYS = 0x2C, AFRISO_EURO_INDEX = 0x02D, WALDMANN_GMBH = 0x02E, NEC_PLATFORMS_LTD = 0x030, 
  ITEC_CORPORATION = 0x031, SIMICX_CO_LTD = 0x32, PERMUNDO_GMBH = 0x33, EUROTRONIC_TECHNOLOGY_GMBH = 0x34, 
  ART_JAPAN_CO_LTD = 0x35, TIANSU_AUTOMATION_CONTROL_SYSTE_CO_LTD = 0x36, WEINZIERL_ENGINEERING_GMBH = 0x37, GRUPPO_GIORDANO_IDEA_SPA = 0x38, 
  ALPHAEOS_AG = 0x39, TAG_TECHNOLOGIES = 0x3A, WATTSTOPPER = 0x3B, PRESSAC_COMMUNICATIONS_LTD = 0x3C, 
  GIGA_CONCEPT = 0x3E, SENSORTEC = 0x3F, JAEGER_DIREKT = 0x40, AIR_SYSTEM_COMPONENTS_INC = 0x41, 
  ERMINE_CORP = 0x042, SODA_GMBH = 0x043, EKE_AUTOMATION = 0x044, HOLTER_REGELARMUTREN = 0x045, 
  ID_RF = 0x046, DEUTA_CONTROLS_GMBH = 0x047, EWATTCH = 0x048, MICROPELT = 0x049, 
  CALEFFI_SPA = 0x04A, DIGITAL_CONCEPTS = 0x04B, EMERSON_CLIMATE_TECHNOLOGIES = 0x04C, ADEE_ELECTRONIC = 0x04D, 
  ALTECON = 0x04E, NANJING_PUTIAN_TELECOMMUNICATIONS = 0x04F, TERRALUX = 0x050, MENRED = 0x051, 
  IEXERGY_GMBH = 0x052, OVENTROP_GMBH = 0x053, BUILDING_AUTOMATION_PRODUCTS_INC = 0x054, FUNCTIONAL_DEVICES_INC = 0x055, 
  OGGA = 0x056, ITHO_DAALDEROP = 0x057, RESOL = 0x058, ADVANCED_DEVICES = 0x059, 
  AUTANI_LCC = 0x05A, DR_RIEDEL_GMBH = 0x05B, HOPPE_HOLDING_AG = 0x05C, SIEGENIA_AUBI_KG = 0x05D, 
  ADEO_SERVICES = 0x05E, EIMSIG_EFP_GMBH = 0x05F, VIMAR_SPA = 0x060, GLEN_DIMLAX_GMBH = 0x061, 
  PMDM_GMBH = 0x062, HUBBEL_LIGHTNING = 0x063, DEBFLEX = 0x64, PERIFACTORY_SENSORSYSTEMS = 0x65, 
  WATTY_CORP = 0x66, WAGO_KONTAKTTECHNIK = 0x67, KESSEL = 0x68, AUG_WINKHAUS = 0x69, 
  DECELECT = 0x6A, MST_INDUSTRIES = 0x6B, BECKER_ANTRIEBE = 0x6C, NEXELEC = 0x6D, 
  WIELAND_ELECTRIC = 0x6E, AVIDSEN = 0x6F, CWS_BOCO_INTERNATIONAL = 0x70, ROTO_FRANK = 0x71, 
  ALM_CONTORLS = 0x072, TOMMASO_TECHNOLOGIES = 0x073, REHAU =0x074, MULTI_USER_MANUFACTURER = 0x7FF 
}

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

The devDependency mocha was updated from 6.0.2 to 6.1.0.

🚨 View failing branch.

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

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

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

Release Notes for v6.1.0

6.1.0 / 2019-04-07

πŸ”’ Security Fixes

  • #3845: Update dependency "js-yaml" to v3.13.0 per npm security advisory (@plroebuck)

πŸŽ‰ Enhancements

  • #3766: Make reporter constructor support optional options parameter (@plroebuck)
  • #3760: Add support for config files with .jsonc extension (@sstephant)

πŸ“  Deprecations

These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:

πŸ› Fixes

  • #3829: Use cwd-relative pathname to load config file (@plroebuck)
  • #3745: Fix async calls of this.skip() in "before each" hooks (@juergba)
  • #3669: Enable --allow-uncaught for uncaught exceptions thrown inside hooks (@givanse)

and some regressions:

πŸ“– Documentation

πŸ”© Other

  • #3830: Replace dependency "findup-sync" with "find-up" for faster startup (@cspotcode)
  • #3799: Update devDependencies to fix many npm vulnerabilities (@XhmikosR)
Commits

The new version differs by 28 commits.

  • f4fc95a Release v6.1.0
  • bd29dbd update CHANGELOG for v6.1.0 [ci skip]
  • aaf2b72 Use cwd-relative pathname to load config file (#3829)
  • b079d24 upgrade deps as per npm audit fix; closes #3854
  • e87c689 Deprecate this.skip() for "after all" hooks (#3719)
  • 81cfa90 Copy Suite property "root" when cloning; closes #3847 (#3848)
  • 8aa2fc4 Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
  • 586bf78 Update JS-YAML to address security issue (#3845)
  • d1024a3 Update doc examples "tests.html" (#3811)
  • 1d570e0 Delete "/docs/example/chai.js"
  • ade8b90 runner.js: "self.test" undefined in Browser (#3835)
  • 0098147 Replace findup-sync with find-up for faster startup (#3830)
  • d5ba121 Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
  • a3089ad update package-lock
  • 75430ec Upgrade yargs-parser dependency to avoid loading 2 copies of yargs

There are 28 commits in total.

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 🌴

automatic teach in

like the parser and the transformer i'm thinking about implementing the memory/teach in part as a transformable stream that acts as a kind of filter that unifies teach in telegrams and emits the needed information like eep and senderId and then have configurable backends for storing/retrieving the actual data.
that could be: filesystem, leveldb, redis,mysql or even cloud storrages like elastic search etc.
there should be an api for retrieving and storing not only for teach in but also for sensor data.
naming scheme could be something like enocean-js-memory-*

Help wanted

if you want to help, please let me know here. I'll help you getting started.
There is so much to do, any help is greatly appreciated.

[NRCE] tracking bug

Hello team EnOcean-JS,

I purchased EnOcean modules expecting to use them with Node-RED, only to find out the latest version of Node-Red and the latest version of node-red-contrib-enocean aren't compatible, as the Node-Red module isn't using the new enocean-js library.

I've seen some messages from last December saying this should be available "soon" (a week was mentioned in enocean-js/nrce-deprecated#12).

Is there any news on that? Is there a way to donate/contribute to the project to make this happen faster?

Best regards,
S.

get rid of Uint8Array

use Arrays instead of Uint8Arrays for compatibility and speed. Someday Uint8Arrays might be optimized but for now they are slower that regular Arrays. But most importantly mobile browsers don't support Uint8Array..

publishing script

we need a publishing script that goes into each package folder and does an npm publish there...

clean up logo

the logo was created by @huwylphi see enocean-js/node-enocean#27

it's graet to have it as an svg. I'm not a big fan of inskapes output though. in fact i'm not a fan of nay editors output. it would be nice to recreate the logo as clean and small as possible as handwritten svg.

Issues parsing 'd2-50-00'

the parsing of values is way better
But is it possible to recognize unused values?
rawValue:0 seems to be a propper value - so its correct to scale it to -64 ... but its really not that cold here ;-)

  OUTT:
   { name: 'Outdoor Air Temperature',
     rawValue: 69,
     value: 5,
     range: { min: '0', max: '127' },
     scale: { min: '-64', max: '63' },
     unit: 'Β°C' },
  SPLYT:
   { name: 'Supply Air Temperature',
     rawValue: 77,
     value: 13,
     range: { min: '0', max: '127' },
     scale: { min: '-64', max: '63' },
     unit: 'Β°C' },
  INT:
   { name: 'Indoor Air Temperature',
     rawValue: 0,
     value: -64,
     range: { min: '0', max: '127' },
     scale: { min: '-64', max: '63' },
     unit: 'Β°C' },

complete Common Command

there are a few things not implemented yet in in common command in common command. mostly because my USBs do not implement things like secure CO_WR_SECUREDEVICE_ADD or even CO_WR_LEARNMODE so i can not test this functionality. I only have old TCM 300 modules here... i will order a TCM310 and TCM320 for testing...

We should at least having it the functionality implemented, and tested on a theoretical level. If we get Bugs in real applications, we can fix them later.

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.