sstadlberger / home

Custom Interface / API for the Busch Jäger free@home system.
Mozilla Public License 2.0
42 stars 16 forks source link

Additional Documentation #4

Closed xlrx closed 6 years ago

xlrx commented 7 years ago

Dear Stefan, thanks for sharing this project! It is very sad that there are no other API projects for free@home, I am happy that this one exists. I want to test and extend with my installation (e.g., for homebridge integration).

Do you have any additional documentation for setup and development?

Thanks, Klaus

rogierlommers commented 7 years ago

Same here; can't wait for our new home to be ready :).

xlrx commented 7 years ago

Okay, got the project running. Console puts "[error] XMPP authentication failure". Which JID do I have to use? Let's say I have a local user "ControlUser"; then the JID has to be "ControlUser@busch-jaeger.de" or do I have to use my remote user from my.busch-jaeger.de?

EDIT: response with jid='ControlUser'

Stanza {
  name: 'stream:error',
  parent: null,
  children: 
   [ Element {
       name: 'host-unknown',
       parent: [Circular],
       children: [],
       attrs: { xmlns: 'urn:ietf:params:xml:ns:xmpp-streams' } },
     Element {
       name: 'text',
       parent: [Circular],
       children: [ 'This server does not serve controluser' ],
       attrs: { xmlns: 'urn:ietf:params:xml:ns:xmpp-streams' } } ],
  attrs: 
   { 'xmlns:stream': 'http://etherx.jabber.org/streams',
     xmlns: 'jabber:client' } }
sstadlberger commented 7 years ago

The JID does not contain the username but is a formatted hex string. The pattern looks something like this: 01234567890ab-cdef-0123-456789abcdef@busch-jaeger.de

You can find yours by loading the settings.json file from your Busch Jäger SysAP, e.g. at http://yourSysAPIP/settings.json This file contains the JIDs for all users.

SchuldtOH commented 7 years ago

Can you give some hints how you got the project running? I cannot find any main class for java.

h-teske commented 7 years ago

@SchuldtOH this is a node.js project, not Java...

sstadlberger commented 7 years ago

To get it to work you need to take the following steps.

  1. install node.js: https://nodejs.org/
  2. clone the repository: git clone git@github.com:sstadlberger/home.git
  3. cd into the project root and install the node modules: npm install
  4. configure the config.js, data.json and structure.json files (see the files themselves and above for more information)
  5. run it with: node home.js (possible options: --loglevel=debug --useWeather --useDB --useHomematic)

Hope that helps a bit. When I have more time I'll add a proper documentation.

SchuldtOH commented 7 years ago

Thanks! That helped a lot. Finally I managed to Control all my blinds. That works like a charm (using the legacy-command).

But I have problems with the switch actuator 8/8, which is quite new. That seems to be not included.

And you should add a comma in the structure.json right before "shortcuts" to make it a proper json format.

sstadlberger commented 7 years ago

I don't have an 8/8 actuator so I can't integrate it. When I have some more time™ I'll write a tutorial how you can extract the necessary values so I can integrate them.

structure.json: fixed in 991e0d5b183e8c7bef79fa84b5a8518dcba479c4

bochede commented 7 years ago

for the 8/8 actuator you have to add 'B008' to the switch section in sysap-external.js

bochede commented 7 years ago

192.x.x.x/info/ABB700xxxxxx under deviceID you can see the id - in the case of an 8/8-actuator the 'B008'

SchuldtOH commented 7 years ago

Meanwhile I added the missing actuators: As a switch: 'B008', // Sensor/ Schaltaktor 8/8fach, REG As a dimmer '1021', // Dimmaktor 4-fach

SchuldtOH commented 7 years ago

Currently I cannot get the thermostat to work. While I can read the current temperature from odp0010, I cannot manage to set a target temperature.

Here the thermostat info: serialNumber "ABBxxxxxxxxx"
deviceId "1004"
typeName "Raumtemperaturregler"
channels  
ch0000  
datapoints  
idp0000 "0"
idp0001 "0"
idp0017 "0"
odp0000 "0"
odp0001 "0"
odp0006 "35"
odp0007 "0"
odp0008 "0"
odp0009 "65"
odp000A "0"
odp000B "0"
odp0010 "19.08"
odp0011 "0"
odp0012 "0"
odp0013 "0"
odp0014 "0"
pm0000 "3"
pm0001 "0"
pm0002 "21"
pm0003 "1800"
pm0004 "60"
pm0006 "0"
pm0008 "14"
pm0009 "-14"
pm000A "1"
pm000B "0"
pm000C "100"
sstadlberger commented 6 years ago

I moved the 8/8 actuator and the thermostat issues into their own issues to keep everything clear:

> Add 8/8 actuator: #5

> Thermostat not working #6

sstadlberger commented 6 years ago

More documentation is added in 65d1565762ebfa455deb6fcfab8f5695ea2dfc76 and 2bef3fc45348e3c85d8ef19efa903d609e111d47.

See here for details: Read Me