bosch-xmpp

所属分类:通讯编程
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-03-07 09:27:25
上 传 者sh-1993
说明:  博世XMPP协议的协议实现,
(Protocol implementation for Bosch XMPP protocols,)

文件列表:
LICENSE (1084, 2023-09-13)
bin/ (0, 2023-09-13)
bin/bosch-xmpp (46, 2023-09-13)
example/ (0, 2023-09-13)
example/ivt-status.js (446, 2023-09-13)
example/nefit-easy-status.js (510, 2023-09-13)
index.js (363, 2023-09-13)
lib/ (0, 2023-09-13)
lib/base-client.js (8759, 2023-09-13)
lib/cli/ (0, 2023-09-13)
lib/cli/docopt.txt (1451, 2023-09-13)
lib/cli/index.js (2372, 2023-09-13)
lib/cli/server.js (1408, 2023-09-13)
lib/easycontrol-client.js (1396, 2023-09-13)
lib/encryption.js (1046, 2023-09-13)
lib/ivt-client.js (1127, 2023-09-13)
lib/nefit-easy-client.js (1031, 2023-09-13)
lib/scram-auth-mechanism.js (791, 2023-09-13)
lib/util.js (281, 2023-09-13)
package-lock.json (86276, 2023-09-13)
package.json (1299, 2023-09-13)

# Bosch XMPP Unofficial Bosch XMPP implementation, used for, amongst others: * Nefit Easy and similar devices (Junkers Control CT100, Worcester Wave, Bosch RRC, Buderus Logamatic TC 100) * Bosch/IVT heat pumps * Junkers Bosch MB LANi/MB LAN2 * Buderus KM200, KM100 or KM50 * Bosch EasyControl CT200 * (probably) any Bosch EasyRemote compatible controller ## I keep getting JSON errors, but I'm sure I'm passing the correct serial/access key/password! I found that the EasyControl app for iOS/Android is able to use your Bosch SingleKey ID password to access the device. This is _not_ possible with `bosch-xmpp` (if you use this password, you will get JSON decoding errors, which means that `bosch-xmpp` is unable to decrypt the response data). Instead, you need to set an explicit device password. From the EasyControl app, you can change it from _"Settings > Personal > Change password"_. ## Command Line Interface Install using `-g/--global`: ``` $ npm i -g bosch-xmpp ``` Options: ``` bosch-xmpp – Bosch XMPP command line interface Usage: bosch-xmpp [options] CLIENT get bosch-xmpp [options] CLIENT put bosch-xmpp [options] CLIENT bridge [] [] Options: -h --help Show this screen -v --version Show version -V --verbose Be more verbose --serial=SERIAL Device serial number (on some devices called "login name") --access-key=ACCESS_KEY Device access key (on some devices called "password") --password=PASSWORD Device password (on some devices, the user-configured password) --xmpp-host=HOST XMPP host to connect to --xmpp-port=PORT XMPP port to connect to [default: 5222] --timeout=TIMEOUT Retry timeout in seconds [default: 5] Supported values for CLIENT: nefit Nefit Easy or compatible ivt IVT/Bosch devices (mainly heat pumps) easycontrol Bosch EasyControl (CT200) Examples: $ bosch-xmpp nefit get /ecus/rrc/uiStatus $ bosch-xmpp ivt get /gateway/versionFirmware $ bosch-xmpp nefit put /heatingCircuits/hc1/temperatureRoomManual '{"value":20.5}' $ bosch-xmpp easycontrol bridge 8080 0.0.0.0 Instead of specifying serial number, access key or password through options, you can also define them through environment variables: BOSCH_XMPP_SERIAL_NUMBER BOSCH_XMPP_ACCESS_KEY BOSCH_XMPP_PASSWORD ``` ## HTTP bridge You can start a local HTTP server that will set up a persistent connection with the Bosch backend: ``` bosch-xmpp bridge ``` By default the bridge will listen on localhost port 3000. You can use the bridge from other software to retrieve endpoints. The base URL, assuming the default, is `http://localhost:3000/bridge/ENDPOINT`. For example, to retrieve the `/ecus/rrc/uiStatus` endpoint, the URL will be `http://localhost:3000/bridge/ecus/rrc/uiStatus`. ## API Install locally: ``` $ npm i bosch-xmpp ``` ### Nefit Easy ``` const { NefitEasyClient } = require('bosch-xmpp'); // Instantiate client const client = NefitEasyClient({ serialNumber : '...', accessKey : '...', password : '...', }); await client.connect(); try { console.log('%j', await client.get('/ecus/rrc/uiStatus')) } catch(e) { console.error(e.stack || e); } client.end(); ``` ### IVT ``` const { IVTClient } = require('bosch-xmpp'); const client = IVTClient({ serialNumber : '...', accessKey : '...', password : '...', }); await client.connect(); try { console.log('%j', await client.get('/gateway/versionFirmware')); } catch(e) { console.error(e.stack || e); } client.end(); ``` ### EasyControl (CT200) ``` const { EasyControlClient } = require('bosch-xmpp'); const client = EasyControlClient({ serialNumber : '...', accessKey : '...', password : '...', }); await client.connect(); try { console.log('%j', await client.get('/gateway/versionFirmware')); } catch(e) { console.error(e.stack || e); } client.end(); ``` # Disclaimer The implementation of this library is based on reverse-engineering the communications between the mobile apps and the backend, plus various other bits and pieces of information. It is not based on any official information given out by Bosch, Nefit or affiliated companies, and therefore there are no guarantees whatsoever regarding the safety of your devices and/or their settings, or the accuracy of the information provided.

近期下载者

相关文件


收藏者