-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hdpowerview] All things are offline with PowerView Hub v1 #11856
Comments
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/hd-powerview-binding-connection-error/130552/5 |
@jlaur thanks for creating this bug. API Responses below: http:///api/fwversion:
http:///api/sceneCollections/: No response (error) http:///api/scheduledevents:
I can see both Scene and Scene Groups in the PowerView app. However, I can only create a Scene - not Scene Group....(not using scene feature) Automation's are available on V1 but again not actively using this feature as this is being controlled through openHAB |
@JeewanBahra - thanks a lot for reporting this, this should make me able to provide a quick fix. For Hub v2 I get the following response (formatted):
So I can use this for correctly identifying hub version, which is good news in terms of being able to deliver a proper fix. For starters I will not be able to provide Scene Group compatibility with Hub v1 as it seems they have renamed/changed that method and I don't own a v1 hub for reverse engineering. If you are using Android and able and willing to help with technical analysis, perhaps you can install Packet Capture. It will allow you to start a recording. The only thing you would need to do is open the app freshly (after having flushed it) and go to the scenes activity. Then stop recording and have a look at the requests/responses. That information may provide information about how scene groups are fetched through v1 hub. Even though the feature is deprecated now, the app will probably still try to fetch existing scene groups, at least it does for me. |
@JeewanBahra - here's a jar file for testing: I would very much appreciate feedback on:
For me, properties look like this now with a v2 hub: |
@JeewanBahra - secondly I would like to follow up on the scene group issue with v1 hub.
First of all, I would love to be able to support scene groups for v1 hub also. Secondly, automations can reference scene groups. If scene groups are not supported, this can lead to warnings being logged when fetching automations referring to unknown scene groups. A trace of the app loading scene groups would of course be really awesome, but seeing how automations referencing scene groups look like might also give enough information. |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/hd-powerview-binding-connection-error/130552/8 |
@jlaur - couple of updates; I installed the Packet Capture app and gone through the process you outlined above. However, I'm not sure I'm understanding this correctly. Is there any way that I can export and attach here? I hope I've done this correctly, I uninstalled the release version of PowerView and downloaded and placed the jar file into the 'openHAB-addons' folder. With the above - I see no errors and bridge/rollershutters are all online. Properties as follows: The PowerView app just does not allow me to create a Scene Group. However, can create a normal Scene....(maybe this is only a V2 feature?) |
@JeewanBahra - thanks for verifying the fix. From your description you installed it correctly. So if I understand you correctly, this fix resolved your issue? For the scene group reverse engineering: If you have created a capture from the PowerView: you should be able to save it to a file: If you have somehow upload/share the contents of that file, that would hopefully reveal how the app fetches scene groups, even if you don't have any. Please make sure that the file doesn't contain any information you wouldn't like to share. |
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
@jlaur - Yes, I can confirm the fix has worked perfectly - Thank you very much for this quick turnaround, it is most appreciated! :) With regards to scene groups as I've mentioned it doesn't allow me to create - as soon as I click 'New Scene Group' it just closes and goes back to Scenes. However, I attach a complete list of steps - one thing I have noticed is that the connection is always closed. I hope these are helpful in some way shape or form :( scenemember.txt |
@JeewanBahra - very useful, thanks! Can you confirm that:
From your trace, this seems to be the difference. And for v2 hub scenecollections will automatically redirect to sceneCollections, so this would make it really easy to support both versions. |
@jlaur you are absolutely correct! :D
Output below:
|
@JeewanBahra - I have uploaded a new JAR (same link), can you try this one also? It should support scene groups for v1 hub, which you won't notice unless you enable debug logging. But most importantly, this version should work with your Hub without removing support for scene groups. |
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
@jlaur downloaded the new JAR and seems to be working as expected - no errors so far :) |
@JeewanBahra, thanks a lot for all your assistance and quick feedback. Only because of that was I able to learn enough about the v1 hub to provide a quick fix for this issue. For your information: I created #11857 which directly fixes this incompatibility issue found by your captured packets. This can probably be merged sooner as it doesn't contain all the other changes with firmware information etc. I'm very happy about this fix because we were able to preserve scene group support and didn't need any firmware version conditions, so thanks again! #11853 is the "extended" fix with additional refactoring and adding firmware properties (for now just as information, but later can be used to select specific features to support). |
@jlaur, thank you for all the help and quick fixes - especially considering today is Christmas day!! Honestly greatly appreciated! Also, thank you for the clarifications around what fixes have been put in place. :) Have a great remainder of the festive period :) |
Fixes #11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Nick Waterton <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Michael Schmidt <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes #11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]>
Fixes openhab#11856 Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
This issue was reported by Jeewan Bahra in a Community post
All things are offline, but seems to still be controllable.
This is a regression of #11534 which unfortunately was tested only with a v2 hub and with an assumption about API compatibility since Scene Collections are not marked with "V2 only" in the available documentation.
Expected Behavior
Binding should work correctly for both v1 and v2 hubs.
Current Behavior
Logged:
2021-12-24 20:51:41.763 [WARN ] [ternal.handler.HDPowerViewHubHandler] - Error connecting to bridge: java.util.concurrent.ExecutionException: "java.io.EOFException: HttpConnectionOverHTTP@107dadb::SocketChannelEndPoint@108d59a{l=/192.168.1.2:35804,r=/192.168.3.226:80,ISHUT,fill=-,flush=-,to=12/0}{io=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@107dadb(l:/192.168.1.2:35804 <-> r:/192.168.3.226:80,closed=false)=>HttpChannelOverHTTP@1bd77f6(exchange=HttpExchange@183984{req=HttpRequest[GET /api/sceneCollections/ HTTP/1.1]@11cff9e[TERMINATED/null] res=HttpResponse[null 0 null]@a55162[PENDING/null]})[send=HttpSenderOverHTTP@6b9887(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d04057{s=START}],recv=HttpReceiverOverHTTP@1acb77c(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]"
Possible Solution
If scene collections are not supported by v1 hub, these channels should not be available and the binding shouldn't try to load them. If it's not possible to determine hub version, the binding should detect inability to load scene collections and stop polling.
Steps to Reproduce
Simply install and configure binding while having a v1 hub. Problem is in the bridge handler and occurs doing polling, so no actions are needed to reproduce the problem.
The text was updated successfully, but these errors were encountered: