Hop til indhold

Recommended Posts

Hej

 

Jeg er ved at sætte OpenHAB op på min Beaglebone Black med det formål at få den til at kommunikere med IHC selvfølgelig.

Jeg har dog nogle problemer med at få den IHC binding i OpenHAB til at virke mht. det certificat som IHC kører med og som OpenHAB (Java) har brug for for at komme i kontakt med IHC controlleren.

Jeg kan se i en anden tråd: http://www.ihc-user.dk/forum/topic/2589-ihc-m-bus-nilan-og-dantherm-ventilation/ at Mikkel_K ser ud til at have fået det til at virke. Så derfor var jeg lidt interesseret i at få lidt guide til hvordan det er gjort.

Specifikt kan OpenHAB ikke finde det certificat som jeg ellers har lagt ind via keytool. Jeg tror dog at den kommando jeg bruger til det ikke er helt fuldstændig. Det  jeg er mest i tvivl om er de parametre der skal med og måske mest specifikt -keystore hvor/hvad det skal være når det er på BBB og Ångstrøm linux.

 

På forhånd mange tak

VH

Jesper

Link til kommentar
Del på andre sites

Hej Alle

 

Jeg tror efter megen søgen på nettet at jeg selv kan svare på denne  :) .

Man skal med sit keytool skrive til det cacerts store der ligger under /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts.

Default password til den er "changeit".

Så hele kommandoen kommer til at hedde noget med:

./keytool -importcert -alias ihc -keystore /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts -file "sti til LKIHCController"

 

Held og lykke til dem der ellers skal i gang med dette

 

VH

Jesper

Link til kommentar
Del på andre sites

Hej,

 

Inspireret af denne tråd har jeg installeret openHAB og konfigureret den til at snakke med min IHC installation. Det er lykkedes mig at få openHAB til at tænde en af mine lamper, men jeg kan ikke få openHAB til at slukke den igen uden at bruge openHAB CLI'en.

 

Er der nogen der ligger inde med en items konfigurations fil der virker med IHC, samt de relevante dele af IHC projekt filen ?

 

vh

Morten

Link til kommentar
Del på andre sites

Hi Morten

 

You have been more succesfull than I have. Thus I have not even been able to make OpenHAB react on my IHC even though I use the 1.3.0 snapshot version.

it gives me an error:

 

14:27:44.464 ERROR o.o.b.ihc.internal.IhcBinding[:675] - Exception 
java.lang.NullPointerException: null
at org.openhab.binding.ihc.utcs.IhcClient.resourceQuery(IhcClient.java:748)
at org.openhab.binding.ihc.utcs.IhcClient.getResourceValueInformation(IhcClient.java:786)
at org.openhab.binding.ihc.internal.IhcBinding.internalReceiveCommand(IhcBinding.java:636)
at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:116)
at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:62)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
 
My conclusion is that I'm not that good at finding the correct ID in the .vis file.
 
Could I maybe make you help me point out the right ID to pick:
 
<product_dataline id="_0xf653" product_identifier="_0x2202" name="Lampeudtag" locked="yes" icon="_0x86" note="Lampeudtag rund ø80 mm" position="Loft østvæg nord" cabletype="3x1,5mm2 NOIKJ">
            <dataline_output id="_0xf75b" name="Udgang" backup="yes" address_dataline="_0x51" cable_colour="Rød">
               <link_to_resource id="_0x12182c" name="Følg Link" icon="_0x4a" link="_0x12172d"/>
               <link_to_resource id="_0x45152c" name="Følg Link" icon="_0x4a" link="_0x45142d"/>
            </dataline_output>
            <scenes id="_0xf849" name="Scenarier" scene_resource="_0xf75b"/>
         </product_dataline>
This is the bit from my .vis file.
 
I have tried the id="_0xf653" (without the "_"), the link="_0x12172d" (also without the "_"). I have tried different outputs but without any succes. I'm probably using the wrong id's
 
Thanks in advance.
Regards Jesper
Link til kommentar
Del på andre sites

Hi again Morten

 

I think that the answer that Pali comes with could solve it for you - there apparently were an error regarding this. I use this version now and I can make it work both ways.

But what is that CLI that you are able to use?

 

To add to my previous input then the demo.items file that I use is just the default demo one and then I just added this:

 

Switch Light_FF_Corridor_Wall "Wall" (FF_Corridor, Lights) {ihc="0x12182c"}

 

I don't know if that makes sense to anybody?

 

Regards Jesper

 

P.S. In order to let Pali join in on the OpenHAB inputs then we might keep the inputs in English - my guess would be that we are better in English than Pali is in Danish.  :)

Link til kommentar
Del på andre sites

Hi Again

 

Hmm. I now made it work with a LED button switch. I wonder why that worked. I will crack on  :) .

 

Aahh. Now even I get it. You have to use the output id eg:

 

<product_dataline id="_0xf653" product_identifier="_0x2202" name="Lampeudtag" locked="yes" icon="_0x86" note="Lampeudtag rund ø80 mm" position="Loft østvæg nord" cabletype="3x1,5mm2 NOIKJ">
            <dataline_output id="_0xf75b" name="Udgang" backup="yes" address_dataline="_0x51" cable_colour="Rød">
               <link_to_resource id="_0x12182c" name="Følg Link" icon="_0x4a" link="_0x12172d"/>
               <link_to_resource id="_0x45152c" name="Følg Link" icon="_0x4a" link="_0x45142d"/>
            </dataline_output>
            <scenes id="_0xf849" name="Scenarier" scene_resource="_0xf75b"/>
         </product_dataline>

 

Hope this helps somebody other than me.

 

Regards

Jesper

Link til kommentar
Del på andre sites

Binding support both hexadecimal and decimal resource id's. Hexadecimal value is with 0x prefix (without _ character).

 

0x97e00a = 9953290

 

ihc="0x97e00a" or ihc="9953290"

 

OpenHAB item type  <=>  resource id from project file (from .vis file)

 

Switch      <=>  <dataline_input id="_0x3f295a" … >

Switch      <=>  <dataline_output id="_0x3ce35b" … >

 

Switch      <=>  <airlink_input id="_0x5b555c" … >

Dimmer    <=>  <airlink_dimming id="_0x3ec5d" … >

 

Switch      <=>  <resource_flag id="_0x97e00a" … >

Number    <=>  <resource_temperature id="_0x3f4d14"

Number    <=>  <resource_timer id="_0x97de10" … >

Number    <=>  <resource_counter id="_0x97df0c" … >

Number    <=>  <resource_weekday id="_0x97e109" … >

Number    <=>  <resource_light_level id="_0x97dc13" … >

Number    <=>  <resource_integer id="_0x97e20b" … >

DateTime  <=>  <resource_time id="_0x97db0d" … >

DateTime  <=>  <resource_date id="_0x97dd0e" … >

String        <=>  <resource_enum id="_0x98050f" … >

 

I probably should add this information also on ihc binding wiki page.

 

You could control inputs and outputs, but also any other resources on ihc controller.

 

One example...if you want to have outdoor temperature to be available on ihc controller, but you don't have temperature sensor on outdoor. You can use http binding to fetch temperature from internet and the use ihc binding to update temperature to ihc controller.

 


Firstly you need to add temperature variable to any/new function block:

 

e.g.

<functionblock id="_0x97d228" name="Test block" ...>

   …

   <resource_temperature id="_0x97e314" name="Outdoor temperature"/>

   …

</functionblock>

 

Then fetch temperature via http binding (e.g. ones per every 60 seconds) and update temperature to ihc controller:

 


Number Weather_Temperature "Temperature [%.1f ¬∞C]"  <temperature>  (Wetter) { http="<[http://weather.yahooapis.com/forecastrss?w=638242&u=c:60000:XSLT(demo_yahoo_weather.xsl)]", ihc=">0x97e314" }

 

Now you can use outdoor temperature on ihc function blocks.

 

Hopefully this information was heplful.

 

Regards,

Pali
Link til kommentar
Del på andre sites

Binding support both hexadecimal and decimal resource id's. Hexadecimal value is with 0x prefix (without _ character).
 
0x97e00a = 9953290
 
ihc="0x97e00a" or ihc="9953290"
 
OpenHAB item type  <=>  resource id from project file (from .vis file)
 
Switch      <=>  <dataline_input id="_0x3f295a" … >
Switch      <=>  <dataline_output id="_0x3ce35b" … >
 
Switch      <=>  <airlink_input id="_0x5b555c" … >
Dimmer    <=>  <airlink_dimming id="_0x3ec5d" … >
 
Switch      <=>  <resource_flag id="_0x97e00a" … >
Number    <=>  <resource_temperature id="_0x3f4d14"
Number    <=>  <resource_timer id="_0x97de10" … >
Number    <=>  <resource_counter id="_0x97df0c" … >
Number    <=>  <resource_weekday id="_0x97e109" … >
Number    <=>  <resource_light_level id="_0x97dc13" … >
Number    <=>  <resource_integer id="_0x97e20b" … >
DateTime  <=>  <resource_time id="_0x97db0d" … >
DateTime  <=>  <resource_date id="_0x97dd0e" … >
String        <=>  <resource_enum id="_0x98050f" … >
 
I probably should add this information also on ihc binding wiki page.
 
You could control inputs and outputs, but also any other resources on ihc controller.
 
One example...if you want to have outdoor temperature to be available on ihc controller, but you don't have temperature sensor on outdoor. You can use http binding to fetch temperature from internet and the use ihc binding to update temperature to ihc controller.
 

Firstly you need to add temperature variable to any/new function block:
 
e.g.
<functionblock id="_0x97d228" name="Test block" ...>
   …
   <resource_temperature id="_0x97e314" name="Outdoor temperature"/>
   …
</functionblock>
 
Then fetch temperature via http binding (e.g. ones per every 60 seconds) and update temperature to ihc controller:
 
Number Weather_Temperature "Temperature [%.1f ¬∞C]"  <temperature>  (Wetter) { http="<[http://weather.yahooapis.com/forecastrss?w=638242&u=c:60000:XSLT(demo_yahoo_weather.xsl)]", ihc=">0x97e314" }
 
Now you can use outdoor temperature on ihc function blocks.
 
Hopefully this information was heplful.
 
Regards,
Pali

Hi Pali

 

Super information.

Thanks a bunch.

This for sure is very helpfull when trying to explorer what one can do with the binding.

 

Regards

Jesper

Link til kommentar
Del på andre sites

  • 1 month later...

Hej Jesper

 

Fik du Openhab til at køre på Beaglebone ? Jeg har lige brugt lidt tid på at få demo'en (redigeret med ihc udgange) til at virke på pc'en og har nu flyttet det over på en raspberry pi. Det ser ud til at virke, det tager dog ca 5min inden det er startet op. FreeTTS virker ikke.

Bliver sjovt at få det testet stabiliteten :-)

 

Hilsen Kim

Link til kommentar
Del på andre sites

Hej Jesper

 

Fik du Openhab til at køre på Beaglebone ? Jeg har lige brugt lidt tid på at få demo'en (redigeret med ihc udgange) til at virke på pc'en og har nu flyttet det over på en raspberry pi. Det ser ud til at virke, det tager dog ca 5min inden det er startet op. FreeTTS virker ikke.

Bliver sjovt at få det testet stabiliteten :-)

 

Hilsen Kim

 

Jeg har haft det kørende den sidste måneds tid uden de store problemer.

 

Eneste problem som jeg har set er at status for en af mine IHC udgange er forkert når jeg starter Openhab op. Men dette kan løses med en update kommando fra openhab cli'en.

 

/Morten

Link til kommentar
Del på andre sites

Hi Kim and Morten

 

I will keep this in english as Pali will be able to follow as well.  :)  He knows a lot about this  :) .

 

Yes I have had it working for some month now it works fine with Sonos and IHC and it runs on my Beagle Bone Black.

I have only had to restart it ones - I don't know why it didn't work but the services had just stopped working.

I haven't seen anything regarding any outputs having the wrong status but I will keep my eyes open.

 

The issues I have is that it is quite slow on my Beagle bone black.

If I just start it up with my rules and items files in the folders it can't start up. It goes into some kind of deadlock and just doesn't ever start.

What I have done about that is that I start it up with out the files in the folders and then copy the files in afterwards. Quite cumbersome but it makes it work.

The other thing - it might be related - is that the response time from when I press an IHC button until my Sonos react is about 6 or 7 seconds.

 

I have tried to have it running on a windows Asus EEEPC as well - it gave the same results. On my mac air it runs perfectly.

 

Does any of you see this kind of behaviour?

 

Thanks in advance

 

Regards Jesper

Link til kommentar
Del på andre sites

Have you installed all openhab binding or only those which you are using? 

 

I encourage to ask also from openhab forum, because there is more people which are running openhab on embedded devices like raspberry pi, maybe also on beagle bone. 

 

There is also issue open about to strip down more core services to make openhab lighter for embedded devices. 

 

Regards,

Pali

Link til kommentar
Del på andre sites

  • 6 months later...

Hi

 

Kim can you give a short guide to how you got i to work on the Raspberry?

 

The sonos binding works fine for me, but i can't get the ihc binding to work.

 

The ihc binding also works fine on my windows pc, but when i try to start it on the raspberry, i just get the following:

 

pi@raspberrypi ~/openhab $ sudo ./start.sh
Launching the openHAB runtime...
osgi> 00:09:50.841 INFO  o.o.c.internal.CoreActivator[:92] - openHAB runtime has been started (v1.3.1).
00:10:26.588 INFO  o.o.m.c.i.ModelRepositoryImpl[:99] - Loading model 'test.items'
00:10:35.225 INFO  o.o.i.s.i.DiscoveryServiceImpl[:92] - mDNS service has been started
00:10:42.865 INFO  o.o.m.c.i.ModelRepositoryImpl[:99] - Loading model 'test.sitemap'
00:10:57.579 INFO  o.o.i.r.i.RESTApplication[:158] - Started REST API at /rest
00:11:03.592 INFO  o.o.u.w.i.s.WebAppServlet[:99] - Started Classic UI at /openhab.app
00:11:18.138 INFO  o.o.b.i.internal.IhcConnection[:139] - Connecting to IHC / ELKO LS controller [iP=192.168.1.20' Username='admin' Password='pass].
00:11:23.928 ERROR o.o.b.i.internal.IhcConnection[:188] - Connection to IHC / ELKO LS controller failed.
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
        at sun.security.ssl.InputRecord.read(InputRecord.java:505)
00:11:24.032 INFO  o.o.c.s.AbstractActiveService[:189] - IHC / ELKO LS refresh and notification listener service has been started
00:12:02.482 INFO  o.o.i.r.i.RESTApplication[:174] - Stopped REST API
00:12:06.826 INFO  o.o.u.w.i.s.WebAppServlet[:110] - Stopped Classic UI
 
Any idea of what could be wrong?
 
Thanks 
Stefan
Link til kommentar
Del på andre sites

Yes, i'm using the same config file on both windows and the raspberry.

On windows it works, but on the raspberry it dosen't.

 

The ssh certificate that i imported into the keystore on the raspberry is the same file as i used on the pc. Can that be the problem? That the was exported from a browser in windows, and copied on to the raspberry?

Link til kommentar
Del på andre sites

 Share

×
×
  • Tilføj...

Important Information

Privatlivspolitik og We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

1200x630bb.png

ok