Tahoma Binding compatible with OH2

Hi,

i have installed the new component somfy izymo on/off, now the log shows:

Detected a new unsupported device: NetworkComponent
If you want to add the support, please create a new issue and attach the information below
Supported commands: { }
Device states:
{name=‘core:DeviceDefectState’, type=3, value=2,8,18}
{name=‘core:NeighboursAddressesState’, type=3, value=2,8,18}

How can the new device be recorded?

Best regards

Hi,

sorry for answering so late, I have been away for a while.
Thank you for the provided log, apparently there are no commands associated with the NetworkComponet and the states do not return much…
I do not see any added value by supporting this device, since its channels would be rather useless.
I suggest ignoring these devices in the next binding versions, sorry
Ondrej

Hey Ondrej,

no problem >there is still enough work to do …

Concerning the EnOcean Window Handle: this is not that critical for me > i will try it with the EnOcean OH2 Binding.

But i am a little concerned about the stability of the Tahoma Binding. I am running multiple devices over the Tahoma Box and i have some troubles about the reliability.

  • Rules not working stable;
  • some login troubles;
  • devices not online sporidically

Do you - or anyone else - have similar issues?

many thanks in advance for your support

regards
Christoph

Hi,

I have 10 rollershutters and 4 zwave switches and I do not face any problems.
Sorry to hear you have troubles. I’ll prepare a solution for the “too many requests” issue, but I have no idea what to do with occasional “bad credentials error”

Thanks.
Ondrej

Hi,

I have migrated the Tahoma binding to the newer API v2 (endUserAPI) which changes polling for changes and hopefully mitigates the “too many requests error”

Looking for volunteers for testing, any feedback is welcome as always.
https://www.dropbox.com/s/milfiftoww77p1e/org.openhab.binding.somfytahoma-2.5.0-SNAPSHOT.jar?dl=1

Thanks.
Ondrej

1 Like

Hi Ondrej,
Thanks for the update. Can you tell me/us where to find the most recent sources for this update? I would like to be able to debug in case of any strange behavior.

Thanks
Benjamin

Sure,

here it is.

Ondrej

I am running the latest build in a docker image.

Unfortunately, the binding fails to connect, immediately after restart I see the following error:

2019-08-04 14:47:32.293 [DEBUG] [nal.handler.SomfyTahomaBridgeHandler] - Refreshing Tahoma states...
2019-08-04 14:47:32.294 [DEBUG] [nal.handler.SomfyTahomaBridgeHandler] - Doing relogin
2019-08-04 14:47:32.317 [DEBUG] [nal.handler.SomfyTahomaBridgeHandler] - Doing login
2019-08-04 14:47:32.373 [DEBUG] [nal.handler.SomfyTahomaBridgeHandler] - Cannot get login cookie!
java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
        at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
        at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:684) ~[?:?]
    at org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaBridgeHandler.login(SomfyTahomaBridgeHandler.java:150) ~[?:?]

I seem to have both your current version and the one merged into master in my system, but have no idea how to remove the builtin one:

openhab> bundle:list -u | grep somfy
192 x Active    x  80 x 2.5.0.201908021953     x file:/openhab/addons/org.openhab.binding.somfytahoma-2.5.0-SNAPSHOT.jar
233 x Active    x  80 x 2.5.0.M1               x mvn:org.openhab.binding/org.openhab.binding.somfytahoma/2.5.0.M1

Have you tried to uninstall the bundled one in PaperUI? Or command bundle:uninstall 233?
Only one should be active… (I have even newer version)

openhab> bundle:list -u | grep somfy
288 x Active   x  80 x 2.5.0.201908030732     x file:/opt/openhab2/addons/org.openhab.binding.somfytahoma-2.5.0-SNAPSHOT.jar

I haven’t mentioned it, but the latest addon required OH2 restart since it uses the shared HttpClient optimization.

I’ll try that later tonight. My setup is fully dockerized, so a restart reloads the built-in version. I have to find a way around this…

And yes, after putting the jar into the “addons” directory, I have restarted everything. This is my usual workflow for testing bindings :smile:

I managed to uninstall the bundled one via Paper UI and afterwards restart the new binding:

openhab> bundle:list -u | grep -i somfy
192 x Active    x  80 x 2.5.0.201908021953     x file:/openhab/addons/org.openhab.binding.somfytahoma-2.5.0-SNAPSHOT.jar
openhab> bundle:restart 192

But now, I am getting the Auth-Challenge exception again:

Caused by: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

This time, I am sure that this is caused by the new implementation as this exception is thrown in SomfyTahomaBridgeHandler.java line 150 , which would be the reponse…send() in the new code.

And, which I forgot to write (:blush:), my items stay in the state INITIALIZING , even the ones I have created earlier with a things file.

I think it might be an issue with the shared http client.
Please, are you able to test this binding on a clean OH2.5M1 installation - not dockered one?
Just to create the bridge with your credentials …

thanks
Ondrej

Hello,

i can confirm this behavior (items stays in state INITIALAZING)
The bridge (Thing) and one item (Gateway status) are online but no actor (e.g.) velux blinds and shutters)

My OH2 runs on ubuntu installed via openhabian.

thanks for your effort

Hi Christoph,

thanks for feedback, apparently your bridge and gateway are initialized, so there’s no HTTP protocol violation like @hakan has. This is good.
The problem with other devices staying in INITIALIZING state might relate to performance of your OH2 installation.
Once the bridge is initialized, in the next 5 seconds the binding attempts for the first time to update other devices states (gateways and actiongroups are set to ONLINE instantly). If the bridge is not ONLINE yet (bridge becomes ONLINE once it is successfully logged in to Tahoma cloud) it is skipped and next attempt is in seconds defined by statusTimeout parameter.

I will definitely improve this, but can you confirm the value of statusTimeout configuration parameter (from a bridge thing) and check if the states get fixed after some time specified by this parameter?

in debug mode you can check the attempt of updating states by finding “Updating all states” message in openhab.log

or you can provide me your debug log, I can check the behaviour by myself.

Thank you.
Ondrej

Hi Ondrej,
thanks for your binding. I think I found an error :smile:

I have 4 Rollershutters and two window-motors…
Everything works fine, but when the windows are open and it begins to rain and the velux window clothes by it thelve, OH does not recognize it (i was waiting 30 minutes). Only if I open the tahoma app on my smartphone or if i control one of the other somfy things in OH, then also OH recognizes it.

Can you fix this ?
Regards
Jörg

Hi,

thanks for your feedback, I have some questions:

  • do you have Connexoon or Tahoma?
  • what version of binding are you having?

Updating changed states triggered by external events is a known issue, but it works for the lastest SNAPSHOT and Tahoma box. This event is not provided as a common event and the binding regulary updates it by calling getStates command (the period is defined by the bridge’s configuration parameter stateTimeout)

Thanks
Ondrej

Hi,
I have a Tahoma.
I have the 2.4.0 Binding…
I now installed the 2.5.0 Snapshot binding, but I dont know how to get the tings and configuration of it.
Regards

New version:
https://www.dropbox.com/s/milfiftoww77p1e/org.openhab.binding.somfytahoma-2.5.0-SNAPSHOT.jar?dl=1

changes:

  • things should not stay in INITIALIZING state forever
  • gateway status is correctly interpretted (does not stay ONLINE forever but reacts to real gateway state)

BTW I guess you have Connexoon gateway right?
Thanks.
Ondrej

Hi Ondrej,
I have a tahoma as I wrote :wink:

How must the config file look, when I install the snapshot ?

Hi Ondrej,

sorry for the delay. I will provide you some log entries for your usage.

I have a Tahoma Box installed.

Which version of OH2 is needed for your binding? Actually i installed 2.4. stable > may i installe the Milestone version?

thx for your work
Christoph