smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 24 forks source link

Tuya binding compile failure in 4.0.x Branch #480

Closed rlarranaga closed 1 year ago

rlarranaga commented 1 year ago

Hello, I upgraded my OH install to 4.0 M2. I had the smarthomej repository installed through the UI. The smarthomej/tuya binding disappeared, so i thought to compile it manually.

When i compile, one of the test fails with the following error:

[ERROR] Failures: 
[ERROR]   ConversionUtilTest.hexColorDecodeTestOld:46 expected: <240,100,50> but was: <240,100,50.196>
[INFO] 
[ERROR] Tests run: 14, Failures: 1, Errors: 0, Skipped: 0
[INFO] 

Any ideas on how can is this a known issue in the 4.0.x branch?

Thanks

J-N-K commented 1 year ago

Thanks for reporting. This is related to a changeset that was merged this morning. I'll provide a fix tomorrow.

rlarranaga commented 1 year ago

Should third party add-on repo work on 4.0?

Thanks!

On Sat, Apr 22, 2023, 6:53 PM J-N-K @.***> wrote:

Thanks for reporting. This is related to a changeset that was merged this morning. I'll provide a fix tomorrow.

— Reply to this email directly, view it on GitHub https://github.com/smarthomej/addons/issues/480#issuecomment-1518832194, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW5CX23EA4MKQAL2PYWM3LXCRHN3ANCNFSM6AAAAAAXICVMJU . You are receiving this because you authored the thread.Message ID: @.***>

J-N-K commented 1 year ago

Use https://download.smarthomej.org/addons-snapshot.json, but don't forget to switch back to the original URL after release.

rlarranaga commented 1 year ago

Will not forget, thanks, The json service is not working for me, it appears the community marketplace its not loading properly for some reason. i will wait for the fix and see if i can recompile

J-N-K commented 1 year ago

That's another issue in openhab-core. Can you send me the the <userdata>/jsondb/org.openhab.jsonaddonservice.json and org.openhab.marketplace.json files to github@klug.nrw?

rlarranaga commented 1 year ago

Just did. Thanks

On Sun, Apr 23, 2023 at 12:32 PM J-N-K @.***> wrote:

That's another issue in openhab-core. Can you send me the the

/jsondb/org.openhab.jsonaddonservice.json file to ***@***.***? — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread.Message ID: ***@***.***>
rlarranaga commented 1 year ago

Hi,

i was able to compile the tuya binding with the last fixes.

However, i realize i also need smarthomej commons, and that fails compiling with the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project org.smarthomej.commons: MavenReportException: Error while generating Javadoc: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]

Any idea why?

Thanks

rlarranaga commented 1 year ago

Hey,

Is there any other way I could go to try and get this binding working in 4.0M2?

Thanks for your help

rlarranaga commented 1 year ago

Hello @J-N-K ,

I realized that i only sent you one of the requested files when you asked. I just sent both of them to the email address you posted before.

Let me know if you got them.

Thanks!

rlarranaga commented 1 year ago

Hello @J-N-K , I managed to compile org.smarthomej.commons by skipping the javadocs section.

My devices are all initialized now, however, none of them works (They all show as offline). The only thing that shows as online is the Cloud Project.

Looking into functionality, the devices are recognized (If i delete a device and scan , the device is automatically detected), and they definitely send some packets, as shown below:

15:40:08.939 [DEBUG] [a.internal.local.handlers.TuyaDecoder] - udpListener: Received MessageWrapper{commandType=UDP_NEW, content='DiscoveryMessage{ip='XXX.XXX.XXX.XXX', deviceId='BBBBBBBBBBBBB', active=2, ability=0, mode=0, encrypt=true, productKey='AAAAAAAAAAAAAAAA, version='3.3', token= true, wf_cfg=true}'}

I get one of those messages for each device i have on connected. However, when Openhab tries to connect, there is no response:

15:40:10.977 [DEBUG] [inding.tuya.internal.local.TuyaDevice] - BBBBBBBBBBBBBBBBB/XXX.XXX.XXX.XXX:6668: Failed to connect: connection timed out: /XXX.XXX.XXX.XXX:6668 There is also one of those messages for every device connected.

Any insights on what else can i check?

Thanks!

rlarranaga commented 1 year ago

Never mind. Power cycling all lights resolved the issue, which is a bit strange, since they were all responsive through the app (Even though i was not trying to use them through the app and through OpenHAB simultaneously.

I will wait for the repository fix, and the core fix you mentioned for OpenHAB. Please let me know if you need any more info regarding those.

Thanks!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.