Giter Site home page Giter Site logo

hormann-hcp's Introduction

hormann-hcp

Experiments with the Hormann HCP bus.

Yes... this is a code experiment only, do not consider it even close to usable for anything useful yet!

Inspired by https://blog.bouni.de/posts/2018/hoerrmann-uap1/

Tested and working just fine with LineaMatic P motor and the following platform combinations:

  • Lenovo X220 laptop + USB FTDI RS232 + TTL to 485 converter module.
  • Lenovo X220 laptop + USB 485 adapter.
  • Raspberry Pi 3B plus + USB FTDI RS232 + TTL to 485 converter module.
  • Raspberry Pi 3B plus + built in UART + TTL to 485 converter module.

Test experiment responds instantly to keyboard input using this code.

Setup

Should works with any Linux serial device. Make sure kernel modules are loaded and your serial device is showing up in /dev tree.

Install git, nodejs, npm & friends, then:

git clone https://github.com/raintonr/hormann-hcp.git

cd hormann-hcp

npm install

Usage

Assumes you have a USB/RS485 dongle connected and available as /dev/ttyUSB0. If not, edit the test code to update the path for your device. Ie /dev/ttyAMA0 for Raspberry Pi built in UART (noting this requires a TTL to 485 converter).

Start the program with npm start

You then get a couple of messages like this:

Setting up port...
Opening port...

To send commands you can press the number keys 1 up to 8 on your keyboard.

Debug

Uses node debug module with prefix hormann-hcp: so enable all debugging with:

DEBUG=hormann-hcp:* npm start

hormann-hcp's People

Contributors

bouni avatar raintonr avatar

Stargazers

 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

hormann-hcp's Issues

Clear protocol description

Do you think we can describe the protocoll in either the README.md or a sepearte .md file to an extend that allows to easily understand the protocoll?

Ideally with timing graphics and detailed explanations of the pitfalls like the sync break and how to overcome them.

I'll help you with that obviously!

Usage

I strugle a bit to understand how to use the tool.

When I start it with nodejs hormann-hcp.js, I get some output:

Setting up port...
Initiating parser...
Opening port...

When I then press a number key (1 up to 8) I can set the according bit for the response to the master (the drive) which is stored in ourStatus

Sending command 4
OurStatus: 1000
Sending command 2
OurStatus: 1010
Sending command 2
OurStatus: 1000

Is it even possible to send an answer with multiple bits set at a time?
Your comment in the code says:

// Command mask for LineaMatic P:
// +------- (0x80) Unknown
//  +------ (0x40) Unknown
//   +----- (0x20) Unknown
//    +---- (0x10) Moves to 'H' (whatever that means)
//     +--- (0x08) Unknown
//      +-- (0x04) Impulse toggle
//       +- (0x02) Impulse close
//        + (0x01) Impulse open

So I guess replying with Impulse close and impulse open at the same time does not work, right?
Wouldn't it make more sense to clear ourStatus before setting the bit tha is requested by key press?

Why does master not send slave status requests?

The master does perform bus scan, and after replying to this, would have thought it would then move on to issue status requests for slaves that responded to it's scan. But this doesn't happen.

Timing with baud rate trick

@raintonr Do you have access to a logic analyzer or an oscilloscope?
I'm really interested how the signal looks when you send something using your baud rate switching trick!
If you coud provide a trace / picture that would be awesome!

Hardware Setup

Hi,

as you sucessfully communicated with the motor (#1) would you give a bit more information on your setup?
Also, do you plan on building some kind of ESP32 device that interfaces with the Hormann drives?

Feature request: output of door status

According to Bouni's protocol findings it should be possible to have the status of a door signalled. This is in fact the main reason I am so interrested in this project. Open/close the door can be done with I/O of a ESP easily but not receiving the actual status.

So can you pls. add a output to see the actual status of the door (open/closed) and maybe other infos (lightning,..) too?

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.