openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.69k forks source link

Secant Cardio IIè Home Automation Central Unit RS-232 integration #151

Closed openhab-bot closed 6 years ago

openhab-bot commented 10 years ago

From malberto...@gmail.com on November 19, 2012 13:30:10

  1. I have a Secant Cardio IIè Home Automation Central Unit, and I want to build a KNX gateway to extend its possibilities. I know Secant RS-232 ASCII protocol and I wish to contribute to develop a plugin in order to integrate with KNX and other systems using openhab. How can we colaborate?
  2. Example: I want to turn on/off KNX controlled devices by Cardio Touch Screen, or enable Cardio security from a KNX device.

Original issue: http://code.google.com/p/openhab/issues/detail?id=151

openhab-bot commented 10 years ago

From kai.openhab on November 19, 2012 14:15:50

Have a look at http://code.google.com/p/openhab/wiki/HowToContribute We currently do not have specific documentation on how to implement a binding - for the moment the best way is therefore to have a look at how other bindings work and learn from it. Feel free to ask questions in the forum.

openhab-bot commented 10 years ago

From malberto...@gmail.com on November 21, 2012 00:58:16

O.K. I have prepared a linux VM with OpenJDK, Maven, Mercurial, Eclipse and Eclipse's App for Maven & Mercurial integration. I synced "default" branch of openhab by Eclipse Mercurial integration App, and now, I can view openhab Maven structure contents. What's the next step?

P.D. I attached Secant Cardio RS-232 ASCII protocol specs doc.

Attachment: Cardio-Communication-Protocol-Secant-2-Rev-1-0-En-2.pdf

openhab-bot commented 10 years ago

From malberto...@gmail.com on November 21, 2012 23:36:16

Excuse me. My English is not the good enought.

I had a look at openhab code, and I didn't know how to start encoding binding. Really... I didn't ever installed or run oponhub, so I don't sure to know how it works and how it can be configured. I am still reading your wiki and trying to understund it. But at the day of today, I don't yet understand the project structure, and my knowledge on Java and Maven is limited. Could you help me? Could an openhub project developer start writting the binding? So I will can understand how it is written, and I will can replicate program structures and complete and test it. Thank you very much.

openhab-bot commented 10 years ago

From kai.openhab on November 24, 2012 13:13:54

Thomas is working on a Maven archetype, which creates a binding skeleton as a starting point for a new binding. Furthermore we will work on a wiki page that explains the main points about writing a binding. If you can wait for a few more weeks, these things might help you to get a start.

openhab-bot commented 10 years ago

From malberto...@gmail.com on November 25, 2012 23:11:19

That is great! Of course... I can wait. Thank you very much.

openhab-bot commented 10 years ago

From teichsta on April 30, 2013 07:52:39

fyi: the maven archetype is available meanwhile. See http://code.google.com/p/openhab/source/browse/bundles/archetype/org.openhab.archetype.binding/README.txt for details who to use it.

openhab-bot commented 10 years ago

From malberto...@gmail.com on May 08, 2013 02:20:55

I can not build the maven archetype. The openHAB version in mercurial repository is 1.3.0-SNAPSHOT, and maven metadata found is for 1.2.0-SNAPSHOT.

openhab-bot commented 10 years ago

From teichsta on May 21, 2013 14:29:24

Owner: ---

openhab-bot commented 10 years ago

From malberto...@gmail.com on June 25, 2013 00:56:21

I can still not build binding. I attached the binding by maven archetype generation error log file.

Attachment: mvn archetype generate error log.txt

openhab-bot commented 10 years ago

From teichsta on June 25, 2013 11:39:56

i updated the version of the pom and removed the hardcoded bundle-version in MANIFEST.MF could you try again?

you should also use an capitalised binding name, since this name is used to generate the new classes. The get's lowercased where it's needed. The call should look like this (after installing the artifact to your local mvn repository).

mvn archetype:generate -B -DarchetypeGroupId=org.openhab.archetype -DarchetypeArtifactId=org.openhab.archetype.binding -DarchetypeVersion=1.3.0-SNAPSHOT -Dauthor="Manuel Alberto Guerrero Díaz" -Dversion=1.3.0 -DartifactId=org.openhab.binding.cardio2e -Dpackage=org.openhab.binding.cardio2e -Dbinding-name=Cardio2e -X -e

Hope this helps,

Thomas E.-E.

openhab-bot commented 10 years ago

From malberto...@gmail.com on June 26, 2013 05:02:39

Thanks for your answer. I used an capitalised binding name, such you suggested. Generation still fails. I attached generation log.

Attachment: mvn archetype generate error log 2.txt

openhab-bot commented 10 years ago

From teichsta on June 26, 2013 05:55:23

hm, that works me. Did you issue an "mvn clean install" in the directory:

/openhab/bundles/archetype/org.openhab.archetype.binding
openhab-bot commented 10 years ago

From malberto...@gmail.com on July 10, 2013 03:21:57

Sorry. Excuse me, but I still can not to build archetype. I made "mvn clean install" as you suggested and tried again: ERROR.

I attached last error log.

Attachment: mvn archetype generate error log 3..txt

openhab-bot commented 10 years ago

From teichsta on July 10, 2013 05:43:02

Please follow the following steps:

openhab-bot commented 10 years ago

From malberto...@gmail.com on October 08, 2013 06:04:19

Excuse me. I had a lot of job and can not do a new try before.

I exactly did wiki instructions in a clean new OpenSuSE 12.3 x64 virtual machine with Oracle Java 1.7.0u40 JDK, lasted Yoxos 5.6 openHab Eclipse IDE and lastest Maven 3.1.0 installed. I cloned lastest project from new GIT 1.4.0-SNAPSHOT repository into ~/workspace/openhab. I removed ~/m2 directory (not exist yet) I executed "maven clean install" in ~/workspace/openhab/bundles/archetype/org.openhab.archetype.binding -> SUCESS I executed "mvn archetype:generate -B -DarchetypeGroupId=org.openhab.archetype -DarchetypeArtifactId=org.openhab.archetype.binding -DarchetypeVersion=1.3.0-SNAPSHOT -Dauthor="Manuel Alberto Guerrero Díaz" -Dversion=1.3.0 -DartifactId=org.openhab.binding.cardio2e -Dpackage=org.openhab.binding.cardio2e -Dbinding-name=Cardio2e -X -e" in ~/workspace/openhab/bundles/binding -> FAILED

I surrender. Can not build archetype. And I cannot attach lastest mvn archetype generate error log: Issue attachment storage quota exceeded.

openhab-bot commented 10 years ago

From kai.openhab on October 12, 2013 12:39:40

Try now with the very latest version on GitHub and version 1.4.0-SNAPSHOT - I have just pulled a change to fix the archetypes: https://github.com/openhab/openhab/pull/37

openhab-bot commented 10 years ago

From teichsta on November 05, 2013 14:47:54

Labels: To-Github

magd1978 commented 10 years ago

Thank you for reopen te issue. I will try again to clean environment, to clone git repository, to make maven clean install and to generate archetype.

magd1978 commented 10 years ago

Generation sucessfully!!! Thank you at all!! Next step: to write the binding...

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] openHAB Bindings .................................. SUCCESS [5.124s] [INFO] openHAB Bluetooth Binding ......................... SKIPPED [INFO] openHAB KNX Binding ............................... SKIPPED [INFO] openHAB KNX Binding Tests ......................... SKIPPED [INFO] openHAB Serial Binding ............................ SKIPPED [INFO] openHAB 1-Wire Binding ............................ SKIPPED [INFO] openHAB Wake-on-LAN binding ....................... SKIPPED [INFO] openHAB NetworkHealth Binding ..................... SKIPPED [INFO] openHAB Exec Binding .............................. SKIPPED [INFO] openHAB Exec Binding Tests ........................ SKIPPED [INFO] openHAB HTTP Binding .............................. SKIPPED [INFO] openHAB HTTP Binding Tests ........................ SKIPPED [INFO] openHAB Hue Binding ............................... SKIPPED [INFO] openHAB Fritzbox Binding .......................... SKIPPED [INFO] openHAB NTP Binding ............................... SKIPPED [INFO] openHAB MPD Binding ............................... SKIPPED [INFO] openHAB VDR Binding ............................... SKIPPED [INFO] openHAB Asterisk Binding .......................... SKIPPED [INFO] openHAB SNMP Binding .............................. SKIPPED [INFO] openHAB Sonos Binding ............................. SKIPPED [INFO] openHAB ConfigAdmin Binding ....................... SKIPPED [INFO] openHAB Novelan Heatpump Binding .................. SKIPPED [INFO] openHAB Cups Binding .............................. SKIPPED [INFO] openHAB IHC / ELKO LS Binding ..................... SKIPPED [INFO] openHAB TCP/UDP Binding ........................... SKIPPED [INFO] openHAB Plugwise Binding .......................... SKIPPED [INFO] openHAB Modbus Binding ............................ SKIPPED [INFO] openHAB PLCBus Binding ............................ SKIPPED [INFO] openHAB DMX Binding ............................... SKIPPED [INFO] openHAB OLA inteface for DMX Binding .............. SKIPPED [INFO] openHAB lib485 interface for DMX Binding .......... SKIPPED [INFO] openHAB artnet interface for DMX Binding .......... SKIPPED [INFO] openHAB DMX Binding Tests ......................... SKIPPED [INFO] openHAB RFXCOM Binding ............................ SKIPPED [INFO] openHAB Samsung TV Binding ........................ SKIPPED [INFO] openHAB Pulseaudio Binding ........................ SKIPPED [INFO] openHAB Homematic Binding ......................... SKIPPED [INFO] openHAB Homematic Binding Tests ................... SKIPPED [INFO] openHAB Koubachi Binding .......................... SKIPPED [INFO] openHAB Onkyo Binding ............................. SKIPPED [INFO] openHAB OpenPaths Binding ......................... SKIPPED [INFO] openHAB Somfy URTSI II Binding .................... SKIPPED [INFO] openHAB OpenSprinkler Binding ..................... SKIPPED [INFO] openHAB Epson projector Binding ................... SKIPPED [INFO] openHAB ComfoAir Binding .......................... SKIPPED [INFO] openHAB OWServer Binding .......................... SKIPPED [INFO] openHAB DigitalSTROM Binding ...................... SKIPPED [INFO] openHAB Squeezebox Binding ........................ SKIPPED [INFO] openHAB MQTT Binding .............................. SKIPPED [INFO] openHAB mqtt Binding Tests ........................ SKIPPED [INFO] openHAB Mqttitude Binding ......................... SKIPPED [INFO] openHAB Milight Binding ........................... SKIPPED [INFO] openHAB Systeminfo Binding ........................ SKIPPED [INFO] openHAB Piface Binding ............................ SKIPPED [INFO] openHAB Fritz AVM Home Automation Binding ......... SKIPPED [INFO] openHAB Tinkerforge Binding ....................... SKIPPED [INFO] openHAB Nibe heat pump Binding .................... SKIPPED [INFO] openHAB ZWave Binding ............................. SKIPPED [INFO] openHAB Nikobus Binding ........................... SKIPPED [INFO] openHAB Nikobus Binding Tests ..................... SKIPPED [INFO] openHAB EnOcean Binding ........................... SKIPPED [INFO] openHAB enocean Binding Tests ..................... SKIPPED [INFO] openHAB Swegon ventilation Binding ................ SKIPPED [INFO] openHAB MaxCube Binding ........................... SKIPPED [INFO] openHAB MAX!Cube Binding Tests .................... SKIPPED [INFO] openHAB tivo Binding .............................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3:55.656s [INFO] Finished at: Thu Dec 12 11:19:09 CET 2013 [INFO] Final Memory: 175M/495M [INFO] ------------------------------------------------------------------------

sja commented 9 years ago

Whats the state of this binding? Have you made any progress?

teichsta commented 9 years ago

since there were for more than one year i'd like to close this issue soon …

magd1978 commented 9 years ago

Sorry. I have had no time to develop the binding.

I'm sketched the schema of the class that it should encode / decode the RS-232 stream, but I don't have a finish date.

If you must to close... O.K. I will understand. When the main classes will be completed, I will contact you again to resume binding, and then I will ask for you help to complete binding.

Thank you very much for your patience.

magd1978 commented 9 years ago

On the other hand , if another contributor who has time can program the code , I could collaborate doing necessary testing and final adjustments. I can send you an official PDF document with Cardio IIè RS-232 protocol.

magd1978 commented 9 years ago

Some progress... I just sucessfully sent commands from a java testing enviroment to Cardio without Cardio hungs. I also recived Cardio responses. Next step: encode / decode Cardio telegrams and parsing to structured data.

magd1978 commented 9 years ago

More progress... Completed encode / decode Cardio telegrams and parsing to structured data. Next step: connect to openhub bus.

magd1978 commented 9 years ago

I don't know very well the internal architecture of openhab . I'm trying to finish the binding, but I'm not quite sure how to initialize and connecting to the bus. I have reviewed other bindings but do not see it clear, and would appreciate some help. Thank you in advance.

teichsta commented 9 years ago

but I'm not quite sure how to initialize and connecting to the bus.

could you elaborate a bit on this? This statement is quite generic …

magd1978 commented 9 years ago

Excuse me. I am not sure of how to develop archetype auto generated classes in order to parse Cardio2è received messages to openhab bus, and openhab bus to Cardio2è. I do not know internal openhab structure. I will try to copy and adapt code from others bindings but I noticed each one is developed differently, with common parts that I have not yet "deciphered". When I have a bit of time, I will work ahead.

magd1978 commented 9 years ago

Here I am again. Sorry for the delay. I'm still working on it ... slowly but surely. Any suggestions for compatibility with the new version 2.0? Thank you.

magd1978 commented 8 years ago

Hello. I think the base of the binding is finished. Now I can control Cardio 2è lights y relays from openHab project, and receive states. Next step is integrate other functions like shutters, HVAC, security or scenarios.

Could I send you my work for check it? I'm not sure how to generate javadoc documentation you ask. The Cardio 2è RS-232 communication is asyncronous, but I have to create two internal timers in order to control Cardio 2è RS-232 data flow (I need to make a few milliseconds pause between two sent telegrams, and I need block any sending while Cardio is answering and up to few milliseconds after). I hope you will validate this.

Thank you in advance.

magd1978 commented 8 years ago

Hello.

The binding is almost finished. Only HVAC control integration is left.

I took several months testing and debugging it in a Cardio 2è installed in my own home, and the binding seems stable.

When it is fully completed, I will ask you for instructions about necessary javadoc documentation, validation and post to repository.

Thank you in advance.

ericc514 commented 7 years ago

I would be very interested in your work on the Cardio 2e, magd. keep posting on your progress.

magd1978 commented 7 years ago

I still working on It. I completed HVAC fuctions. I need test lastest aditions and I want to rewrite some parts in order to optimize and speed up Cardio 2è communications. At this moment I have not much free time, so the development goes slowly. I will write about news. Thanks for your interest.

magd1978 commented 7 years ago

Project status: I have fixed several bugs and optimized communications. I have to implement some minor improvements and document everything.

magd1978 commented 7 years ago

The tests on the Cardio 2e into my own house are being satisfactory. I am now working on a possible time synchronization, because the internal clock of the Cardio usually delays. After this point I will give the development to finished and I will dedicate to generate JavaDoc. Once the complete documentation is finished I will upload the first build to the repository.

magd1978 commented 7 years ago

Hello!!

I am testing the date and time synchronization code it on the Cardio 2e into my own house. I think it works fine.

I have worked in this binding, in my free, for more than 3 years; and I think I've finally finished development!!

Next week I want start to generate JavaDoc, in order to match openhab community requeriments. Once the complete documentation is finished I will upload the stable build to the repository.

9037568 commented 7 years ago

Fabulous!

I'd like to suggest that you upload and create your PR now. That way the code review can begin while you're working on the documentation.

magd1978 commented 7 years ago

O.K. Let me clean the code a little bit, and I will upload it as soon as I learn how to do it. It's the first open source project, and I have not used github before.

magd1978 commented 7 years ago

Excuse me my inexperiency. I created a new github repository with de binding: https://github.com/magd1978/org.openhab.binding.cardio2e How to proceed? Shall I do a pull request at https://github.com/openhab/openhab1-addons/pulls? How do I do it?

Thank you in advance.

9037568 commented 7 years ago

The first thing you'll need to do is fork the OH1 repository: image

Once you've done that, you can push your changes into that repository, and then you can create a pull request from those changes.

hakan42 commented 7 years ago

Please do not forget to create a branch in your local fork before committing your sources. A pull request from your "master" branch is very hard to do.

On the shell:

git checkout -b secant-binding

Or some similar name, only important thing is that you work on a branch.

magd1978 commented 7 years ago

Thank you very much.

I did the fork. The binding is uploaded at magd1978/openhab1-addons/tree/master/bundles/binding/org.openhab.binding.cardio2e (branch cardio2e-binding).

I also deleted wrong repository magd1978/org.openhab.binding.cardio2e that I created yesterday.

By the way. Where can I leave the settings that would go into openhab.cfg? Attached is an extract from my file openhab.cfg, where are the binding configurations.

org.openhab.binding.cardio2e_openhab.cfg.zip

hakan42 commented 7 years ago

The file should be checked in into the directory

features/openhab-addons-external/src/main/resources/conf

and then referenced from

features/openhab-addons-external/pom.xml

You can use openhabcloud.cfg and voicerss.cfg in those directories as examples.

magd1978 commented 7 years ago

Thanks for your suggestion! It's done.

ericc514 commented 7 years ago

Any idea on when this will be integrated into the dowloadable addons (kar file) thanks

magd1978 commented 7 years ago

Sorry for delay. Lately I am very busy with family matters and I do not find the time to dedicate to the binding. I am waiting to make some changes that the openhab community has asked for. After this, if the pull request is accepted, I suppose I could upload the JAR to the repository. However, if the openhab community allow me to share it in advance, I can upload the latest JAR compilation to Dropbox and share the link in order you can test it.

JPCoollink commented 7 years ago

Salut Jai aussi un cardio à la maison et ça m'intéresse ton truc. C'est quoi ça prend pour faire le setup? J'ai installer HAP NodeJs sur un ChIp et un Pi et ça serait Nice d'interfacer le cardio avec HaP pour utiliser avec iphone home kit.

magd1978 commented 7 years ago

I have openHab 1 installed on a Raspberry Pi 1B connected to the Cardio via a USB <-> RS232 Prolific PL-2302 adapter. I have not yet tested binding compatibility with openHab 2. I would like someone in the openHab community to tell me where I can upload a binding JAR in its current state so that it can be tested. I can put a link to Dropbox, but I do not know if it's the right thing to do.

magd1978 commented 7 years ago

Traduit avec Google: J'ai installé openHab 1 dans un Raspberry Pi Cardio 1B connecté à l'adaptateur par l'intermédiaire d'un port USB <-> RS232 Prolific PL-2302. Je n'ai pas encore testé la compatibilité de la liaison avec openHab 2. Je souhaite que quelqu'un de la communauté openHab me indiquer où je télécharge un fichier JAR obligatoire dans son état actuel afin que vous puissiez essayer. Je peux mettre un lien vers Dropbox, mais je ne sais pas si c'est la bonne chose.

9037568 commented 7 years ago

You can attach your file here if you rename it from .jar to .zip. Otherwise, linking to it on a file share like Dropbox is fine.