Fix incorrect link handling of inline MD images

Summary
As of MM-12898, inline markdown images open the image preview modal, except if the markdown image itself is a link. e.g. [![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform).
This PR fixes the following bug:
For a case like ![image](https://www.mattermost.org/wp-content/uploads/2016/03/logoHorizontal.png) an image plus some text that has [a link](http://somelink)
Observed behavior: The image doesn't have a pointer cursor, and doesn't open the preview modal
Expected behavior: The image should have a pointer cursor and open the preview modal
Reason of wrong behavior: just because there is a link ([a link](http://somelink)) in the markdown, it falsely assumed that the image itself is actually a link - which is not the case in the example given above
The bug is not a regression, it is a missed case since the implementation of MM-12898, but was only discovered after MM-15232, MM-18158. The issue can be reproduced on community V5.18 and latest master. The bug is not limited to channel header descriptions or its associated system messages, and can be reproduced in regular chat messages as well.
Ticket Link
Not created yet (Sudheer will create it)
Screenshots
Before the fix

After the fix

Creating a new SpinWick test server using Mattermost Cloud.

Mattermost test server created! :tada:
Access here: https://mattermost-webapp-pr-4543.test.mattermost.cloud

Account Type
Username
Password

Admin
sysadmin
Sys@dmin123

User
user-1
User-1@123

Test server destroyed

This issue has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!
/cc @jasonblais @hanzei

/update-branch

Will try to auto merge this PR once all tests and checks are passing. This might take up to an hour.

This can be cherry-picked to v5.19 as long as it's not risky. @sudheerDev

/cherry-pick release-5.19

Error trying doing the automated Cherry picking. Please do this manually
+++ Updating remotes...
Fetching upstream
Fetching origin
+++ Updating remotes done...
+++ Creating local branch automated-cherry-pick-of-#4543-upstream-release-5.19-1578335234
Branch 'automated-cherry-pick-of-#4543-upstream-release-5.19-1578335234' set up to track remote branch 'release-5.19' from 'upstream'.
+++ Downloading patch to /tmp/4543.patch (in case you need to do this again)

+++ About to attempt cherry pick of PR. To reattempt:
  $ git am -3 /tmp/4543.patch

Applying: Fix incorrect link handling of inline MD images
Using index info to reconstruct a base tree...
M	utils/__snapshots__/message_html_to_component.test.jsx.snap
M	utils/message_html_to_component.jsx
M	utils/message_html_to_component.test.jsx
Falling back to patching base and 3-way merge...
Auto-merging utils/message_html_to_component.test.jsx
CONFLICT (content): Merge conflict in utils/message_html_to_component.test.jsx
Auto-merging utils/message_html_to_component.jsx
CONFLICT (content): Merge conflict in utils/message_html_to_component.jsx
Auto-merging utils/__snapshots__/message_html_to_component.test.jsx.snap
Patch failed at 0001 Fix incorrect link handling of inline MD images
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

+++ Conflicts detected:

UU utils/message_html_to_component.jsx
UU utils/message_html_to_component.test.jsx

+++ Aborting in-progress git am.

+++ Returning you to the master branch and cleaning up.

@amyblais will manually cherrypick


Create a system based on the Reversionary Rights site

Build the site from a Google Sheet.

@robmyers Text complete for the landing page, FAQ page. https://docs.google.com/document/d/1toG-WxUBr4qvCiQiX8Fi00Tf2QQnHVo_KEM3OlKeezs/edit?usp=sharing
Opening separate issue for contributions forms and formate of case law and scholarship pages.


description says "similar too the combat snapshots" however it's not similar at all (modrinth)

first the combat test snapshots have a 1 tick delay if you hold, which doesn't seem to be in the mod (correct me if I am wrong)
auto bow (bow, crossbow, trident) don't exist in cts at all
"Prevents you from hitting blocks" (also not a thing in cts_
"Attack enemies through obstructions (similar to CleanCut Mod)" if those obstructions mean grass and stuff this is indeed like cts
I would request reomving the combat test snapshot from the description or make it actually similar too cts if you would like any help with that we (the cts community could help you)
https://discord.gg/ee7vWmUYZN <-- cts network where we could help

Hey, thanks for the feedback! Some points that I would like to explain:
Hello, I think it would be possible to implement some of the things you mentioned, like the 1 tick delay.
The "prevent hitting blocks" feature can be turned off with the "H" key (possibly, the default configuration be off in the future). This way the average player could experience it normally.

Hey, thanks for the feedback! Some points that I would like to explain:
I think it would be possible to implement some of the things you mentioned, like the 1 tick delay.
The prevent hitting blocks feature can be turned off with the "H" key (possibly, the default configuration be off in the future). This way the average player could experience it normally.
And you're right about the Attack enemies through obstructions part, as far as I'm aware, it only bypasses grass. I agree that the description could be rewritten to better explain the concepts.
Finally, the auto ranged (bow, crossbow, trident) is core part of the mod and probably will stay that way, but I'm interested in collaborating with you guys to better portray the original combat snapshot.

Sorry for the late response,
Would you be willing to discuss this on discord? That will atleast ensure a faster response from me, seeing as I don't use github much. (decobra#0968)
Anyhow in cts, you can hit through grass, cobwebs, flowers, etc
Since it doesn't seem like you are trying to emulate cts but rather take some stuff out off it, I would definitely be willing to help out!


Community data issues

Here is a summary of Maize chip-seq community data:
https://github.com/warelab/misc/blob/master/Xiaofei/community_data_PMID.xlsx

https://www.ncbi.nlm.nih.gov/sra/SRP047420
The input is labeled as "B73 naked DNA fragmentase-seq, rep1"

https://www.ncbi.nlm.nih.gov/pubmed/?term=26111542
There is no input, leaf base is compared against leaf blade

https://www.ncbi.nlm.nih.gov/sra?term=SRP098549
https://de.cyverse.org/dl/d/18E5E910-5F11-41DD-BCD1-9AE642B0E8DA/SRR5217077_1.fastq.gz

https://www.ncbi.nlm.nih.gov/sra?term=SRP098549
Here is the file you cannot download but I can retrieve with DE app:
https://de.cyverse.org/dl/d/18E5E910-5F11-41DD-BCD1-9AE642B0E8DA/SRR5217077_1.fastq.gz

I contacted with them, it looks like it was fixed. I can't download them locally neither the other day, but I can download them successfully today. I am using SRA to submit the jobs again.
There is a tool of  vdb-validate in SRA https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=vdb-validate. It might be helpful for corruptions.


Tileboard not use states dict if state is a function

if defined
states: {
    'home': 'Дома',
    'not_home': 'Не дома'
},

and
state: function(i, e) {
    return 'home';
}

then state field will contain home, not Дома

This is by design. While states maps actual state from the entity, state overrides everything and sets it to whatever you returns.

So I should define my own dict or smth inside of function
Got it


Fix preview paths

On Rails 7.1 they changed the preview path setup for mailers to be multiple rather than singular, this PR handles that change conditionally in the railtie and fixes our test setup around the mailers. Fixes #2703.

/cc @alexevanczuk

Hey @JonRowe let me know if this is something that you're still working on or if I can help out!

Can you please make a release that includes this? :pray:
The current release (6.0.3) does not include this, and is therefore not compatible with Rails 7.1 (when using config.active_support.disallowed_deprecation = :raise, as some of us do). :disappointed:

A related question: While waiting for a release, is there an easy way to use the edge/unreleased version?
I tried gem 'rspec-rails', github: 'rspec/rspec-rails' but run into this error (unless I also explicitly list every rspec sub-project in my Gemfile):
Could not find gem 'rspec-mocks (= 3.13.0.pre)', which is required by gem 'rspec-rails', in rubygems repository https://rubygems.org/ or
installed locally.

@TylerRick I'm in the same situation as you, and this works for me:
  %w[rspec-core rspec-expectations rspec-mocks rspec-rails rspec-support].each do |lib|
    gem lib, git: "https://github.com/rspec/#{lib}.git", branch: 'main'
  end

@TylerRick I'm in the same situation as you, and this works for me:
  %w[rspec-core rspec-expectations rspec-mocks rspec-rails rspec-support].each do |lib|
    gem lib, git: "https://github.com/rspec/#{lib}.git", branch: 'main'
  end

Thanks, @dannyy83, and glad to hear I'm not alone. I landed on something similar. Too bad you have to override all of those dependencies, but I guess it makes sense, due to the version constraint on "= 3.13.0.pre)".

Fix released in 6.1.0 for Rails 7.1 support.
Side note, if you depend on the <major>-<minor>-maintenance branch you shouldn't need to pin the rest of RSpec, but we only tend to ship bugfixes to those.


Support for formating floating point number (%f/%g) in internal string formating

Check: https://github.com/google/double-conversion


fix Fix compensate union all wrongly when query rewrite by materialized view

Proposed changes
This is brought by https://github.com/apache/doris/pull/36056
Not all query after rewritten successfully can compensate union all
Such as:
mv def sql is as following, partition column is a
select a, b, count(*) from t1 group by a, b

Query is as following:
select count(*) from t1

the result is
+----------+
| count(*) |
+----------+
|       24 |
+----------+
after rewritten by materialized view successfully
If mv part partition is invalid, can not compensate union all, because result is wrong after
compensate union all.
+----------+
| count(*) |
+----------+
|       24 |
|       3 |
+----------+
This pr fix this.

run buildall

run buildall

run buildall


11.0.x Windows 32bit splashscreen failure

Platform:
Windows
Architecture:
32bits
Compile and run the demo from https://docs.oracle.com/javase/tutorial/uiswing/misc/splashscreen.html
64bit release executes successfully, 32bits the call to SplashScreen.getSplashScreen() always returns null.

@ali-ince Have you got a Win-32 system to replicate this on?

32bit package will work on a Win64 system and also displays this bug. This isn't exclusive to a Windows 32bit OS installation, only the 32bit release from AOJDK.

This is probably related to the patch being discussed at https://mail.openjdk.java.net/pipermail/build-dev/2019-March/025213.html.
The bug report is available at bug: https://bugs.openjdk.java.net/browse/JDK-8217707.
I'll follow up the backport of the fix to 11u and 12u after the initial patch is merged.

I've just requested the backport of the fix into 11u and 12u.

Hi @illumi . A issue recently closed seems similar to this (https://github.com/AdoptOpenJDK/openjdk-build/issues/838), the solution being to update to the latest binary. Could you give this another try using a newer release? Thanks in advance

Closing due to lack of requested feedback. We're happy to reopen the issue if feedback is provided by the OP (or anybody else) at a later date.


fatal: destination path '/workspace/ddev-gitpod-launcher' already exists and is not empty

Hi!
Just tried launching a Magento 2 git repo in gitpod.io using the ddev-gitpod-launcher but I receive the following error when cloning the repo:
Checking out repository https://bitbucket.org/xxxx/xxxxx/src/master/
Attempting to get artifacts from https://github.com/drud/d9simple-artifacts
Cloning into '/tmp/d9simple-artifacts'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 4
Receiving objects: 100% (7/7), 7.12 MiB | 11.15 MiB/s, done.
fatal: destination path '/workspace/ddev-gitpod-launcher' already exists and is not an empty directory.
Any ideas?
(ps, once again I find myself in awe of your project. Thank you!)

I'm not certain how much this has been tested on bitbucket. You should be able to just take a look and see what happened... Did your project get checked out?
Is it possible this was on the second run and there's a bug with the prebuild or something? Maybe you can try it with a fresh gitpod instance (when it says you've already got one, tell it to make a new one anyway.

Hi Randy
Yes tested with completely fresh instance also.
when I get back to my desk I’ll have a look at what is in the directory which may give me some clues and go from there.
thanks!

It's definitely not rocket science, so shouldn't be too hard to figure out what's going wrong with the script.
It's just https://github.com/drud/ddev-gitpod-launcher/blob/main/.gitpod/start_repo.sh
And you could fiddle with that, add set -x to it, etc. Thanks!

Thanks Randy!
But how would I achieve this while still using your ddev-gitpod-launcher ?
e.g., How would I override those scripts?
Thanks!

I just tried it with a simple repository, https://gitlab.com/rfay/d9simple - and it worked fine.
You need to give it a repository checkout link, is it possible you're giving it something else?
Please try https://gitlab.com/rfay/d9simple and see what you get, then you can take a look at the other.
If you can  grant me access (rfay) to your repo, I will chase it as well, but I imagine you're not giving the repository link?

Ahhh thanks Randy! Yes perhaps it is the wrong link. I’ll check the link and try again on Monday.
thank you!

Glad it's working!

If you see how to make the UI better, please do a little PR. Maybe it doesn't clearly say that it needs to be the git URL?

Absolutely I will :-)
thanks!
------ Original Message ------
From "Randy Fay" @.>
To "drud/ddev-gitpod-launcher" @.>
Cc "MisterH001" @.>; "Author"
@.>
Date 20/06/2022 13:31:43
Subject Re: [drud/ddev-gitpod-launcher] fatal: destination path
'/workspace/ddev-gitpod-launcher' already exists and is not empty (Issue
#20)

If you see how to make the UI better, please do a little PR. Maybe it
doesn't clearly say that it needs to be the git URL?
—
Reply to this email directly, view it on GitHub
https://github.com/drud/ddev-gitpod-launcher/issues/20#issuecomment-1160390703,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUARWSVP3VBHQLCPJ5CSDW3VQBQC7ANCNFSM5ZCMIHIQ.
You are receiving this because you authored the thread.Message ID:
@.***>


IQ result routes

This is an attempt to fix #78. The approach I am taking is to introduce an API like this to the router:
router.NewIqResultRoute(context.Background(), "9128171").HandlerFunc(func (s Sender, p stanza.Packet) {
    // Process IQ result
})

The context is there to support cancellation and timeouts. They have become a pretty standard feature in golang webservers, and work well here. With a timeout the example becomes:
router.NewIqResultRoute(context.WithTimeout(time.Second * 30, context.Background()), "9128171")
  .HandlerFunc(func (s Sender, p stanza.Packet) {
      // Process IQ result
  })
  .TimeoutHandlerFunc(func (err error) {
      // Handle a timeout
  })

To make this a little easier to use I am thinking of adding a method to Client to combine sending an IQ and adding a result route. Something like:
func (c Client) SendIq(iq stanza.Packet, handler HandlerFunc) (*IqResultRoute, error) {
    if err := c.Send(iq); err != nil {
        return nil, err
    }
    return c.router.NewIqResultRoute(context.Background(), iq.Attrs.id).HandlerFunc(handler), nil
}

@mremond Does this look sensible to you?
Remaining TODO items:

[x] Add router tests
[x] Expire old entries in iqResultRoutes
[ ] If a result route is replaced cancel its context (if possible?)

@mremond This is ready for review now.

I'm happy with the API, but it turns out to have one major flaw: it is leaking contexts. Back to the drawing board again!

I have reworked the API to use a result channel, which also feels a lot more idiotic. Usage is pretty simple.
iq := stanza.NewIQ(stanza.Attrs{Type: stanza.IQTypeGet, To: "…"})
result, err := client.SendIQ(context.Background(), iq)
reply <- result
fmt.Printf("We received an IQ result: %v", reply)

If you want to do full error handling and add a 30 second timeout (which I would highly recommend) the code becomes a bit more verbose, but it does feel like pretty standard Go to me:
iq := stanza.NewIQ(stanza.Attrs{Type: stanza.IQTypeGet, To: "…"})
ctx, _ := context.WithTimeout(context.Background(), time.Second * 30)
def ctx.Cancel()
result, err := client.SendIQ(ctx, iq)
if err != nil {
        log.Fatalf*("Error sending IQ message: %v", err)
}
select {
case iq := <- result:
        fmt.Printf("We received a result: %v", iq)
case <- ctx.Done():
        fmt.Printf("No result received in 30 seconds ☹");
})

One thing to note is that there was a possible deadlock if a stanza handler wanted to send an IQ itself: in that case Router.route would block while sending a message to the IQResultRoute's result channel. This is especially obvious in the router tests, where the route would try to do that before the test started receiving on the channel. I fixed that by always invoking Router.route as a go-routine. I was thinking about doing that anyway to allow processing of multiple stanzas in parallel.
The tests pass with -race enabled.

I changed idiotic to idiomatic in previous comment - I hadn't notice autocorrect correcting a typo to something I really did not intend 😬

Thanks @wichert
I quite like the API. The fact that it is simple is nice and you can always have a wrapper in your own project (or in main code) to wait for the result until a timeout.
It feels right to use channel for that need.
I will review the code ASAP.

FWIW I just started using this and it works well for me. I did need to make one last change: add SendIQ to Sender and StreamClient so you can use it from handlers.

Thanks, I am at a conference, so I may take some time before I can review this, but the plan is to sort the code in the pipeline during the next week.


Smart Folder Filter Issue

version 3.1.6 RC 2
After adding a group of 'subject contains' filters to a smart folder, I added one 'folder is not' filter. Then when I clicked on the smart folder, I receive the same results as my Unread Articles smart folder.
Removing the 'folder is not' filter from the end repopulates the smart folder with the correctly filtered results.
Just a couple general questions.
Are there plans to hone the 'Search All Articles' control? I think the inclusion of folder/smart folder filters with possible egrep functionality could add some value.
Also, while on the topic, hows about some regex inside the filter text area? I could write a feature request if that hasn't been done. This is an amazing and powerful tool, big thanks to everyone!

One other thing related to smart folder conditions. I have folders with a lot of conditions. If the dialog could be at max the height set by the user with a scroll bar, it would be perfect. As it is now, once my list grows, the dialog grows over application (like a tongue sticking out) and my filter use is pretty much limited to the size or resolution of monitor.

I could not reproduce the first problem. Are you sure you correctly set the "AND" condition ?

Hey, thanks for the response! I'm using the mac Version 3.1.8 :1bc6bc3:

I created a new smart folder.
toggled match selector to 'Any'
Added a 'Date Is' Today filter.
Clicked '+' sign and added 'Folder Is Not' reddit filter.
The arrows point at reddit articles that are still in the feed, even though they're in the reddit folder and should be filtered out.

Would selecting 'any' be the same as indicating 'AND' conditions? Otherwise, I'm not sure whether I'm doing it right. Thanks again!

No : if you want a 'AND' match, you have to select 'All'

Oops, looks like user error.
Then I guess I have another feature request.
Combine 'OR' statements and join them with the 'ALL'.  Or mini 'or' lists within the 'AND' arguments. I think this would benefit in the ability to curate more fine tuned smart lists.

This is a little rough and poorly explained, but I'm in a moving vehicle. Thanks again for looking, and if it looks like a worthwhile endeavor, I can try to write it out in more detail.

Interesting idea. I'll merge it in feature request #423


Jblanche ansys/otl

OpenTelemetry instrumentation of the logs

Closing the PR because  another approach will be used to hook up observability.


fix: Service Endpoints & Code Cleanup

Update Service Endpoints:
US Region

Execute Vehicle Action

Lock/Unlock
Climatisation Start/Stop

Start Climate Control
Refresh Vehicle Data

EU Region

Refresh Vehicle Data

Introduce API Levels:

API Endpoints and data structure are changing for newer vehicles. Currently this must be changed manually in .const file.
Plan to add under configuration options in future.

Code Cleanup

API values in .const

Start Climate Control

Make Logging true to values passed by user
info level > debug level
redact vins

Need to troubleshoot re-login during every service call.


Update qsharp.schema.json for language features

This was never updated when we merged language features in.

Should we also add lints to this if that's about to go in? (Or have Oscar also update in his PR)

I just added it to my PR


replace libtiff_4_5 with libtiff_and_tools, update hylafaxplus

Description of changes
libtiff 4.6.0 (https://github.com/NixOS/nixpkgs/pull/261791) dropped a bunch of helper tools, thereby breaking packages that depend on these tools.  To fix those packages, nixpkgs started packaging libtiff_4_5 separately, for hylafaxplus (https://github.com/NixOS/nixpkgs/pull/264226). then for gscan2pdf (https://github.com/NixOS/nixpkgs/pull/268836).
Lee Howard (core developer of hylafaxplus) later forked libtiff 4.6.0 (calling it libtiff version 4.6.0t) to provide a current version that restores those dropped helper tools (https://sourceforge.net/p/hylafax/mailman/message/58751878/ , http://www.libtiff.org/releases/v4.6.0t.html ).  At the same time, he published the newest release of hylafaxplus which is compatible with his fork of libtiff.
The pull request at hand essentially replaces the old libtiff_4_5 with a new pakcage libtiff_and_tools containing the forked libtiff variant.  This seems the right thing to do, as we no longer rely on an old and unmaintained libtiff version.  The pull request also updates hylafaxplus to the newest version 7.0.8.
Alternatively, we could also replace libtiff copmletely with the forked version.  This might be even better as we would have only one libtiff library that provides all features needed by all packages in nixpkgs.  However, the future of the fork is unclear (Lee Howard advocates for the helper tools to be restored in the original libtiff library, https://www.asmail.be/msg0055042152.html), so I guess we should wait some time and also watch what other distributions do.
The forked library of LibTIFF is -- unfortunatelly -- also called LibTIFF. The attribute name libtiff_and_tools is inspired by the name "libtiff+tools" of the corresponding Gitlab repository.
Notifying gscan2pdf maintainer @pacien and contributor of the gscan2pdf workaround pull request @gador: I verified that gscan2pdf still builds with libtiff_and_tools 4.6.0t, but you might want to test the resulting package.  By the way: The gscan2pdf project seems to be already preparing for libtiff 4.6.0 compatibility: https://sourceforge.net/p/gscan2pdf/bugs/427/ .
Also Notifying @trofi and @risicle , as you helped me shape the libtiff_4_5 pull request and there is not libtiff maintainer.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review run on x86_64-linux 1

9 packages built:

gscan2pdf
gscan2pdf.man
hylafaxplus
libtiff_and_tools
libtiff_and_tools.bin
libtiff_and_tools.dev
libtiff_and_tools.dev_private
libtiff_and_tools.doc
libtiff_and_tools.man

Add a :+1: reaction to pull requests you find important.

The original branch failed the "pkgs/by-name" check, so I updated the branch.  The failed check reported:

Attribute pkgs.libtiff_and_tools is a new top-level package using pkgs.callPackage ./pkgs/development/libraries/libtiff/libtiff_and_tools.nix { /* ... */ }.
Please define it in pkgs/by-name/li/libtiff_and_tools/package.nix instead.
See pkgs/by-name/README.md for more details.
Since the second callPackage argument is { }, no manual callPackage in pkgs/top-level/all-packages.nix is needed anymore.

This is not so easy: libtiff and libtiff_and_tools share some patch files, so moving them to pkgs/by-name would require duplicating those files.  Instead, I followed the Recommendation for new packages with multiple versions and added an indirection via inherit to the corresponding packages in all-packages.nix.  This should satisfy the check.

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 298561 run on x86_64-linux 1

9 packages built:

gscan2pdf
gscan2pdf.man
hylafaxplus
libtiff_and_tools
libtiff_and_tools.bin
libtiff_and_tools.dev
libtiff_and_tools.dev_private
libtiff_and_tools.doc
libtiff_and_tools.man

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/3745

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/3805

Notifying some members of the new libtiff maintainer team: @imincik @l0b0 @nh2


Tensorflow degrading performance throughout training

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No not really
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
TensorFlow version (use command below): TensorFlow 2.4.0-rc1
(Ive also tried using tf-nightly-gpu 2.4.0.dev20201023 and tf-nightly-gpu 2.5.0.dev20201111 but nothing changed)
Python version: python 3.8.5
CUDA/cuDNN version: CUDA 11.1 / cuDNN 8.05
GPU model and memory: RTX 3070 / 16GB RAM

Describe the current behavior
Each epoch takes longer and longer to complete. The first epoch started out at 50 seconds and on epoch 90 it was at almost at 1000 seconds an epoch. In the task manager, I can see that it slowly stops using the GPU after training for a while.
Describe the expected behavior
Each epoch should take the same amount of time.
Standalone code to reproduce the issue
import numpy as np
import os
import tensorflow as tf
from keras.callbacks import EarlyStopping
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers import Conv2D, MaxPooling2D, BatchNormalization, LeakyReLU
from keras.models import Sequential
from keras.preprocessing.image import ImageDataGenerator
from keras.regularizers import l2

config = tf.compat.v1.ConfigProto(gpu_options = tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.70))
for device in tf.config.experimental.list_physical_devices("GPU"):
    tf.config.experimental.set_memory_growth(device, True)
session = tf.compat.v1.Session(config=config)
tf.compat.v1.keras.backend.set_session(session)

IMG_SIZE = 350
Version = 1
batch_size = 8

val_aug = ImageDataGenerator(rescale=1/255)
aug = ImageDataGenerator(
        rescale=1/255,
        rotation_range=30,
        width_shift_range=0.1,
        height_shift_range=0.1,
        shear_range=0.2,
        zoom_range=0.2,
        channel_shift_range=25,
        horizontal_flip=True,
        fill_mode='constant')

train_gen = aug.flow_from_directory('F:/Storage/DataSet_Bal/Train',
        target_size=(IMG_SIZE, IMG_SIZE),
        batch_size=batch_size,
        class_mode='binary',
        shuffle=True)
val_gen = val_aug.flow_from_directory('F:/Storage/DataSet_Bal/Val',
        target_size=(IMG_SIZE, IMG_SIZE),
        batch_size=batch_size,
        class_mode='binary',
        shuffle=True)

model = Sequential()
model.add(Conv2D(64, 3, strides=(1,1), padding = 'same', activation = 'relu', input_shape = (IMG_SIZE, IMG_SIZE, 3)))
model.add(BatchNormalization())
model.add(Conv2D(64, 3, strides=(1,1), activation = 'relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2), strides=2))
model.add(BatchNormalization())

model.add(Conv2D(128, 3, strides=(1,1), activation = 'relu'))
model.add(BatchNormalization())
model.add(Conv2D(128, 3, strides=(1,1), activation = 'relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2), strides=2))
model.add(BatchNormalization())

model.add(Conv2D(256, 3, strides=(1,1), activation = 'relu'))
model.add(BatchNormalization())
model.add(Conv2D(256, 3, strides=(1,1), activation = 'relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2), strides=2))
model.add(BatchNormalization())

model.add(Conv2D(512, 3, strides=(1,1), activation = 'relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(BatchNormalization())

model.add(Flatten())
model.add(Dense(128, activation = 'relu'))
model.add(BatchNormalization())
model.add(Dropout(0.5))
model.add(Dense(32, activation = 'relu'))
model.add(BatchNormalization())
model.add(Dropout(0.5))

model.add(Dense(1, activation = 'sigmoid'))

model.compile(loss = "binary_crossentropy", optimizer = 'adam', metrics = ['accuracy'])
#model.summary()

earlyStop = EarlyStopping(monitor = 'val_accuracy', min_delta = 0.0001, patience = 50, restore_best_weights = True)
model.fit(
    train_gen,
    workers=8,
    epochs= 250,
    validation_data=val_gen,
    callbacks=earlyStop,
    verbose=2)

model.save(f'F:/Storage/TrainedVersions/YiffModel{Version}')

Other info / logs
Here is my output before it started training, maybe it reveals an issue:
2020-11-13 23:10:49.880564: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-11-13 23:10:51.936872: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-11-13 23:10:51.937643: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
2020-11-13 23:10:51.962681: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-11-13 23:10:51.963072: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-11-13 23:10:51.976456: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-11-13 23:10:51.976652: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2020-11-13 23:10:51.981390: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-11-13 23:10:51.982700: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-11-13 23:10:51.991145: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
2020-11-13 23:10:51.994156: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-11-13 23:10:51.994790: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-11-13 23:10:51.995118: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2020-11-13 23:10:51.996157: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-11-13 23:10:51.997339: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-11-13 23:10:51.997838: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-11-13 23:10:51.998134: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-11-13 23:10:51.998336: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2020-11-13 23:10:51.998569: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-11-13 23:10:51.998775: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-11-13 23:10:51.998939: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
2020-11-13 23:10:51.999074: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-11-13 23:10:51.999208: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-11-13 23:10:51.999393: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2020-11-13 23:10:52.570125: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-11-13 23:10:52.570326: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0
2020-11-13 23:10:52.570464: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N
2020-11-13 23:10:52.570786: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5734 MB memory) -> physical GPU (device: 0, name: GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6)
2020-11-13 23:10:52.571767: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
WARNING:tensorflow:From e:\PYTHON\YiffMiner\TrainYIFF.py:15: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

2020-11-13 23:10:52.698623: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-11-13 23:10:52.699014: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-11-13 23:10:52.699212: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-11-13 23:10:52.699429: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2020-11-13 23:10:52.699644: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-11-13 23:10:52.699843: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-11-13 23:10:52.700071: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
2020-11-13 23:10:52.700276: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-11-13 23:10:52.700484: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-11-13 23:10:52.700719: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2020-11-13 23:10:52.700911: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-11-13 23:10:52.701114: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0
2020-11-13 23:10:52.701242: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N
2020-11-13 23:10:52.701519: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5734 MB memory) -> physical GPU (device: 0, name: GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6)
2020-11-13 23:10:52.701888: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-11-13 23:10:53.763226: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2020-11-13 23:10:55.655709: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-11-13 23:10:56.552988: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2020-11-13 23:10:57.143012: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-11-13 23:10:59.117292: I tensorflow/core/platform/windows/subprocess.cc:308] SubProcess ended with return code: 0

2020-11-13 23:10:59.160112: I tensorflow/core/platform/windows/subprocess.cc:308] SubProcess ended with return code: 0

2020-11-13 23:11:00.955185: I tensorflow/stream_executor/cuda/cuda_blas.cc:1838] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once.
Found 3266 images belonging to 2 classes.
Found 86 images belonging to 2 classes.

@Poofy1,
On running the code, I am facing an error stating FileNotFoundError: [Errno 2] No such file or directory: 'F:/Storage/DataSet_Bal/Train'.
In order to reproduce the issue reported here, could you please provide all the supporting files necessary to run the code. Thanks!

@Poofy1 Thanks for raising this issue. I have couple of questions.

I see you tried TF2.4-rc1 and tf-nightly. Did you try TF2.2 or TF2.3? Were you facing same issue with older versions also?

I noticed that your are working on binary classification. What data you are using? If your data is private, can you please try public data like cats versus dogs data and let us know whether you face same issue.

How many GPU's you had used?

Can you please try with other older python version such as 3.7.

Thanks again for creating this issue.

@jvishnuvardhan Thanks for the questions but I have found the solution. Turns out TensorFlow does not support CUDA 11.1 right now but it does support 11.0. In order to get CUDA 11.0 to work, I had to move the ptxas.exe from the CUDA 11.1 directory to my 11.0 directory.


Ultrasonic level sensor

Hello, I have two Ultrasonic level sensor by Tuya, they are not in the supported list but would love to see this integrated with Home Assistant and will do whatever I need to help this. Can anyone help?

Same here. Any way to get it working?

Hello. I recently resolved this. Happy to share my solution and give back to the community.
Note: I am using the Tuya Smart TLS-2206 UltraSonic Wireless Sensor. This was sourced from Alibaba and is being used in an IBC water tank for rainwater harvesting.
Firstly you need to use the Tuya Local HACs integration. Follow the guide to integrate your devices using either the Cloud API method to find the Tuya device's Key and ID.
https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md
You will need to reserve IP addresses for your devices on your router (or whatever DHCP service you are using).
Once you have the device's Key and ID, add them into the Local Tuya integration where you will be asked for the device's IP address and local key. The default protocol is 3.3 which is correct.
The trick to getting the sensors needed to show the water level percentage and state.
Configure the integration and you will be offered an option to edit the device. Choose edit the device and select the device you want to add the sensors to.
The goal is to add the sensor that reports on the water level percentage. When editing the device, scroll down and select 'Add more entities in edit device mode'. Select sensor as the entity type then select '22' and give it a friendly name. This will add the required sensor.
This has worked well for me and now I can use the percentage to use in a Gauge card and also to read the percentage to turn the pump off when the level goes below 10% to prevent running the pump dry. Works very well. The readings get jumpy below 10% and above 95% but you can adjust your automations to get a reliable reading by using a time condition (must be below 10% for an hour for example).
I hope this helps someone.

Hi, I'm following the guide through the link you posted. I've done everything but I'm stuck on points 6 and 7!!!! What do you mean by "Put your devices into linking mode"? and in point 7 "on the command line....." where exactly? Sorry for my ignorance

Hello. I recently resolved this. Happy to share my solution and give back to the community.
Note: I am using the Tuya Smart TLS-2206 UltraSonic Wireless Sensor. This was sourced from Alibaba and is being used in an IBC water tank for rainwater harvesting.
Firstly you need to use the Tuya Local HACs integration. Follow the guide to integrate your devices using the Cloud API method to find the Tuya device's Key and ID.
https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md
You will need to reserve IP addresses for your devices on your router (or whatever DHCP service you are using).
Once you have the device's Key and ID, add them into the Local Tuya integration where you will be asked for the device's IP address and local key. The default protocol is 3.3 which is correct.
The trick to getting the sensors needed to show the water level percentage:
Configure the integration and you will be offered an option to edit the device. Choose edit the device and select the device you want to add the sensors to.
The goal is to add the sensor that reports on the water level percentage. When editing the device, scroll down and select 'Add more entities in edit device mode'. Select sensor as the entity type then select '22' and give it a friendly name. This will add the required sensor.
This has worked well for me and now I can use the percentage to use in a Gauge card and also to read the percentage to turn the pump off when the level goes below 10% to prevent running the pump dry. Works very well. The readings get jumpy below 10% and above 95% but you can adjust your automations to get a reliable reading by using a time condition (must be below 10% for an hour for example).
I hope this helps someone.

Hi, I'm following the guide through the link you posted. I've done everything but I'm stuck on points 6 and 7!!!! What do you mean by "Put your devices into linking mode"? and in point 7 "on the command line....." where exactly? Sorry for my ignorance

Hello nisu66 - the documentation under https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md is not mine but my advise assumes you could follow it.
In terms of linking, once you have your developer account setup and have created your project you then need to link it with your devices (make sure that you have already set them up in your Tuya Smart Life App).

I don't know about linking mode or the command line as I think all I had to do here was create the developer account, link my account and the devices showed up that I had added in the IOS Tuya Smart Life app. Once this was done, add the Tuya Local Integration through HACs - when you add your developer account the devices will import.

I don't know about linking mode or the command line as I think all I had to do here was create the developer account, link my account and the devices showed up that I had added in the IOS Tuya Smart Life app. Once this was done, add the Tuya Local Integration through HACs - when you add your developer account the devices will import.

thanks, in the end I searched a bit here and there I managed to integrate the level sector. Thanks to you who gave me the correct inspiration

No problem. Are you getting your level readings now?

Yessssss
Inviato da Yahoo Mail su Android
Il mer, 1 nov, 2023 alle 17:39, @.***> ha scritto:
No problem. Are you getting your level readings now?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

Excellent, well done!

Hello, i want to ask something about this. I follow this instruction but i can't see anything about this sensor. The integration say me that the sensor is unsupported, but when i downloaded a diagnostik file, compare a value and a voice about the sensor. and also i can see a value on denvelopment site about tuja. what i can do for see a value on my home assitant?

@pante90 use localtuya.
Inviato da Yahoo Mail su Android
Il lun, 11 dic, 2023 alle 20:21, @.***> ha scritto:
Hello, i want to ask something about this. I follow this instruction but i can't see anything about this sensor. The integration say me that the sensor is unsupported, but when i downloaded a diagnostik file, compare a value and a voice about the sensor. and also i can see a value on denvelopment site about tuja. what i can do for see a value on my home assitant?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

Hi there, I wanted to add the tank level into Home Assistant too. When I add the device it is found by Local Tuya integration.
However when adding I got an error: "An unknown error occurred. See log for details."
But I can't find anylog file for more info.
When I add it manually and put in the IP/deviceID/secret key it give the following error:
"Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists."
Does anyone got this error and found a solution ?
Thanks in advance.

Up until a month ago everything was working fine.  Then suddenly the sensors disappeared and I have the usual errors.  I tried both localtuya and tuyalocal.  I don't know what could have happened.  Anyone in your situation?
Inviato da Yahoo Mail su Android
Il Mer, 3 Gen, 2024 alle 16:25, @.***> ha scritto:
Hi there, I wanted to add the tank level into Home Assistant too. When I add the device it is found by Local Tuya integration.
However when adding I got an error: "An unknown error occurred. See log for details."
But I can't find anylog file for more info.
When I add it manually and put in the IP/deviceID/secret key it give the following error:
"Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists."
Does anyone got this error and found a solution ?
Thanks in advance.
Waterlevelmeter3.PNG (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

I got it working. I added the 22 and then it added a sensor but no data. Then I thought let's see what happens a few numbers more.

Added 22,21,23 (just added these to see what happened)

The data I get to HA is the same I see in the Tuya app.
The device is just laying on my desk so the numbers are not real. But they match the app so should be good to go.

no way. I followed your directions but it doesn't work for me. I also tried changing the values because I don't have dip 20, but the result doesn't change.
Inviato da Yahoo Mail su Android
Il Mer, 3 Gen, 2024 alle 19:20, @.***> ha scritto:
I got it working. I added the 22 and then it added a sensor but no data. Then I thought let's see what happens a few numbers more.
image.png (view on web)
Added 22,21,23 (just added these to see what happened)
image.png (view on web)
The data I get to HA is the same I see in the Tuya app.
The device is just laying on my desk so the numbers are not real. But they match the app so should be good to go.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

okay that's strange, but HA adds the meter with the right local IP address etc ? Just no data ?

Yes. The ip address Is static and correct. In the app (smart life) it s all right.And other device it s ok in local tuya
Inviato da Yahoo Mail su Android
Il Gio, 4 Gen, 2024 alle 9:22, @.***> ha scritto:
okay that's strange, but HA adds the meter with the right local IP address etc ? Just no data ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

okay so it stopped working... :( I got fluctuating data dat matched the Tuya app, checked and tested a few times to be sure it was okay, and since yesterday i just get constant "100cm" data feed.
Resetted the device, nothing changes. No idea why I got data and why it suddenly stopped without changing anything.

I order the same 2206 but it's zigbee. Would that be working at all with HA?

Is there a Zigbee version ? I searched for a ZB version before buying the WiFi version but I couldn't find it anywhere.
Please let me know where you bought it and if the data is shown in HA once you recieved it. I will change mine for a ZB version if that works.

Just found this amazing item on AliExpress. Check it out! €57,93 | EPTTECH TLC2206-ZB ZigBee APP Tank level Monitor  WiFi Real-time Reminder Contactless Waterproof IP67 Household Industrial Alarm
https://a.aliexpress.com/_EQUPBKV

I  canceled the ZB version and replaced it with the Wifi version so I can add it directly into Smart Life. My whole network is zigbee based so maybe when its supported by HA, I will replace the wifi one with Zigbee.

You canceled the wifi version you mean ? Please let me know how it adds. If it works in HA I will get one too. The data never got back in HA after working for a few days.

Noop, I canceled the ZB one as wifi seems to be widely in use.  I'd love to play with the newest tools but for this sensor I just need it to work.
Maybe I'll buy both of them but first have to see if this sensor fits my use case (monitor of the water in my crawl space under the house)

Using it for exactly that reason at this very moment. I just can't get the data in HA anymore. The first days it was working, than out of nowhere just gives me 100 as static data feed. Resetted the meter but no luck.

I got the wifi based device and connected it to the Smart Life app and also configured local tuya in Home Assistant.  For now it works fine, so I hope it will not stop later.
FYI, I also ordered the Zigbee device as I'm curious if this works better :) Maybe I can play with it in a week or two.

okay with adding the 22 manually as described above ? Wonder if it keeps working for you, i got data for about 3-4 days and then it just keeps giving "100"  Can you perhaps screenshot your settings in the Tuya local device ? (not the keys off course but how you added the sensor)
I removed and re-added the device with different settings, but without any luck.
Thought of buying the zigbee version, just hoped to find a solution for the WiFi version so I don't need to replace the device down in the crawl space whaha.

but do you think it would be possible to program it with esphome?

I just added my device to my router with a static ip-address and localtuya found it right away.
I added all the id's (not just 22) as sensors. For 22 I added it as follows
FriendlyName : kruipruimte percentage
UnitOfMeasurement : %
DeviceClass : Enum
ScalingFactor :
So far it works, but only I'm on day 1 ;)

Yes I did the same, the Local Tuya App finds the device, so don't thank there is an issue.
But that looks pretty promising, and by all you mean 1 to 22 ? Or how did you now what to add in order to get the right info ?
Tried finding this info in the log files from iot.tuya.

Whatever number I use I just get: Not all required fields are filled in.

Local Tuya presented me automatically the other options when editing a device.

I did read on the website that never versions of the hardware would go up to 3.0m instead of 2.5m. Maybe there is a version diff ?

okay no I don't got these options. I found out I just can't change device, but another, then give in a new numer. Like 19 and then add it as a sensor. Buttt... no data. But this does accept the entry.
Also checked the Tuya app if there is a firmware update, but nothing.

i have main module V2.0.2 MCU module V2.3.0

Thanks for sharing your solution. I already got an IoT-wifi SSID with only 2.4ghz since most only work on that range.
Main module seems the same, only has a different MCU module...

Wel mooi dat we allemaal in het engels praten met elkaar.

Just lost half of my devices ;(

The 3 most important ones are still working, but I can't get the others back.
I haven't completely wiped local tuya to see if that would help, but even if it would, it's not a real solution either

mmmh at least you got the water level in cm height. I think I will order the zigbee version to see if that works any better.

I hope to get the ZB version in 2 weeks :)

Maybe I will wait for your experience before the ZB version is somehow also not supported by HA. Whaha. Hope that will just show up as any other ZB device. Please let me know.

Is there any possibility of being integrated into the official site of HA this kind of sensor ?, sorry for my ignorance, I am just starting with this magnificent central smart home controller.

Devices that aren't zigbee, but WiFi or Bluetooth usually go through an integration. But the official Tuya integration does not support this WiFi water level meter. Don't know why or if it will become supported in the future.
The official Tuya just says "not supported" and no entities available. :(

ok, Zwoet, thanks for the info. As I see, there are many people waiting for the integration.

ok, Zwoet, thanks for the info. As I see, there are many people waiting for the integration.

but with localtuya it's integrated :-)

ok, Zwoet, thanks for the info. As I see, there are many people waiting for the integration.

but with localtuya it's integrated :-)

Yeah well not with the version I got. :( I just got it in a few weeks ago, maybe it's a newer version since the MCU version is different that mine doesn't work !? No idea, for now I gave up on the WiFi version and will buy Zigbee version if rvdlinden got it working.
Good for you that you got data from the device now! Did you add the sensors by manually defining them with the numberd ?

Just received the ZB version and by default it's absolutely unsupported and doesn't expose anything.
const definition = {
zigbeeModel: ['TS0601'],
model: 'TS0601',
vendor: '_TZE200_lvkk0hdg',
description: 'Automatically generated definition',
extend: [],
};
module.exports = definition;
I have never had an unsupported device, but I think I have to build a external definition as described on https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html?

That's a bummer. Doesn't seem like something that is done easy. I used MQTT over eBus to connect to my WTW installation and that was a lot of work to get it working.
But if HA doesn't support it, then what app is it supposed to connect to over zigbee?

Any zigbee or multi mode hub should work says the tiny doc. I'll connect it to a tuya hub to see what that would provide.  I should have a Moes ble/zigbee somewhere

Due to the wifi based tlc2206 I already have,  I just assumed the config of the wifi device isn't any different from the zigbee version.
So currently I'm adding the same data points as the ones that were exposed on the localtuya, and there seems to be some progress here.

I will continue with it and see how far I get as the current values are the read only ones, but I would also like to see how I can actually set threshold via HA

not sure how it is possible, but the data points I lost on the wifi device do also not seem to be present on the zigbee device (7,8, 19 and 21) either.
Any ideas on how to discover all data points, especially the ones that could be set, are welcome

You got the a few working ? Can you share how you did this ?
Pretty wierd the other sensors aren't giving any data.

I have tried to get the device working with all 7 sensors, but the Wifi as well as the Zigbee device report all the DP ID's but I'm not able to do anything with 4 of them. Due to this, the Zigbee device can't be configured while the Wifi device via LocalTuya is usable as the config is done via the Smart Life app
To get is semi working, I did this ...
For the Zigbee device, I created a local file config/zigbee2mqtt/TLC2206ZB.js which is in the same directory as the configuration.yaml. The attached .txt is the file and just needs to be renamed from .txt to .js before usage.
TLC2206ZB.txt
In HA within Zigbee2MQTT under Settings => External Converters, the filename TLC2206ZB.js needs to be added and than restart the service. This will make the discovered TS0601 unsupported device change to TS0601_tlc2206zb and should reveal the 3 exposed and working data points.
In the .js file I documented all the DP ID's I found using the Tuya IOT website when the device was connected via a BLE/Zigbee hub. Also the ones that fail are in there as comments for reference.
The reported data points were:
{"1":"Liquid level status","2":"Liquid level depth","7":"Set Max","8":"Set Mini","19":"Installation height","21":"Sensor to full line","22":"Liquid level ratio"}
I did see also something weird with the  'Sensor to full line' on the Zigbee. This value doesn't seem to be used at all as there was no affect on the percentage (DPID 22)  when it was changed. This same field does work on the Wifi device and does affect the percentage when the liquid level reaches the threshold.
I lack the experience to take this to the next level, and neither do a see a reason to request this new device to be added to Zigbee2MQTT. Without the fields to define the Installation Height and the Sensor to full line, it just reports default depth and percentage based on the hardware default height (1m).

Reported the Zigbee device as in issue here https://github.com/Koenkk/zigbee2mqtt/issues/21015

Thanks for all the info. I think you have done a great job coming this far. The data I care most about is the water height to monitor and log. So it seems like you got that working. My WiFi version still doesn't work so I will order the Zigbee version.

Maybe I found a solution for the Wifi based device when some or all data points are gone or provide no data.
I cleaned HA by removing the wifi tank sensor and also localtuya.  Rebooted HA to have a clean slate.
On the Tuya IOT website I changed the device from the Standard to the DP instruction set.

Went back to configure localtuya and the auto discovered wifi sensor.  This time all 7 data points were presented again and I added 1,2,22 as a sensor and 7,8,19,21 as number.

I do not just see the data points and their value, but I can change them to configure the device too. All changes in HA are reflected on Tuya IOT website too.
Not sure if the DP instruction made the diff, but I have started over from scratch before and never had a positive result.

Hover over the device box on the Tuya website and it will show a blue button.  That will present you the Standard/DP page as shown in the previous post

The zigbee based device is not fully working via Zigbee2mqtt but when the zigbee device is connected to a tuya zigbee gateway, it can be identically configured as the wifi based device via the Local Tuya integration (there is a fork that supports zigbee hubs and zigbee sub devices)

Thanks for all the details on how you accomplished to get the data to HA.
I removed devices and Tuyalocal integration, changed the settings from device to DP instructed.

Installed the LocalTuya again but still no luck. No auto discovery of the data points. And added 2 for waterheigt to test manually but just says "Unavailable".

Maybe it's a different hardware version you have
My wifi device shows as
EPT- Ultrasonic sensor 3m
and the zigbee device as
EPT- Ultrasonic sensor Z

Only "Ultrasonic level sensor" mine says in Tuya IoT environment.
It also shows data in the logs.

Also tried adding sensors with these names, but that wasn't possible. Thought it was worth a shot whaha

As far as I know, in the coming days, it will be an update of HA that contains a new way to connect tuya to homeassistant, easier and without the necessity of dealing with a developers tuya account. Maybe the problem with the ultrasonic sensor is mended.

As far as I know, in the coming days, it will be an update of HA that contains a new way to connect tuya to homeassistant, easier and without the necessity of dealing with a developers tuya account. Maybe the problem with the ultrasonic sensor is mended.

I don't dislike it. At least not in the beta version of HA (2024.2b9) which I already have and has the new tuya configuration system, much more streamlined and less complicated. The problem remains the device, which is not compatible. With localtuya however it works perfectly. At the beginning I also had problems, which I discovered were due to the mesh repeater I had in the garden to be able to reach the tank sensor. It basically combined the two channels at 2.4 and 5 with the usual name, and evidently created conflicts. I separated the 2 lines and activated only channel 2.4 for that repeater and I solved the problem

I have tried to get the device working with all 7 sensors, but the Wifi as well as the Zigbee device report all the DP ID's but I'm not able to do anything with 4 of them. Due to this, the Zigbee device can't be configured while the Wifi device via LocalTuya is usable as the config is done via the Smart Life app
To get is semi working, I did this ...
For the Zigbee device, I created a local file config/zigbee2mqtt/TLC2206ZB.js which is in the same directory as the configuration.yaml. The attached .txt is the file and just needs to be renamed from .txt to .js before usage.
TLC2206ZB.txt
In HA within Zigbee2MQTT under Settings => External Converters, the filename TLC2206ZB.js needs to be added and than restart the service. This will make the discovered TS0601 unsupported device change to TS0601_tlc2206zb and should reveal the 3 exposed and working data points.
In the .js file I documented all the DP ID's I found using the Tuya IOT website when the device was connected via a BLE/Zigbee hub. Also the ones that fail are in there as comments for reference.
The reported data points were: {"1":"Liquid level status","2":"Liquid level depth","7":"Set Max","8":"Set Mini","19":"Installation height","21":"Sensor to full line","22":"Liquid level ratio"}
I did see also something weird with the 'Sensor to full line' on the Zigbee. This value doesn't seem to be used at all as there was no affect on the percentage (DPID 22) when it was changed. This same field does work on the Wifi device and does affect the percentage when the liquid level reaches the threshold.
I lack the experience to take this to the next level, and neither do a see a reason to request this new device to be added to Zigbee2MQTT. Without the fields to define the Installation Height and the Sensor to full line, it just reports default depth and percentage based on the hardware default height (1m).
Just for reference, I used these docs to get this .js file as far as could get it

https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html
https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html

Was wondering if the zigbee version still working stable ?

In HA the Wifi lost again the configurable items, but so far Zigbee still works (via local tuya fork  and tuya zigbee gateway)

https://github.com/make-all/tuya-local/issues/1653
localtuya has been updated and now also includes Ept water tank level 3 Mt.

Still no luck with the version I got. Removed and reinstalled the Tuya integration but still the same result.

The MR here should add support for the tank level sensor:
https://github.com/home-assistant/core/pull/114481

Thanks for all the work and message, I checked but I see no update for the integration ? Still no luck when trying to add the sensor.

Hello, any new for zigbee version?

Thanks @Daz42, this method worked for me! I extrapolated to other 2 valve actuators (https://www.amazon.com/Automatic-Control-Electric-Shutoff-Compatible/dp/B0CB3NZH19) which I could only manage through the tuya app and it worked as well:

Thanks again!!

Thanks @Daz42, this method worked for me! I extrapolated to other 2 valve actuators (https://www.amazon.com/Automatic-Control-Electric-Shutoff-Compatible/dp/B0CB3NZH19) which I could only manage through the tuya app and it worked as well:
Thanks again!!

No problem, glad my solution has worked for you!

In HA the Wifi lost again the configurable items, but so far Zigbee still works (via local tuya fork  and tuya zigbee gateway)

I have moved away from tuya hub and local tuya for the TLC ZB version and now have it directly connected to HA and zigbee2mqtt.
https://github.com/Koenkk/zigbee2mqtt/issues/21015#issuecomment-2131168644

Hello, can you help me with add Smart TLC-2206 Wifi  level senzor? I want like a use hacs local tuya in home assistant. I don't know what kind of entities to set

Did anyone ever got this working with the WiFi version?

For longer period ? Mine is pretty much next to the router on 2.4ghz network, the connection is okay, I just can't link it to HomeAssist. I can use the Tuya app and that works fine. But the WiFi version just won't be recognized by Tuya offical intergration and with LocalTuya HACS it doesn't give any data when I manually add the sensors.
I think I will buy a Zigbee version so I can skip the whole Tuya platform.

For longer period ? Mine is pretty much next to the router on 2.4ghz network, the connection is okay, I just can't link it to HomeAssist. I can use the Tuya app and that works fine. But the WiFi version just won't be recognized by Tuya offical intergration and with LocalTuya HACS it doesn't give any data when I manually add the sensors.
I think I will buy a Zigbee version so I can skip the whole Tuya platform.

It's been working for some time now. Unfortunately, I would have to do some work to try to get a repeater closer to the connection. I configured it like this, even if there are some DPIs that I don't use. I basically only use 2, but if I remove the others it doesn't work

Hi Nisu66,
can you send me more screen shot?
From: nisu66 @.>
Sent: Monday, August 19, 2024 2:22 PM
To: tuya/tuya-home-assistant @.>
Cc: kazdajan86 @.>; Comment @.>
Subject: Re: [tuya/tuya-home-assistant] Ultrasonic level sensor (Issue #946)
For longer period ? Mine is pretty much next to the router on 2.4ghz network, the connection is okay, I just can't link it to HomeAssist. I can use the Tuya app and that works fine. But the WiFi version just won't be recognized by Tuya offical intergration and with LocalTuya HACS it doesn't give any data when I manually add the sensors.
I think I will buy a Zigbee version so I can skip the whole Tuya platform.
It's been working for some time now. Unfortunately, I would have to do some work to try to get a repeater closer to the connection. I configured it like this, even if there are some DPIs that I don't use. I basically only use 2, but if I remove the others it doesn't work
Senza.titolo.jpg (view on web) https://github.com/user-attachments/assets/af6d246a-e68b-4282-bf0d-e3d7987276a8
—
Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/946#issuecomment-2296443497 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNID63BWYYVYR5I3KDUGYTZSHPNRAVCNFSM6AAAAAA36VYDO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGQ2DGNBZG4 .
You are receiving this because you commented.  https://github.com/notifications/beacon/BFNID655YQS4QMDU32GGB4TZSHPNRA5CNFSM6AAAAAA36VYDO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI4DZGS.gif Message ID: @.***>

How to set? Why is value -1?
From: nisu66 @.>
Sent: Monday, August 19, 2024 2:22 PM
To: tuya/tuya-home-assistant @.>
Cc: kazdajan86 @.>; Comment @.>
Subject: Re: [tuya/tuya-home-assistant] Ultrasonic level sensor (Issue #946)
For longer period ? Mine is pretty much next to the router on 2.4ghz network, the connection is okay, I just can't link it to HomeAssist. I can use the Tuya app and that works fine. But the WiFi version just won't be recognized by Tuya offical intergration and with LocalTuya HACS it doesn't give any data when I manually add the sensors.
I think I will buy a Zigbee version so I can skip the whole Tuya platform.
It's been working for some time now. Unfortunately, I would have to do some work to try to get a repeater closer to the connection. I configured it like this, even if there are some DPIs that I don't use. I basically only use 2, but if I remove the others it doesn't work
Senza.titolo.jpg (view on web) https://github.com/user-attachments/assets/af6d246a-e68b-4282-bf0d-e3d7987276a8
—
Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/946#issuecomment-2296443497 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNID63BWYYVYR5I3KDUGYTZSHPNRAVCNFSM6AAAAAA36VYDO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGQ2DGNBZG4 .
You are receiving this because you commented.  https://github.com/notifications/beacon/BFNID655YQS4QMDU32GGB4TZSHPNRA5CNFSM6AAAAAA36VYDO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI4DZGS.gif Message ID: @.***>

okay so I added all as you stated, seems to be doing something. The Tuya app says 5cm in the screen it's bouncing between 5/6 so not sure if correct, but at least it's not only unavailable. whaha

What is Entity type?
Unit of Measurement?
Device Class?
From: Zwoet @.>
Sent: Monday, August 19, 2024 3:28 PM
To: tuya/tuya-home-assistant @.>
Cc: kazdajan86 @.>; Comment @.>
Subject: Re: [tuya/tuya-home-assistant] Ultrasonic level sensor (Issue #946)
okay so I added all as you stated, seems to be doing something. The Tuya app says 5cm in the screen it's bouncing between 5/6 so not sure if correct, but at least it's not only unavailable. whaha
image.png (view on web) https://github.com/user-attachments/assets/28510783-1459-46d1-8c51-84c9ce1735de
—
Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/946#issuecomment-2296580239 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNID66FV4F7DUPKKBNN3ITZSHXHZAVCNFSM6AAAAAA36VYDO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGU4DAMRTHE .
You are receiving this because you commented.  https://github.com/notifications/beacon/BFNID6ZC6NTIP3JE4ZRLLRLZSHXHZA5CNFSM6AAAAAA36VYDO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI4MEI6.gif Message ID: @.***>

Added 1,2,22 as a sensors and 7,8,19,21 as numbers, was mentioned above. device class etc I left blanc, didn't knew the names I just added them as sensor1/22 and number 7/21, and renamed the "waterlevel" and "alarm" which are the only once I need.
Hope this keeps working, because in the beginning when first started posting about this, it worked for a week and then just stopped working, I just never added all the sensors like this.
But still doubt very much to just replace it with Zigbee version to cut out the whole Tuya platform garbage.
That this depends on a cloud platform while being 3 meter apart in my house feels a bit off.

What is Entity type? Unit of Measurement? Device Class? From: Zwoet @.> Sent: Monday, August 19, 2024 3:28 PM To: tuya/tuya-home-assistant @.> Cc: kazdajan86 @.>; Comment @.> Subject: Re: [tuya/tuya-home-assistant] Ultrasonic level sensor (Issue #946) okay so I added all as you stated, seems to be doing something. The Tuya app says 5cm in the screen it's bouncing between 5/6 so not sure if correct, but at least it's not only unavailable. whaha image.png (view on web) https://github.com/user-attachments/assets/28510783-1459-46d1-8c51-84c9ce1735de — Reply to this email directly, view it on GitHub <#946 (comment)> , or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNID66FV4F7DUPKKBNN3ITZSHXHZAVCNFSM6AAAAAA36VYDO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGU4DAMRTHE . You are receiving this because you commented. https://github.com/notifications/beacon/BFNID6ZC6NTIP3JE4ZRLLRLZSHXHZA5CNFSM6AAAAAA36VYDO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI4MEI6.gif Message ID: @.***>

entity type: sensor
unit: cm o mt
device class: water
Once a sensor has been configured I cannot return to the configuration page. So I can't get you any more screenshots.
For the ID, enter the one that has the closest value to what the app tells you. In my case it is ID 2, but I saw that zwoet has Id 22. You need to check yours yourself

Added 1,2,22 as a sensors and 7,8,19,21 as numbers, was mentioned above. device class etc I left blanc, didn't knew the names I just added them as sensor1/22 and number 7/21, and renamed the "waterlevel" and "alarm" which are the only once I need.
Hope this keeps working, because in the beginning when first started posting about this, it worked for a week and then just stopped working, I just never added all the sensors like this.
But still doubt very much to just replace it with Zigbee version to cut out the whole Tuya platform garbage. That this depends on a cloud platform while being 3 meter apart in my house feels a bit off.

Configure only the ID you need, leave the other values alone

I try only 22 and nothing.
would it be possible for you to connect to me on a remote desktop? Teamviewer, AnyDesk
if you want, please write to me at @.*** @.***>
From: nisu66 @.>
Sent: Monday, August 19, 2024 3:56 PM
To: tuya/tuya-home-assistant @.>
Cc: kazdajan86 @.>; Comment @.>
Subject: Re: [tuya/tuya-home-assistant] Ultrasonic level sensor (Issue #946)
Added 1,2,22 as a sensors and 7,8,19,21 as numbers, was mentioned above. device class etc I left blanc, didn't knew the names I just added them as sensor1/22 and number 7/21, and renamed the "waterlevel" and "alarm" which are the only once I need.
Hope this keeps working, because in the beginning when first started posting about this, it worked for a week and then just stopped working, I just never added all the sensors like this.
But still doubt very much to just replace it with Zigbee version to cut out the whole Tuya platform garbage. That this depends on a cloud platform while being 3 meter apart in my house feels a bit off.
Configure only the ID you need, leave the other values alone
—
Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/946#issuecomment-2296642679 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNID62OESIKBD2C5JX5HMDZSH2OLAVCNFSM6AAAAAA36VYDO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGY2DENRXHE .
You are receiving this because you commented.  https://github.com/notifications/beacon/BFNID6ZIS6WPBE2FPLTK4BLZSH2OLA5CNFSM6AAAAAA36VYDO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI4P6HO.gif Message ID: @.*** @.***> >

Only 22 doesn't work. I tried that. You will need to add all mentioned above.
I can help you by teamviewer tomorrow if you have trouble getting it to work. Please DM me.

I need help to configure this level sensor in the SmartLife app, since it does not give me correct values. I have a tank with a height of 1.2 meters, the sensor is installed at 1.3 meters, I have measured the height of the fuel and it is at 0.80 meters, however, the app tells me that it is at 95%, can you help me?

I have same issue- always 95% when full. Different settings of the height didn't help with it.

This repository adds it well for those who have problems adding it
https://github.com/azerty9971/xtend_tuya


Separate TypedRoute's TypeGuardError from TypeGuardError raised by application code

Feature Request
Thanks for your suggestion. Feel free to just state your idea. Writing the issue, it would better to filling the below items:
A description of the problem you're trying to solve.
I can't separate a TypedRoute's TypeGuardError from a TypeGuardError raised by a typia in my code, which complicates error handling.
An overview of the suggested solution.
Separate TypedRoute's TypeGuardError from TypeGuardError raised by application code.
Code examples showing the expected behavior.
class TypedRouteValidationError extends HttpException {
    ...
}

@TypedRoute.Post('api')
async create(@TypedBody() body: MyBody) { // throws TypedRouteValidationError on invalid user input
    typia.assertEquals(body, NotMyBody); // throws typia's original TypeGuardError
}

TypedBody() throws 400 BadRequestException error.
So, you don't need to worry about it this issue.

Yes, we can receive a 400 Bad Request error with TypedBody. The issue I'm facing is that TypeGuardError thrown within the logic (such as controller body or service), rather than in the validation part of the route, is also automatically replaced with a 400 Bad Request error. I believe that users should receive a 500 Internal Server Error for TypeGuardErrors that occur internally.

Upgrade to<EMAIL_ADDRESS>then it would work as you wish.
Thanks for reporting.

Thank you. But we might still need a way to handle TypeGuardErrors that happen in the validation logic of TypedRoute separately. If it doesn't make things more complicated, please consider adding new error types for validation within TypedRoute/Body.

Can you explain why the error class should be separated?

Oh, I'm sorry.
I just tested it with the new project, and I confirmed that it's functioning as desired (giving a 400 error for invalid input and a 500 error for TypeGuardErrors within the app).
Thank you so much for resolving this.

Can you explain why the error class should be separated?

i think, using sparated error class is more compatible.
Many project  cannot always keep all libraries up to date. When using a specific version of NestJS with Nestia, there are cases where HttpExceptions propagated by Nestia's decorators cannot be caught by NestJS filters.
The reason is explained here: https://github.com/samchon/nestia/issues/353#issuecomment-1560665567
In such scenarios, to enable developers to handle errors smoothly, it is necessary for Nestia to define and export an independent exception class. As a result, developers can directly write catch code for it in their projects.
example version
"@nestjs/core": "8.2.6"
"@nestjs/common": "8.2.6"
"@nestia/core": "2.4.3"
in this case, nestjs HttpException filter can't catch error from nestia decorator.


Tabnavigator issue -- when back quickly from the second tab of tabnavigation

Back to previous screen immediately from the second tab of tabnavigator after slide in it,stacknavigator will rerender it, and no parameters will be passed to it. so tabnavigator will fail due to lack of some parameters.
I think this is caused by the second tab haven't complete load yet,  if back ,it will be crashed.
The error like this:

Can I get when tabnavigator  load finished?Thanks in advance

software
version

react-navigation
1.0.0-beta.11

react-native
0.46.0

node
8.1.3

npm or yarn
4.6.1

Hi @WeIio ,
could you provide a bit more of your code (structure of your routes, how do you nest the TabNavigator and Stacknavigator, etc.) please?
Or provide a https://snack.expo.io/ example reproducing it (ex: https://snack.expo.io/H1K3qbNS-) ?

@adrienthiery
Certainly! My code as below:
TabNavigator
const PayAndReceive =TabNavigator({
    Receive: {screen: Receive},
    Payment: {screen: Payment},
  },
  {
      tabBarOptions: IsAndroid?androidTabBarOptions:iosTabBarOptions,
      tabBarPosition:'top',
      swipeEnabled:true,
      lazy:false,
      backBehavior: 'initialRoute',
      initialRoute:'Receive'
  }
);

====
Root structure
const IndexRoute =StackNavigator({
    Index: {screen: Index},
    FirstPage: {screen: FirstPage},
    Record:{screen: Record},
    PayAndReceive:{screen:PayAndReceive,navigationOptions:({navigation}) => {
        return{
            title:  navigation.state.params.cointype + ' trade',
            headerLeft:<TouchableOpacity
                onPress={() => {
                    navigation.goBack();
                    navigation.state.params.getTotalFromDB();
                }}
                style={{paddingLeft:10}}>
              <SimpleLineIcons name="arrow-left" size={18} color='#ffffff'/>
            </TouchableOpacity>,
            headerTitleStyle: {
                color: '#ffffff',
                alignSelf: 'center',
                fontWeight: '500',
            },
            headerStyle:{backgroundColor:'#393a3f'},
            headerRight: <TouchableOpacity
                onPress={() => navigation.navigate('Record',{parentParams:navigation.state.params})}><Text style={{color:'white',fontSize: 16,paddingRight:10}}>交易记录</Text></TouchableOpacity>,
        }
    }},
}, {
    // headerMode: 'screen',
    initialRouteName:'Index',
    // initialRouteParams: {},
});

That's it! Please give me some ideas,thanks!

I reproduced your setup (I think) here: https://snack.expo.io/S1m97lSSb
But I can't manage to reproduce the error (I'm trying on Android)... Can you?
Is it on iOs/Android/both ?
Eventually, do you think you could take a video of it (https://stackoverflow.com/questions/25797990/capture-ios-simulator-video-for-app-preview) ?

@adrienthiery
I have checked https://snack.expo.io/S1m97lSSb. I think it's performace is so bad that it cannot reproduce my steps so well.
Additionally,maybe I need to review my code,  check whether any bugs was left.
Anyway , thanks for your help!

Pinging OP @WeIio since this issue has not been active for a while, and it's related to an old version of the lib.
Please let me know if you want this to remain open; if I get no answer in the next 7 days I will close it.

@kelset Previously , I used ScrollView to implement tabs, now I used drawerNavigator instead of it and no error occurs anymore. so please feel free to close it

May be I need to use this account to reply, haha ,sorry about that
@kelset Previously , I used ScrollView to implement tabs, now I used drawerNavigator instead of it and no error occurs anymore. so please feel free to close it


[Bug] Blue-Green Cluster Migration results in migration of healthcheck topic which causes timeout on GET /admin/v2/brokers/health

Search before asking

[X] I searched in the issues and found nothing similar.

Read release policy

[X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version
Latest on master  i.e.4.1.0
Minimal reproduce step

Create two local pulsar clusters (for me it was in Minikube) with the same clustername (different services)
Confirm healthcheck is passing e.g.

kubectl port-forward service/pulsar-broker 8080:8080
curl http://localhost:8080/admin/v2/brokers/health

Enable Cluster Migration from one cluster to the other e.g.

kubectl port-forward service/pulsar-broker 8080:8080
./bin/pulsar-admin clusters update-cluster-migration blue --broker-url  pulsar://pulsar-green-broker:6650 --service-url http://pulsar-green-broker:8080 --migrated

Monitor healthcheck on the original cluster

while true; do curl http://localhost:8080/admin/v2/brokers/health; date; sleep 5; done
ok
Wed Nov  6 09:37:51 EST 2024
ok
Wed Nov  6 09:37:56 EST 2024
.
.
Wed Nov  6 09:42:19 EST 2024
{"reason":"\n --- An unexpected error occurred in the server ---\n\nMessage: request timeout {'durationMs': '30000', 'reqId':'4072026808692081594', 'remote':'pulsar-broker-0.pulsar-broker.cogito.svc.cluster.local/<IP_ADDRESS>:6650', 'local':'/<IP_ADDRESS>:43376'}\n\nStacktrace:\n\norg.apache.pulsar.client.api.PulsarClientException$TimeoutException: request timeout {'durationMs': '30000', 'reqId':'4072026808692081594', 'remote':'pulsar-broker-0.pulsar-broker.cogito.svc.cluster.local/<IP_ADDRESS>:6650', 'local':'/<IP_ADDRESS>:43376'}\n\tat org.apache.pulsar.client.impl.ClientCnx.checkRequestTimeout(ClientCnx.java:1422)\n\tat org.apache.pulsar.common.util.Runnables$CatchingAndLoggingRunnable.run(Runnables.java:54)\n\tat io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)\n\tat io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:162)\n\tat io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)\n\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)\n\tat io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Unknown Source)\n"}

What did you expect to see?
The original "blue" cluster should appear to be healthy after cluster migration.
What did you see instead?
"Blue" cluster reports as not healthy.
Anything else?
I'm not sure it even makes sense logically to migrate the healthcheck.
Looking here it is surprising that the healthcheck topic does not register as an Internal topic
https://github.com/apache/pulsar/blob/c266db236df5f57bf59df1b25a23521419b2ad02/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L2923-L2926
https://github.com/apache/pulsar/blob/c266db236df5f57bf59df1b25a23521419b2ad02/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java#L822-L827
The healthcheck (heartbeat) topic name is defined here
https://github.com/apache/pulsar/blob/c266db236df5f57bf59df1b25a23521419b2ad02/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java#L422-L427
I might be interested in submitting a PR but would need some clarity on whether to change the logic in PersistentTopic.java e.g.
   public CompletableFuture<Void> checkClusterMigration() {
        if (ExtensibleLoadManagerImpl.isInternalTopic(topic)) {
            return CompletableFuture.completedFuture(null);
        }
.
.
ADD LOGIC HERE

or if it makes more sense that ExtensibleLoadManagerImpl.isInternalTopic returns true for the healthcheck topic also.
Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

cc: @rdhabalia This isn't as critical for me as the potential NonDurable subscription issue (which I am trying to get my arms around to help with reproduction).
Anyway I just wanted to make sure this was captured. If the fix is straightforward (see my question above) I'd be happy to submit it.