All Projects → robertklep → Nefit Easy Http Server

robertklep / Nefit Easy Http Server

Licence: mit
HTTP server to access Nefit/Bosch XMPP backend over HTTP

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nefit Easy Http Server

Senseme
Python Library for Haiku SenseMe app controlled fans/lights
Stars: ✭ 19 (-48.65%)
Mutual labels:  home-automation
Nefit Easy Client
Nefit Easy™ client for Node.js
Stars: ✭ 14 (-62.16%)
Mutual labels:  home-automation
Home Assistant octopusagile
Octopus Agile custom component for Home Assistant
Stars: ✭ 30 (-18.92%)
Mutual labels:  home-automation
Coapnet
CoAPnet is a high performance .NET library for CoAP based communication. It provides a CoAP client and a CoAP server. It also has DTLS support out of the box.
Stars: ✭ 23 (-37.84%)
Mutual labels:  home-automation
Rf24node msgproto
An application that runs on a Raspberry Pi that interfaces RF24Network packets to a Message Bus. Currently MQTT & AMQP (alpha); Topics are RF24SensorNet compatible.
Stars: ✭ 11 (-70.27%)
Mutual labels:  home-automation
Modbridge
Bridge between modbus and MQTT
Stars: ✭ 20 (-45.95%)
Mutual labels:  home-automation
Iobroker
Automate your life!
Stars: ✭ 826 (+2132.43%)
Mutual labels:  home-automation
Hass Config
Configuration files for Home Assistant
Stars: ✭ 32 (-13.51%)
Mutual labels:  home-automation
Smarthome
Eclipse SmartHome™ project
Stars: ✭ 867 (+2243.24%)
Mutual labels:  home-automation
Ozw Network Visualization Card
Lovelace custom card for visualizing the ZWave network with the OpenZWave (beta) integration.
Stars: ✭ 30 (-18.92%)
Mutual labels:  home-automation
Home Assistant Config
Home Assistant config files, rewritten to use the latest features, 100+ documented automations, automatically generated ToC 🏠 🤖
Stars: ✭ 926 (+2402.7%)
Mutual labels:  home-automation
Supervisor
🏡 Home Assistant Supervisor
Stars: ✭ 862 (+2229.73%)
Mutual labels:  home-automation
Iobroker.discovery
This adapter tries to discover all known devices
Stars: ✭ 20 (-45.95%)
Mutual labels:  home-automation
Node Eq3ble
node.js package to control an EQ3 bluetooth thermostat
Stars: ✭ 22 (-40.54%)
Mutual labels:  home-automation
Tp Link Smart Switch Web Client
Creating a web client for the tp-link series of smart switches (HS-100, HS-110, etc).
Stars: ✭ 31 (-16.22%)
Mutual labels:  home-automation
Openhabai
Train Neuronal networks to automate your home
Stars: ✭ 19 (-48.65%)
Mutual labels:  home-automation
Android
📱 Home Assistant Companion for Android
Stars: ✭ 881 (+2281.08%)
Mutual labels:  home-automation
Kotihome
Home automation system based on Arduino with sensors, Raspberry Pi, Node.js and React
Stars: ✭ 32 (-13.51%)
Mutual labels:  home-automation
Plugins
Plugins for SmartHomeNG - The device integration platform for your smart home
Stars: ✭ 32 (-13.51%)
Mutual labels:  home-automation
Hodd
Homie Device Discovery
Stars: ✭ 21 (-43.24%)
Mutual labels:  home-automation

Nefit Easy™ HTTP server

HTTP server to access Nefit/Bosch XMPP backend over HTTP.

Installation

This library requires Node.js 6.0.0 or later!

$ npm i nefit-easy-http-server -g

This will install the easy-server CLI tool in a well-known "bin/" directory (npm config get prefix will show you where).

Docker

@balk77 has created a Docker image to easily install and run the HTTP server. More information here.

If you want to build your own Docker image, there's a Dockerfile included in this repository.

Problems on recent Linux distributions

If you're having problems getting any data from the HTTP server, and you're using a recent Linux distribution (for instance, Raspbian Buster), take a look at this comment.

In short: OpenSSL defaults have changed to require a minimum TLS version and cipher implementation. These defaults cause the Nefit client code to not be able to connect to the Nefit/Bosch backend.

The solution is mentioned here: edit the file /etc/ssl/openssl.cnf and change the following keys to these values:

MinProtocol = None
CipherString = DEFAULT

Usage

Starting

$ easy-server

By default, the server will be accessible through http://127.0.0.1:3000/

Configuration

Configuration is done through command line options. See Options below.

Endpoints

The server exposes two endpoint prefixes:

  • /bridge/, which serves as a raw HTTP-to-XMPP bridge (see "Examples");
  • /api/, which implements higher-level commands (provided by nefit-easy-commands);

Examples

The server isn't meant to be opened in a browser. Its intended use is to be called using tools like curl or httpie, or from other programs/scripts, through HTTP calls. The following examples will use curl.

HTTP-to-XMPP bridge

The HTTP-to-XMPP bridge provides two actions:

  • retrieving an endpoint;
  • writing data to an endpoint;

To retrieve an endpoint (for example, /ecus/rrc/uiStatus):

$ curl http://127.0.0.1:3000/bridge/ecus/rrc/uiStatus

To write data to an endpoint:

$ curl -XPOST http://127.0.0.1:3000/bridge/heatingCircuits/hc1/temperatureRoomManual -d '{"value":20}' -H 'Content-Type: application/json'

For POST requests, the data should be a valid JSON string. There is no input validation.

Commands API

For now, the commands API only supports "get" commands:

$ curl http://127.0.0.1:3000/api/status
$ curl http://127.0.0.1:3000/api/pressure
$ curl http://127.0.0.1:3000/api/hotWaterSupply
$ curl http://127.0.0.1:3000/api/location
$ curl http://127.0.0.1:3000/api/program
$ curl http://127.0.0.1:3000/api/userMode

Options

$ easy-server -h

easy-server – Nefit Easy™ HTTP-server

Usage:
  easy-server [options]

Options:
  -h --help                Show this screen
  -v --version             Show version
  -V --verbose             Be more verbose
  --serial=SERIAL          Nefit Easy™ serial number (without whitespace or hyphens)
  --access-key=ACCESS_KEY  Nefit Easy™ access key (without whitespace or hyphens)
  --password=PASSWORD      Nefit Easy™ password
  --port=PORT              Port to listen on [default: 3000]
  --host=HOST              Host to bind to [default: 127.0.0.1]
  --timeout=TIMEOUT        Request timeout in seconds [default: 30]

Instead of specifying serial number, access key or password through
options, you can also define them through environment variables:

  NEFIT_SERIAL_NUMBER
  NEFIT_ACCESS_KEY
  NEFIT_PASSWORD
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].