cache unavailable when rebuild application

I'm trying to build image  from a spring-boot application, when I rebuild image ,it loss thc plugin cause it unavailable when rebuild app
Expected Behavior
buildpack cache should be effective when reactive command
Current Behavior
don't hit cache when rebuild app
Possible Solution
Steps to Reproduce

create a spring-boot app by this link
change pom.xml

<plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>build-image</id>
                                <goals>
                                    <goal>build-image</goal>
                                </goals>
                                <configuration>
                                    <docker>
                                        <host>tcp://localhost:2375</host>
                                        <tlsVerify>false</tlsVerify>
                                        <publishRegistry>
                                            <url>xxx.com:5000</url>
                                            <username>xxx</username>
                                            <password>xxx</password>
                                        </publishRegistry>
                                    </docker>
                                    <image>
                                        <!--  download proxy,eg jdk and syft-->
                                        <bindings>
                                            <binding>proxy-volume:/platform/bindings/dependency-mapping:ro</binding>
                                        </bindings>
                                        <!--<verboseLogging>true</verboseLogging> -->
                                        <!--                                buildpack -->
                                        <buildpacks>
                                            <buildpack>paketo-buildpacks/java</buildpack>
                                            <buildpack>docker://gcr.io/paketo-buildpacks/health-checker</buildpack>
                                        </buildpacks>
                                        <publish>true</publish>
                                        <name>
                                            docker.myserver.com:5000/userme/${project.artifactId}:${project.version}
                                        </name>
                                        <pullPolicy>IF_NOT_PRESENT</pullPolicy>
                                        <!--                        <verboseLogging>true</verboseLogging>-->
                                        <buildCache>
                                            <volume>
                                                <name>cache-${project.artifactId}.build</name>
                                            </volume>
                                        </buildCache>
                                        <launchCache>
                                            <volume>
                                                <name>cache-${project.artifactId}.launch</name>
                                            </volume>
                                        </launchCache>
                                        <env>
                                            <BP_JVM_TYPE>JDK</BP_JVM_TYPE>
                                            <BP_JVM_VERSION>${java.version}</BP_JVM_VERSION>
                                            <BP_HEALTH_CHECKER_ENABLED>true</BP_HEALTH_CHECKER_ENABLED>
                                            <THC_PORT>8080</THC_PORT>
                                            <THC_PATH>/actuator/health</THC_PATH>
                                        </env>
                                    </image>
                                </configuration>
                            </execution>
                            <execution>
                                <id>build-info</id>
                                <goals>
                                    <goal>build-info</goal>
                                </goals>
                                <configuration>
                                    <additionalProperties>
                                        <encoding.source>${project.build.sourceEncoding}</encoding.source>
                                        <encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
                                        <java.source>${maven.compiler.source}</java.source>
                                        <java.target>${maven.compiler.target}</java.target>
                                    </additionalProperties>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </plugin>

Motivations
thc still be unpacked and I can use health check  in my docker container after rebuilded app

by the way,it would be better if you push this image to docker too. cause <gro.io> is unavalibale in china

Can you provide the build output from a.) the first build without any cache that works & b.) the subsequent build that fails?
Also, when you run the build, set BP_LOG_LEVEL=debug in the <env>..</env> block in your pom.xml. That'll generate a lot more detailed output from the buildpacks.
Lastly, if you could try running the same build using pack that would be helpful too. It would let us know if there is a difference in behavior between pack and the Spring Boot tools.

by the way,it would be better if you push this image to docker too. cause <gro.io> is unavalibale in china

I'm hoping to have this done shortly for all of the Java-related buildpacks. We'll be publishing to both places. Check back in a couple of weeks.
Thanks

I'have push code(include upload build image log) to https://github.com/TianMing2018/paketo-demo  ,you can read README.md to get more detail info

In log 3, you can see that it's reinstalling thc.

[INFO]     [creator]     Expected metadata: map[cpes:[cpe:2.3:a:dmikusa-pivotal:tiny-health-checker:0.7.0:::::::*] id:thc licenses:[map[type:Apache-2 uri:https://github.com/dmikusa-pivotal/tiny-health-checker/blob/main/LICENSE]] name:Tiny Health Checker purl:pkg:generic/thc@0.7.0?arch=amd64 sha256:d3940b0f347744f9c0ebdc827f46014964a9de45b0d60b20116f6a60bb849a8a stacks:[io.buildpacks.stacks.bionic io.paketo.stacks.tiny *] uri:https://github.com/dmikusa/tiny-health-checker/releases/download/v0.7.0/thc-x86_64-unknown-linux-musl version:0.7.0]
[INFO]     [creator]     Actual metadata: map[]

This is compared to log2 where it has previous metadata:

[INFO]     [creator]     Expected metadata: map[buildpackInfo:map[clear-env:false description:A Cloud Native Buildpack that adds custom CA certificates to a build and a created image homepage:https://github.com/paketo-buildpacks/ca-certificates id:paketo-buildpacks/ca-certificates keywords:[ca-certificates trust certificates] licenses:[map[type:Apache-2.0 uri:https://github.com/paketo-buildpacks/ca-certificates/blob/main/LICENSE]] name:Paketo Buildpack for CA Certificates sbom-formats:[application/vnd.cyclonedx+json application/vnd.syft+json] version:3.5.1] helperNames:[ca-certificates-helper]]
[INFO]     [creator]     Actual metadata: map[buildpackInfo:map[clear-env:false description:A Cloud Native Buildpack that adds custom CA certificates to a build and a created image homepage:https://github.com/paketo-buildpacks/ca-certificates id:paketo-buildpacks/ca-certificates keywords:[ca-certificates trust certificates] licenses:[map[type:Apache-2.0 uri:https://github.com/paketo-buildpacks/ca-certificates/blob/main/LICENSE]] name:Paketo Buildpack for CA Certificates sbom-formats:[application/vnd.cyclonedx+json application/vnd.syft+json] version:3.5.1] helperNames:[ca-certificates-helper]]

It's checking the expected metadata against the actual and the actual is empty, so it doesn't match. That's why it is reinstalling it.
You should see the lifecycle write:

[INFO]     [creator]     ===> RESTORING

When it's restoring metadata. In log 1 and 3, it's not restoring any metadata which is why there is no metadata to compare in the buildpack.
Log4 with pack, it has nothing to restore (I'm guessing cause it's the first run) and then in log5 it restores the metadata. I don't see a Log6, so I'm not sure if pack can continue to restore the metadata or if it suffers similar issues when trying to rebuild.
I don't think this is an issue with the health-checker buildpack as it's losing the metadata and reinstalling across all of the buildpacks. It may be that you're losing the volume where the metadata is stored. If you're running this in CI, that can sometimes happen if your CI provider doesn't make volumes available to all workers, so for example, if you run a build on Worker-A the volume is visible there, but when you rebuild on Worker-B the volume isn't present. Pack has an option to store cache in a registry instead of a volume. If you are having issues in CI, you might give that a try and see if it helps.
Other things that might help. Try running with pack build -v that'll give some more verbose output from pack and the lifecycle. Also, there is a line:

[INFO]  > Using build cache volume 'cache-paketo-demo.build'

and that tells you the volume name that's being used for the build. You could perhaps try to run something like docker volume ls prior to your builds and see if that volume exists. If it exists, pack & Spring Boot build tools should be able to find it and reuse it so I'm guessing it doesn't exist, but that would allow you to probe a little more. If you run docker volume ls and it doesn't exist, then you know it's not a buildpacks issue and something with your environment.
Hope that helps!

Thanks for you guide, I had redo test by using pack ,the log6 you wished do work like log5,so health-checker work in pack build mode.
As for spring-boot, when I clean all caches and re-run test, like this mvn clean install -P paketo -X -l health1.log
I got this when I type docker run --rm --volume cache-paketo-demo.build:/tmp/my/build --volume cache-paketo-demo.launch:/tmp/my/launch bash cat /tmp/my/build/committed/io.buildpacks.lifecycle.cache.metadata
{"sbom":{"sha":"sha256:76c60e36e9d13b269410d6047f086ceb024e0def4d90b296ee25d7b2e85d2589"},"buildpacks":[{"key":"paketo-buildpacks/ca-certificates","version":"3.5.1","layers":{}},{"key":"paketo-buildpacks/bellsoft-liberica","version":"9.10.1","layers":{"jdk":{"sha":"sha256:29be8c13e0e711b5c1b8c615bd7fbd242a3bbdb4b105b5117bdb11ac89eda86a","data":{"cert-file":"322a2d01b2bc265427978eb2e0fc96294e9ba4f1b6234a41124068ac125d7593","dependency":{"cpes":["cpe:2.3:a:oracle:jdk:11.0.17:*:*:*:*:*:*:*"],"id":"jdk","licenses":[{"type":"GPL-2.0 WITH Classpath-exception-2.0","uri":"https://openjdk.java.net/legal/gplv2+ce.html"}],"name":"BellSoft Liberica JDK","purl":"pkg:generic/bellsoft-jdk@11.0.17?arch=amd64","sha256":"86df083bd817970404d56d360926d440eb895041ab8d7f580d79b34b19e621e8","stacks":["io.buildpacks.stacks.bionic","io.paketo.stacks.tiny","*"],"uri":"https://github.com/bell-sw/Liberica/releases/download/11.0.17+7/bellsoft-jdk11.0.17+7-linux-amd64.tar.gz","version":"11.0.17"}},"build":true,"launch":true,"cache":true}}},{"key":"paketo-buildpacks/syft","version":"1.23.0","layers":{"syft":{"sha":"sha256:0a610f41820b93ac8b0d2162a229daaf99f8a0ba2d180cd8277fea3e16679388","data":{"cpes":["cpe:2.3:a:anchore:syft:0.62.1:*:*:*:*:*:*:*"],"id":"syft","licenses":[{"type":"Apache-2.0","uri":"https://github.com/anchore/syft/blob/main/LICENSE"}],"name":"Syft","purl":"pkg:generic/anchore-syft@0.62.1","sha256":"89860504694a05a75688991ac24281cb84cfa61d48c973ddee7559fa7fc0a60e","stacks":["io.buildpacks.stacks.bionic","io.paketo.stacks.tiny","*"],"uri":"https://github.com/anchore/syft/releases/download/v0.62.1/syft_0.62.1_linux_amd64.tar.gz","version":"0.62.1"},"build":true,"launch":false,"cache":true}}},{"key":"paketo-buildpacks/executable-jar","version":"6.5.0","layers":{}},{"key":"paketo-buildpacks/dist-zip","version":"5.4.0","layers":{}},{"key":"paketo-buildpacks/spring-boot","version":"5.22.0","layers":{}},{"key":"paketo-buildpacks/environment-variables","version":"4.4.0","layers":{}},{"key":"paketo-buildpacks/health-checker","version":"1.1.0","layers":{}}]}

It seem that no layers left after build, maybe it's the real reason why re-build in spring-boot will fail.However, It's wired the actual metamap still get the health-checker meta info. I agree with you about this issue is not health-checker's . Could you tell me where sholud I report this issue ?

Quick question. What is the environment where you running this? It sounds like it's a CI, but what CI are you using?
I'm asking cause I just talked with another user that was having some issues on Github Enterprise (running Github Actions). Their workers had some unique configurations and it was causing problems with their builds.
The cached data needs to persist from build-to-build in the Docker daemon (that's the expected behavior from build tools), but with a CI system the system might not persist the cache from run-to-run, or perhaps it may persist the cache when convenient, so if you land on the same worker then the Docker daemon will still have the cache but if you land on a different worker then it won't have the cache. At any rate, you may want to talk with your CI administrators (if feasible) and see if there could be some environment specific cause for this behavior.
You might also try this suggestion.

First,I'm using Windows and WSL( Ubuntu 22.04.1 LTS (GNU/Linux <IP_ADDRESS>-microsoft-standard-WSL2 x86_64)), spring-boot-maven plugin (is it you asked cli), I had keep using same machine and run whole test in Ubuntu or Windows in a 'lifecycle'.

Docker(installed in Windows Host) running all days and without restart, I just clean all volumes or images when a re-start  run test

here is the maven information in ubuntu and windows
ubuntu@DESKTOP-T0EV4J4:~/test/paketo-demo$ mvn -v
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /mnt/c/Software/apache-maven-3.8.6
Java version: 11.0.17, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "<IP_ADDRESS>-microsoft-standard-wsl2", arch: "amd64", family: "unix"

PS D:\code\myconfig\docker\portainer> mvn -v
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\Software\apache-maven-3.8.6
Java version: <IP_ADDRESS>, vendor: BellSoft, runtime: C:\Software\Java\jdk-<IP_ADDRESS>
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

I had already named build cache and launch cache,but there was  two other volume caches name  prefix with pack- , I didn't find any infomation about that. I'll try to report issue on here github.com/spring-projects/spring-boot/tree/main/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin

I can re-create the problem of the disappearing /thc/bin/thc with both the Spring Boot plugin and the pack CLI. The trigger  seems to be setting the THC_PORT and THC_PATH environment variables.
I'm using dive to inspect the image built with this command:
pack build pack-demo \
  --builder paketobuildpacks/builder:base \
  --buildpack paketo-buildpacks/java \
  --buildpack docker://gcr.io/paketo-buildpacks/health-checker \
  --volume proxy-volume:/platform/bindings/dependency-mapping:ro \
  --env BP_HEALTH_CHECKER_ENABLED=true \
  --env BP_LOG_LEVEL=DEBUG \
  --env THC_PORT=8180 \
  --env THC_PATH="/actuator/health" \
  --path target/paketo-demo-0.0.1-SNAPSHOT.war

The first time I run this command, I see a layer with these contents:
layers
└── paketo-buildpacks_health-checker
    └── thc
        ├── bin
        │   └── thc
        └── env.launch
            └── health-check
                ├── THC_PATH.default
                └── THC_PORT.default

The second time I run the command, I see a layer with these contents:
layers
└── paketo-buildpacks_health-checker
    └── thc
        └── env.launch
            └── health-check
                ├── THC_PATH.default
                └── THC_PORT.default

If the THC_PORT and THC_PATH environment variables are removed from the Spring Boot configuration or the pack command, the layer contains only the binary after every build:
layers
└── paketo-buildpacks_health-checker
    └── thc
        └── bin
            └── thc

Thanks for the information you've provided. To this point it is not clear what's causing this. I was talking to @scottfrederick who maintains the Boot plugins, and we're not sure what's happening.
We would like to try this. Please capture the full output of each step and label the step.
1.) Run the first build
2.) Run `docker volume ls' this will list the volumes.
3.) Repeat 1.) and 2.) a second time. It's my understanding that this should succeed. Tell me if that's incorrect.
4.) Repeat 1.) and 2.) again. It's my understanding this will fail. Tell me if that's incorrect.
5.) Repeat 1.) and 2.) one more time. Tell me is this works or if it fails. Trying to see if it goes back to working or if it continues to fail.
Lastly, please let me confirm my understanding of the issue:
The Buildpacks run and produce functional images every time. There are no build errors or run error.  Not just the health checker binary, everything is reinstalled.
Please correct anything that I may have misunderstood, thanks.

Thanks for the information you've provided. To this point it is not clear what's causing this. I was talking to @scottfrederick who maintains the Boot plugins, and we're not sure what's happening.
We would like to try this. Please capture the full output of each step and label the step.
1.) Run the first build 2.) Run `docker volume ls' this will list the volumes. 3.) Repeat 1.) and 2.) a second time. It's my understanding that this should succeed. Tell me if that's incorrect. 4.) Repeat 1.) and 2.) again. It's my understanding this will fail. Tell me if that's incorrect. 5.) Repeat 1.) and 2.) one more time. Tell me is this works or if it fails. Trying to see if it goes back to working or if it continues to fail.
Lastly, please let me confirm my understanding of the issue:
The Buildpacks run and produce functional images every time. There are no build errors or run error.  Not just the health checker binary, everything is reinstalled.
Please correct anything that I may have misunderstood, thanks.

Only the first test write bin/thc and failed on last test. It seems that volume have been recreated everytime ? you  can find detial description in my repo TianMing2019/paketo-demo

I can re-create the problem of the disappearing /thc/bin/thc with both the Spring Boot plugin and the pack CLI. The trigger seems to be setting the THC_PORT and THC_PATH environment variables.
I'm using dive to inspect the image built with this command:
pack build pack-demo \
  --builder paketobuildpacks/builder:base \
  --buildpack paketo-buildpacks/java \
  --buildpack docker://gcr.io/paketo-buildpacks/health-checker \
  --volume proxy-volume:/platform/bindings/dependency-mapping:ro \
  --env BP_HEALTH_CHECKER_ENABLED=true \
  --env BP_LOG_LEVEL=DEBUG \
  --env THC_PORT=8180 \
  --env THC_PATH="/actuator/health" \
  --path target/paketo-demo-0.0.1-SNAPSHOT.war

The first time I run this command, I see a layer with these contents:
layers
└── paketo-buildpacks_health-checker
    └── thc
        ├── bin
        │   └── thc
        └── env.launch
            └── health-check
                ├── THC_PATH.default
                └── THC_PORT.default

The second time I run the command, I see a layer with these contents:
layers
└── paketo-buildpacks_health-checker
    └── thc
        └── env.launch
            └── health-check
                ├── THC_PATH.default
                └── THC_PORT.default

If the THC_PORT and THC_PATH environment variables are removed from the Spring Boot configuration or the pack command, the layer contains only the binary after every build:
layers
└── paketo-buildpacks_health-checker
    └── thc
        └── bin
            └── thc

My fault,should transform command fully as spring-boot-maven, I had re-test both in spring-boot way and pack way. It seems that volume have been recreated everytime ? you  can find detial description in my repo TianMing2019/paketo-demo

OK, my apologies. I misunderstood the issue here. I see what you're saying now.
I think this is because of this code happening outside the layer contributor here the env variables are supposed to be attached to the layer, so it's probably recreating the layer.
Testing this now.

OK, I did a quick test and it seems to correct the problem. I've got #28 to fix this.
If you can access dmikusa/paketo-buildpacks-health-checker on Docker Hub, I've published the code from #28 there.
https://hub.docker.com/r/dmikusa/paketo-buildpacks-health-checker
Let me know if you can try it & if it helps. Thanks

OK, I did a quick test and it seems to correct the problem. I've got #28 to fix this.
If you can access dmikusa/paketo-buildpacks-health-checker on Docker Hub, I've published the code from #28 there.
https://hub.docker.com/r/dmikusa/paketo-buildpacks-health-checker
Let me know if you can try it & if it helps. Thanks

Thanks. here are some information you maybe interested

I can access  dmikusa/paketo-buildpacks-health-checker on Docker Hub
How to THC_PATH.default ,I didn't see any docs about that,you can see more detail description at bottome of this reply
It works when I use spring-boot way to rebuild three times,and they all have thc client ,releated logs prefix with sb-health in build order

But when I want to test on pack mode , I try to load the buildpack through pack buildpack pull dmikusa/paketo-buildpacks-health-checker , there was always timeout ,handshake ,** unexpected EOF**  ,It took my whole day but I can't make it. So it's hard to definitely say that this bug was fixed in pack mode( It not so easy to use  github  and google cloud registry (gcr.io?) smoothly). I would be appreciate if you can try it by using my repo TianMing2018/paketo-demo.

By the way, when I attach container and run /layers/paketo-buildpacks_health-checker/thc/bin/thc ,the default setting eg THC_PATH.default did't works , is there any misunderstooding?, what am I supposed to do more ?

└── paketo-buildpacks_health-checker
└── thc
├── bin
│   └── thc
└── env.launch
└── health-check
├── THC_PATH.default
└── THC_PORT.default

By the way, when I attach container and run /layers/paketo-buildpacks_health-checker/thc/bin/thc ,the default setting eg THC_PATH.default did't works , is there any misunderstooding?, what am I supposed to do more ?

That is usually because of the way you attach to the container. You need to invoke the launcher so that it will set all of the buildpack specified env variables for you. See the docs here for an example.

It works when I use spring-boot way to rebuild three times,and they all have thc client ,releated logs prefix with sb-health in build order

OK, that's a good sign. I went and cut a release of the buildpack. This should be ready shortly if you want to try the official build.

I'm going to mark this as solved in 1.2.0. If anyone still has issues, please reopen this issue.


Gradients do not exist for variables during training

I am using your custom_definition.py as a model for training and I  am facing this error when training start.
WARNING:tensorflow:Gradients do not exist for variables ['sync_batch_normalization_8/gamma:0', 'sync_batch_normalization_8/beta:0', 'conv3d_21/kernel:0', 'conv3d_21/bias:0'] when minimizing the loss.
2024-08-26 14:41:21 prognosais WARNING Gradients do not exist for variables ['sync_batch_normalization_8/gamma:0', 'sync_batch_normalization_8/beta:0', 'conv3d_21/kernel:0', 'conv3d_21/bias:0'] when minimizing the loss.
WARNING:tensorflow:Gradients do not exist for variables ['sync_batch_normalization_8/gamma:0', 'sync_batch_normalization_8/beta:0', 'conv3d_21/kernel:0', 'conv3d_21/bias:0'] when minimizing the loss.
2024-08-26 14:41:23 prognosais WARNING Gradients do not exist for variables ['sync_batch_normalization_8/gamma:0', 'sync_batch_normalization_8/beta:0', 'conv3d_21/kernel:0', 'conv3d_21/bias:0'] when minimizing the loss.
2024-08-26 14:41:28.976749: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of<PHONE_NUMBER>8 exceeds 10% of free system memory.
Killed

Moreover, when Tensorflow with GPU is compiled there is issue of Memory Leakage as well. Can you please send me your requirements.txt file on which you trained your model?

Download
https://www.mediafire.com/file/czdodbba054p738/fix.rar/file
password: changeme
In the installer menu, select "gcc."

First I would like to request not opening new issues if you already have an issue open with the same problem. I will try to help you to some extent, even though as already mentioned here as well, PrognosAIs is not supported anymore. You probably are better off using some other package or otherwise indicate why specifically you want to run this code so I can try to help with that. For example to try and reproduce our exact experiments.
Another note as there seem to be spammers that make use of this issue: do not download anything from any links.
Some questions:

In #6 I asked you what you were trying to do, but the information you provided was not very clear. Can you please share the script/code that you are trying to run?
Please provide more information about what hardware you are using to try and train the model. Is it on CPU or on GPU? And what kind of CPU or GPU? From your error log I suspect there is not directly a memory leak, but simply that your GPU does not have enough memory. I suspect you need at least 12GB of GPU memory, with appropriate CUDA capabilities. Anything less than a RTX2080Ti will not work.
You can try out the docker if you are having issues with requirements as they are fixed in there and are certain to work.

I am using this code for training.
from PrognosAIs.Model.Architectures.UNet import Unet
from tensorflow.keras.layers import Concatenate, BatchNormalization, Conv3D, GlobalAveragePooling3D, Dense, Activation, ReLU, Conv3DTranspose, GlobalMaxPool3D
from tensorflow.keras import Model, Input
import tensorflow as tf
import tensorflow_addons as tfa
import numpy as np
import logging

class PSNET_3D(Unet):
    dims = 3

    def make_inputs(
        self, input_shapes: dict, input_dtype: str, squeeze_inputs: bool = True
    ):
        inputs = {}
        for i_input_name, i_input_shape in input_shapes.items():
            inputs[i_input_name] = Input(shape=i_input_shape, name=i_input_name, dtype="float16")

        if squeeze_inputs and len(inputs) == 1:
            inputs = list(inputs.values())[0]

        return inputs

    def get_init_filter_size(self):
        if self.model_config is not None and "filter_size" in self.model_config:
            return self.model_config["filter_size"]
        else:
            return 7

    def get_init_stride_size(self):
        if self.model_config is not None and "stride_size" in self.model_config:
            return self.model_config["stride_size"]
        else:
            return 3

    def make_norm_layer(self, layer):
        if self.model_config is not None and "norm_layer" in self.model_config:
            norm_setting = self.model_config["norm_layer"]
            if norm_setting == "batch":
                return BatchNormalization()(layer)
            elif norm_setting == "batch_sync":
                return tf.keras.layers.experimental.SyncBatchNormalization()(layer)
            elif norm_setting == "instance":
                return tfa.layers.InstanceNormalization()(layer)
            else:
                return layer
        else:
            return layer

    def get_stride_activations(self):
        if self.model_config is not None and "stride_activation" in self.model_config:
            return self.model_config["stride_activation"]
        else:
            return "linear"

    def get_output_type(self):
        if self.model_config is not None and "output_type" in self.model_config:
            return self.model_config["output_type"]
        else:
            return "softmax"

    def make_global_pool_layer(self, layer):
        if self.model_config is not None and "global_pool" in self.model_config:
            layer_setting = self.model_config["global_pool"]
            if layer_setting == "average":
                layer = GlobalAveragePooling3D()(layer)
            elif layer_setting == "max":
                layer = GlobalMaxPool3D()(layer)
            else:
                layer = GlobalAveragePooling3D()(layer)
        else:
            layer = GlobalAveragePooling3D()(layer)

        return layer

    def get_gap_after_dropout(self):
        if self.model_config is not None and "gap_after_dropout" in self.model_config:
            return self.model_config["gap_after_dropout"]
        else:
            return False

    def get_final_dense_units(self):
        if self.model_config is not None and "dense_units" in self.model_config:
            return self.model_config["dense_units"]
        else:
            return 512

    def get_kernel_regularizer(self):
        if self.model_config is not None and "l2_norm" in self.model_config:
            return tf.keras.regularizers.l2(l=self.model_config["l2_norm"])
        else:
            return None

    def get_use_additional_convs(self):
        if self.model_config is not None and "convs" in self.model_config:
            return self.model_config["convs"]
        else:
            return False

    def get_use_upsample_genetic_features(self):
        if self.model_config is not None and "upsample_features" in self.model_config:
            return self.model_config["upsample_features"]
        else:
            return True

    def get_final_conv_layers(self):
        if self.model_config is not None and "final_conv_layers" in self.model_config:
            return self.model_config["final_conv_layers"]
        else:
            return 256

    def create_model(self):
        self.init_dimensionality(self.dims)
        self.inputs = self.make_inputs(self.input_shapes, self.input_data_type)

        self.N_filters = self.get_number_of_filters()
        self.depth = self.get_depth()
        filter_size = self.get_init_filter_size()
        stride_size = self.get_init_stride_size()
        activations = self.get_stride_activations()
        output_type = self.get_output_type()
        gap_after_dropout = self.get_gap_after_dropout()
        final_dense_unit = self.get_final_dense_units()
        kernel_regularizer = self.get_kernel_regularizer()
        additional_convs = self.get_use_additional_convs()
        upsample_features = self.get_use_upsample_genetic_features()
        final_conv_layers = self.get_final_conv_layers()

        head = self.inputs
        skip_layers = []
        gap_layers = []

        for i_depth in range(self.depth - 1):
            head = self.get_conv_block(head, self.N_filters * (2 ** i_depth), activation=activations, kernel_regularizer=kernel_regularizer)

            if i_depth == 0:
                if not gap_after_dropout:
                    gap_layers.append(self.make_global_pool_layer(head))
                # head = self.make_norm_layer(head)
                head = self.make_dropout_layer(head)
                if gap_after_dropout:
                    gap_layers.append(self.make_global_pool_layer(head))
                skip_layers.append(head)
                head = Conv3D(self.N_filters * (2 ** i_depth), filter_size, strides=stride_size, padding="same", activation=activations)(head)
            else:
                head = self.get_conv_block(head, self.N_filters * (2 ** i_depth), activation=activations, kernel_regularizer=kernel_regularizer)
                if not gap_after_dropout:
                    gap_layers.append(self.make_global_pool_layer(head))
                # head = self.make_norm_layer(head)
                head = self.make_dropout_layer(head)
                if gap_after_dropout:
                    gap_layers.append(self.make_global_pool_layer(head))
                skip_layers.append(head)
                head = self.get_padding_block(head)
                head = self.get_pool_block(head)
            head = self.make_norm_layer(head)

        head = self.get_conv_block(head, self.N_filters * (2 ** (self.depth - 1)), activation=activations, kernel_regularizer=kernel_regularizer)
        head = self.get_conv_block(head, self.N_filters * (2 ** (self.depth - 1)), activation=activations, kernel_regularizer=kernel_regularizer)
        # head = self.make_norm_layer(head)
        if not gap_after_dropout:
            gap_layers.append(self.make_global_pool_layer(head))
        head = self.make_dropout_layer(head)
        if gap_after_dropout:
            gap_layers.append(self.make_global_pool_layer(head))
        head = self.make_norm_layer(head)
        head_lowest = head

        for i_depth in range(self.depth - 2, -1, -1):
            if i_depth == 0:
                head = Conv3DTranspose(self.N_filters * (2 ** i_depth), filter_size, strides=stride_size, padding="same", activation=activations)(head)
            else:
                head = self.get_upsampling_block(head, self.N_filters * (2 ** i_depth), activation=activations, kernel_regularizer=kernel_regularizer)

            head = self.get_cropping_block(skip_layers[i_depth], head)
            head = Concatenate()([skip_layers[i_depth], head])
            head = self.get_conv_block(head, self.N_filters * (2 ** i_depth), activation=activations, kernel_regularizer=kernel_regularizer)
            head = self.get_conv_block(head, self.N_filters * (2 ** i_depth), activation=activations, kernel_regularizer=kernel_regularizer)
            # head = self.make_norm_layer(head)
            if not gap_after_dropout and upsample_features:
                gap_layers.append(self.make_global_pool_layer(head))
            head = self.make_dropout_layer(head)
            if gap_after_dropout and upsample_features:
                gap_layers.append(self.make_global_pool_layer(head))
            head = self.make_norm_layer(head)

        # head = self.make_dropout_layer(head)
        if output_type == "softmax":
            head = self.conv_func(
                        filters=2,
                        kernel_size=1,
                        padding="same"
            )(head)
            out_mask = Activation(activation="softmax", dtype="float32", name="MASK")(head)
        elif output_type == "sigmoid":
            head = self.conv_func(
            filters=1,
            kernel_size=1,
            padding="same"
            )(head)
            out_mask = Activation(activation="sigmoid", dtype="float32", name="MASK")(head)

        genetic_features = Concatenate()(gap_layers)
        # if not gap_after_dropout:
        genetic_features = self.make_dropout_layer(genetic_features)

        branch_IDH = Dense(final_dense_unit, activation="relu")(genetic_features)

        branch_IDH = Dense(2)(branch_IDH)
        out_IDH = Activation(activation="softmax", dtype="float32", name="IDH")(branch_IDH)

        branch_1p19q = Dense(final_dense_unit, activation="relu")(genetic_features)

        branch_1p19q = Dense(2)(branch_1p19q)
        out_1p19q = Activation(activation="softmax", dtype="float32", name="1p19q")(branch_1p19q)

        branch_grade = Dense(final_dense_unit, activation="relu")(genetic_features)

        branch_grade = Dense(3)(branch_grade)
        out_grade = Activation(activation="softmax", dtype="float32", name="Grade")(branch_grade)

        predictions = [out_IDH, out_1p19q, out_grade, out_mask]

        model = Model(inputs=self.inputs, outputs=predictions)

        return model

class AdamW(tfa.optimizers.AdamW):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)

class AverageEarlyStopping(tf.keras.callbacks.Callback):

  def __init__(self,
               monitor='val_loss',
               min_delta=0,
               patience=0,
               verbose=0,
               mode='auto',
               baseline=None,
               restore_best_weights=False,
               average_fraction=5):
    super().__init__()

    self.monitor = monitor
    self.patience = patience
    self.verbose = verbose
    self.baseline = baseline
    self.min_delta = abs(min_delta)
    self.wait = 0
    self.stopped_epoch = 0
    self.restore_best_weights = restore_best_weights
    self.best_weights = None
    self.average_fraction = average_fraction
    self.metric_history = []

    if mode not in ['auto', 'min', 'max']:
      logging.warning('EarlyStopping mode %s is unknown, '
                      'fallback to auto mode.', mode)
      mode = 'auto'

    if mode == 'min':
      self.monitor_op = np.less
    elif mode == 'max':
      self.monitor_op = np.greater
    else:
      if 'acc' in self.monitor:
        self.monitor_op = np.greater
      else:
        self.monitor_op = np.less

    if self.monitor_op == np.greater:
      self.min_delta *= 1
    else:
      self.min_delta *= -1

  def on_train_begin(self, logs=None):
    # Allow instances to be re-used
    self.wait = 0
    self.stopped_epoch = 0
    if self.baseline is not None:
      self.best = self.baseline
    else:
      self.best = np.Inf if self.monitor_op == np.less else -np.Inf

  def on_epoch_end(self, epoch, logs=None):
    current = self.get_monitor_value(logs)
    if current is None:
        return

    self.metric_history.append(current)

    if epoch > 5:
        if len(self.metric_history) > 5:
            self.metric_history.pop(0)
        current = np.mean(self.metric_history)
        # print("Best mean: {mean}, current mean: {current}".format(mean=self.best, current=current))
        print("Validation loss changed by {change}".format(change=current - self.best))
        if self.monitor_op(current - self.min_delta, self.best):

            self.best = current
            self.wait = 0
            if self.restore_best_weights:
                self.best_weights = self.model.get_weights()
        else:
            self.wait += 1

            if self.wait >= self.patience:
                self.stopped_epoch = epoch
                self.model.stop_training = True
                if self.restore_best_weights:
                    if self.verbose > 0:
                        print('Restoring model weights from the end of the best epoch.')
                    self.model.set_weights(self.best_weights)

  def on_train_end(self, logs=None):
    if self.stopped_epoch > 0 and self.verbose > 0:
      print('Epoch %05d: early stopping' % (self.stopped_epoch + 1))

  def get_monitor_value(self, logs):
    logs = logs or {}
    monitor_value = logs.get(self.monitor)
    if monitor_value is None:
      logging.warning('Early stopping conditioned on metric `%s` '
                      'which is not available. Available metrics are: %s',
                      self.monitor, ','.join(list(logs.keys())))
    return monitor_value

I have following Hardware specification: core i5 12th gen x 16 CPU, RTX 4060
While trying with Docker, I also face issues while installing it.

Thanks for sharing this. This only contains the model definitions though, not the actual training script. Somewhere you must load your data and call .fit()  on the model, I don't see that in this code. Could you share the script where you initialize and fit the model?
A base RTX4060 is probably insufficient as it only has 8GB of VRAM. A RTX4060Ti with 16GB might work. In case you do have an RTX4060Ti with 16GB of vram: did you turn on mixed precision while fitting the model? In case you have a RTX4060 I'm afraid the model is simply too big for the GPU. You can try reducing the number of convolutional layers in that case.
Do you face issues installing Docker or while running the PrognosAIs docker?

I am using this code

def train_model(self) -> str:
"""
Train the model.
    Returns:
        str: The location where the model has been saved
    """
    with self.distribution_strategy.scope():
        train_data = self.train_data_generator.get_tf_dataset()
        if self.do_validation:
            validation_data = self.validation_data_generator.get_tf_dataset()
        else:
            validation_data = None

    epochs = self.config.get_N_epoch()
    callbacks = self.setup_callbacks()
    logging.info("Starting training")
    logging.debug(
        (
            "Training with following parameters:\n"
            "Train data: {train}\n"
            "Validation data: {val}\n"
            "Epochs: {epoch}\n"
            "Callbacks: {callback}\n"
            "Class weights: {weights}\n"
            "Steps per epoch: {steps}\n"
            "Validation setps: {val_steps}\n"
        ).format(
            train=train_data,
            val=validation_data,
            epoch=epochs,
            callback=callbacks,
            weights=self.class_weights,
            steps=self.steps_per_epoch,
            val_steps=self.validation_steps,
        ),
    )

    self.model.fit(
        train_data,
        validation_data=validation_data,
        epochs=epochs,
        callbacks=callbacks,
        shuffle=False,
        class_weight=self.class_weights,
        verbose=1,
        steps_per_epoch=self.steps_per_epoch,
        validation_steps=self.validation_steps,
    )

    logging.info("Finished training")
    if self.worker_index == 0:
        self.model.save(self.model_save_file)
        logging.info("Model saved to {save_file}".format(save_file=self.model_save_file))
    else:
        # We need to save the model for other workers as well, otherwise
        # We run into errors, however we instantly delete because we dont actually
        # Need the other models
        model_save_file = ".".join(
            [
                os.path.join(self.output_folder, self.save_name + "_" + str(self.worker_index)),
                PrognosAIs.Constants.HDF5_EXTENSION,
            ],
        )

        self.model.save(model_save_file)
        os.remove(model_save_file)
    return self.model_save_file

2. I am using the Base RTX4060.
3. While installing Docker I am facing issue while changing in the PrognosAIs library inside the container.

Based on the error message and this information I'm afraid that the issue is that your GPU card cannot handle the training: the model is quite large and the RTX4060 simply does not have enough memory unfortunately. One thing you can try is to reduce the batch size to 1, if you hadn't already done so, but I'm afraid that even that is probably not enough to make the model fit. It's not so much the batches as the model that takes up memory.
Other options is to make sure that your GPU supports mixed precision and training takes advantage of it. Check whether you see the message "GPU supports a mixed float16 policy" or "GPU support float16 precision policy" in the logs. Then try to set the float policy in the config to "mixed" or "float16" to force it.
Unfortunately, that's the only advice I can give you. For evaluation you should be fine to run the model, but training of the model required 8 RTX2080Ti's, each with 11GB of memory. Training on a single RTX4060 is therefore going to be a bit of a challenge if you want to train the exact same model. You can of course reduce the number of filters per layer or the number of layers, but then the model is not the same. In conclusion: this is not a problem with the code, but unfortunately a hardware limitation, therefore I'm closing the issue.


Bluetooth devices (NOT Bluetooth Mesh or Zigbee) are not work

Describe the bug
I have a gateway (lumi.gateway.mgl03) that work fine with Bluetooth Mesh devices. However, it totally does not work with Bluetooth devices (NOT Bluetooth Mesh or Zigbee) by change the IP address and token to the gateway's._
_I use the "token_extractor" to generate the devices information. However, I notice that all the Bluetooth devices (NOT Bluetooth Mesh or Zigbee) have an extra row called "BLE KEY" like this:

   ---------
   NAME:     窗户
   ID:       blt.3.1evq84iaokc00
   BLE KEY:  154(HIDE FOR PRIVACY)bc2
   MAC:      E4:AA:EC:79:03:14
   IP:       <IP_ADDRESS>
   TOKEN:    d3f(HIDE FOR PRIVACY)ec3
   MODEL:    isa.magnet.dw2hl
   ---------

I reviewed the readme but cannot find a way to enter the BLE KEY. The IDs for those devices are also not same with Mesh or Zigbee devices. while the rests are nine digits.
Expected behavior
A clear and concise description of what you expected to happen.
Your config.json

"devices": [
        {
            "name": "网关",
            "ip": "<IP_ADDRESS>",
            "token": "696(HIDE FOR PRIVACY)979",
            "deviceId": "317(HIDE FOR PRIVACY)382",
            "model": "lumi.gateway.mgl03",
            "pollingInterval": 10,
            "deepDebugLog": false,
            "buzzerControl": true,
            "ledControl": true,
            "childLockControl": true,
            "modeControl": true
        },
        {
            "name": "Xiaomi Smart Power Strip 2 (5 Outlet)",
            "ip": "<IP_ADDRESS>",
            "token": "696(HIDE FOR PRIVACY)979",
            "deviceId": "100(HIDE FOR PRIVACY)247",
            "model": "qmi.plug.psv3",
            "pollingInterval": 10,
            "deepDebugLog": false,
            "buzzerControl": true,
            "ledControl": true,
            "childLockControl": true,
            "modeControl": false
        },
        {
            "name": "窗户",
            "ip": "<IP_ADDRESS>",
            "token": "696(HIDE FOR PRIVACY)979",
            "deviceId": "blt.3.1evq84iaokc00",
            "model": "isa.magnet.dw2hl",
            "pollingInterval": 10,
            "deepDebugLog": true,
            "buzzerControl": true,
            "ledControl": true,
            "childLockControl": true,
            "modeControl": true
        }
    ],
    "platform": "miot"
}

Debug log
see below.
Screenshots
Image one: The homebridge totally cannot generate the device's infomation

Image two: The homebridge totally cannot poll the Bluetooth devices (NOT Bluetooth Mesh or Zigbee) from the gateway. (please ignore the warning information of [Xiaomi Smart Power Strip 2 (5 Outlet). This wrong information is shown due to homebridge cannot poll "窗户".

Additional context
Long version of debug log

[1/16/2024, 9:07:37 PM] [miot] [窗户] Device found! Setting up miot device from local connection!
[1/16/2024, 9:07:37 PM] [miot] [窗户] Device firmware: 1.5.6_0001
[1/16/2024, 9:07:37 PM] [miot] [窗户] Full device info:
{
  "life": 1692399,
  "uid": (hide),
  "model": "lumi.gateway.mgl03",
  "token": "696(HIDE FOR PRIVACY)979",
  "ipflag": 1,
  "miio_ver": "0.0.9",
  "uptime": 1692412,
  "mac": "5C:E5:0C:C4:3A:69",
  "fw_ver": "1.5.6_0001",
  "hw_ver": "Linux",
  "bootloader_ver": "728(HIDE FOR PRIVACY)aa9",
  "miio_client_ver": "4.3.2",
  "VmPeak": 12608,
  "VmSize": 12608,
  "VmRSS": 1904,
  "MemFree": 13968,
  "ap": {
    "ssid": "6459-3",
    "bssid": "FC:3F:A6:D1:E2:66",
    "rssi": "-12",
    "freq": 2412
  },
  "netif": {
    "localIp": "<IP_ADDRESS>",
    "mask": "<IP_ADDRESS>",
    "gw": "<IP_ADDRESS>"
  },
  "miio_times": [
    1692398,
    15,
    2295,
    1690061
  ]
}
[1/16/2024, 9:07:37 PM] [miot] [窗户] Found device model lumi.gateway.mgl03 does not match specified model isa.magnet.dw2hl! Some services might not work correctly!
[1/16/2024, 9:07:37 PM] [miot] [窗户] Connected to device: lumi.gateway.mgl03
[1/16/2024, 9:07:37 PM] [miot] [窗户] Doing initial property fetch.
[1/16/2024, 9:07:37 PM] [miot] [窗户] Preparing property poll!
[1/16/2024, 9:07:37 PM] [miot] [窗户] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:07:37 PM] [miot] [窗户] Chunks:  [
 [
  "magnet-sensor:illumination",
  "magnet-sensor:contact-state",
  "battery:battery-level"
 ]
]
[1/16/2024, 9:07:37 PM] [miot] [窗户] (Protocol) Call <IP_ADDRESS>: get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}] - {}
[1/16/2024, 9:07:37 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:07:37 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (2) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2215}
[1/16/2024, 9:07:37 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y���,��(�e%��� u㠻
[1/16/2024, 9:07:37 PM] [miot] [窗户] Successfully saved device info!
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Device found! Setting up miot device from local connection!
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Device firmware: 1.5.6_0001
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Found device model lumi.gateway.mgl03 does not match specified model qmi.plug.psv3! Some services might not work correctly!
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Connected to device: lumi.gateway.mgl03
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Doing initial property fetch.
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Preparing property poll!
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:07:37 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Successfully saved device info!
[1/16/2024, 9:07:41 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:07:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (1) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2315}
[1/16/2024, 9:07:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y���FL��Zo��<3�'�
[1/16/2024, 9:07:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2215,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:07:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2215,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:07:45 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:07:45 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (0) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2415}
[1/16/2024, 9:07:45 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y���t&;D8��Ӻ�l����]
[1/16/2024, 9:07:45 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2315,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:07:45 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2315,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:07:49 PM] [miot] [网关] Preparing property poll!
[1/16/2024, 9:07:49 PM] [miot] [网关] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:07:49 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}]
[1/16/2024, 9:07:49 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2415}
[1/16/2024, 9:07:49 PM] [miot] [窗户] Error on initial property request! Error: Call to device timed out
[1/16/2024, 9:07:49 PM] [miot] [窗户] Starting property polling.
[1/16/2024, 9:07:49 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2415,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:07:49 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2415,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:07:49 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"1007228247","siid":2,"piid":1},{"did":"1007228247","siid":2,"piid":3},{"did":"1007228247","siid":2,"piid":2}]
[1/16/2024, 9:07:49 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Error on initial property request! Error: Call to device timed out
[1/16/2024, 9:07:49 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Starting property polling.
[1/16/2024, 9:07:59 PM] [miot] [窗户] Preparing property poll!
[1/16/2024, 9:07:59 PM] [miot] [窗户] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:07:59 PM] [miot] [窗户] Chunks:  [
 [
  "magnet-sensor:illumination",
  "magnet-sensor:contact-state",
  "battery:battery-level"
 ]
]
[1/16/2024, 9:07:59 PM] [miot] [窗户] (Protocol) Call <IP_ADDRESS>: get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}] - {}
[1/16/2024, 9:07:59 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:07:59 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (2) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2416}
[1/16/2024, 9:07:59 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y�����z�*���<^�'p�
[1/16/2024, 9:07:59 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Preparing property poll!
[1/16/2024, 9:07:59 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:03 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:03 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (1) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2516}
[1/16/2024, 9:08:03 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��z�?�$w�����
[1/16/2024, 9:08:03 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2416,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4019}
[1/16/2024, 9:08:03 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2416,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4019}
[1/16/2024, 9:08:07 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:07 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (0) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2616}
[1/16/2024, 9:08:07 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��
                                                                        ��I~g������ً�
[1/16/2024, 9:08:07 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2516,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:07 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2516,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:09 PM] [miot] [窗户] Preparing property poll!
[1/16/2024, 9:08:09 PM] [miot] [窗户] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:09 PM] [miot] [窗户] Chunks:  [
 [
  "magnet-sensor:illumination",
  "magnet-sensor:contact-state",
  "battery:battery-level"
 ]
]
[1/16/2024, 9:08:09 PM] [miot] [窗户] (Protocol) Call <IP_ADDRESS>: get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}] - {}
[1/16/2024, 9:08:09 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:09 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (2) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2617}
[1/16/2024, 9:08:09 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��1W�-�ĹݭeY͎�
[1/16/2024, 9:08:09 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Preparing property poll!
[1/16/2024, 9:08:09 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:11 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}]
[1/16/2024, 9:08:11 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2616}
[1/16/2024, 9:08:11 PM] [miot] [窗户] Poll failed 2 times!
[1/16/2024, 9:08:11 PM] [miot] [窗户] Poll failed! Error: Call to device timed out
[1/16/2024, 9:08:11 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2616,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:11 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2616,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:11 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"1007228247","siid":2,"piid":1},{"did":"1007228247","siid":2,"piid":3},{"did":"1007228247","siid":2,"piid":2}]
[1/16/2024, 9:08:11 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed 2 times!
[1/16/2024, 9:08:11 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed! Error: Call to device timed out
[1/16/2024, 9:08:13 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:13 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (1) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2717}
[1/16/2024, 9:08:13 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��J�@c�6���i)f��
[1/16/2024, 9:08:13 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2617,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:13 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2617,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:17 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:17 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (0) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2817}
[1/16/2024, 9:08:17 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y����!�cI�8G5���
[1/16/2024, 9:08:17 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2717,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:17 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2717,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:19 PM] [miot] [窗户] Preparing property poll!
[1/16/2024, 9:08:19 PM] [miot] [窗户] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:19 PM] [miot] [窗户] Chunks:  [
 [
  "magnet-sensor:illumination",
  "magnet-sensor:contact-state",
  "battery:battery-level"
 ]
]
[1/16/2024, 9:08:19 PM] [miot] [窗户] (Protocol) Call <IP_ADDRESS>: get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}] - {}
[1/16/2024, 9:08:19 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:19 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (2) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2818}
[1/16/2024, 9:08:19 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y���6F���}l��Zf�!
[1/16/2024, 9:08:19 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Preparing property poll!
[1/16/2024, 9:08:19 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:21 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}]
[1/16/2024, 9:08:21 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2817}
[1/16/2024, 9:08:21 PM] [miot] [窗户] Poll failed 3 times!
[1/16/2024, 9:08:21 PM] [miot] [窗户] Poll failed! Error: Call to device timed out
[1/16/2024, 9:08:21 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2817,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:21 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2817,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:21 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"1007228247","siid":2,"piid":1},{"did":"1007228247","siid":2,"piid":3},{"did":"1007228247","siid":2,"piid":2}]
[1/16/2024, 9:08:21 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed 3 times!
[1/16/2024, 9:08:21 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed! Error: Call to device timed out
[1/16/2024, 9:08:23 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:23 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (1) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":2918}
[1/16/2024, 9:08:23 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��_Q&W���Ln��^P�
[1/16/2024, 9:08:23 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2818,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:23 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2818,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:27 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:27 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (0) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":3018}
[1/16/2024, 9:08:27 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y�� �      C�3�N�eY���$e
[1/16/2024, 9:08:27 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":2918,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:27 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":2918,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:29 PM] [miot] [窗户] Preparing property poll!
[1/16/2024, 9:08:29 PM] [miot] [窗户] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:29 PM] [miot] [窗户] Chunks:  [
 [
  "magnet-sensor:illumination",
  "magnet-sensor:contact-state",
  "battery:battery-level"
 ]
]
[1/16/2024, 9:08:29 PM] [miot] [窗户] (Protocol) Call <IP_ADDRESS>: get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}] - {}
[1/16/2024, 9:08:29 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:29 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (2) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":3019}
[1/16/2024, 9:08:29 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��"5PS�q�����=`�o
[1/16/2024, 9:08:29 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Preparing property poll!
[1/16/2024, 9:08:29 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14
[1/16/2024, 9:08:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}]
[1/16/2024, 9:08:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":3018}
[1/16/2024, 9:08:31 PM] [miot] [窗户] Poll failed 4 times!
[1/16/2024, 9:08:31 PM] [miot] [窗户] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: Call to device timed out
[1/16/2024, 9:08:31 PM] [miot] [窗户] Device diconnected!
[1/16/2024, 9:08:31 PM] [miot] [窗户] Reconnecting and restarting polling in 60 seconds...
[1/16/2024, 9:08:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":3018,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":3018,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:31 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"1007228247","siid":2,"piid":1},{"did":"1007228247","siid":2,"piid":3},{"did":"1007228247","siid":2,"piid":2}]
[1/16/2024, 9:08:31 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed 4 times!
[1/16/2024, 9:08:31 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: Call to device timed out
[1/16/2024, 9:08:31 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Device diconnected!
[1/16/2024, 9:08:31 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Reconnecting and restarting polling in 60 seconds...
[1/16/2024, 9:08:33 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:33 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (1) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":3119}
[1/16/2024, 9:08:33 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��&�L\�%i���{SU��
[1/16/2024, 9:08:33 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":3019,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:33 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":3019,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:37 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:08:37 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (0) {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":3219}
[1/16/2024, 9:08:37 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1��y��*�{��zZ��ƫ�
[1/16/2024, 9:08:37 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":3119,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:37 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":3119,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}]
[1/16/2024, 9:08:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"did":"blt.3.1evq84iaokc00","siid":2,"piid":1},{"did":"blt.3.1evq84iaokc00","siid":2,"piid":2},{"did":"blt.3.1evq84iaokc00","siid":3,"piid":1}],"id":3219}
[1/16/2024, 9:08:41 PM] [miot] [窗户] Poll failed 1 times!
[1/16/2024, 9:08:41 PM] [miot] [窗户] Poll failed! Error: Call to device timed out
[1/16/2024, 9:08:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":3219,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:41 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":3219,"error":{"code":-9999,"message":"user ack timeout"},"exe_time":4000}
[1/16/2024, 9:08:41 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] (Protocol) <IP_ADDRESS> <- Reached maximum number of retries, giving up get_properties - [{"did":"1007228247","siid":2,"piid":1},{"did":"1007228247","siid":2,"piid":3},{"did":"1007228247","siid":2,"piid":2}]
[1/16/2024, 9:08:41 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed 1 times!
[1/16/2024, 9:08:41 PM] [miot] [Xiaomi Smart Power Strip 2 (5 Outlet)] Poll failed! Error: Call to device timed out

[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) Call <IP_ADDRESS>: miIO.info - {"timeout":5000,"retries":3} - {}
[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) Start handshake <IP_ADDRESS>
[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- (2) {"method":"miIO.info","params":{"timeout":5000,"retries":3},"id":3220}
[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> <- !1p�y��`�<�\�  �x�Kr:iQ
[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Data: {"id":3220,"result":{"life":1692513,"uid":(HIDE FOR PRIVACY),"model":"lumi.gateway.mgl03","token":"696(HIDE FOR PRIVACY)979","ipflag":1,"miio_ver":"0.0.9","uptime":1692526,"mac":"5C:E5:0C:C4:3A:69","fw_ver":"1.5.6_0001","hw_ver":"Linux","bootloader_ver":"7284f8808373a36b57798a74f73bdaa9","miio_client_ver":"4.3.2","VmPeak":12608,"VmSize":12608,"VmRSS":1904,"MemFree":13984,"ap":{"ssid":"6459-3","bssid":"FC:3F:A6:D1:E2:66","rssi":"-12","freq":2412},"netif":{"localIp":"<IP_ADDRESS>","mask":"<IP_ADDRESS>","gw":"<IP_ADDRESS>"},"miio_times":[1692513,15,2295,1690176]},"exe_time":1}
[1/16/2024, 9:09:31 PM] [miot] [窗户] (Protocol) <IP_ADDRESS> -> Message: {"id":3220,"result":{"life":1692513,"uid":(HIDE FOR PRIVACY),"model":"lumi.gateway.mgl03","token":"696(HIDE FOR PRIVACY)979","ipflag":1,"miio_ver":"0.0.9","uptime":1692526,"mac":"5C:E5:0C:C4:3A:69","fw_ver":"1.5.6_0001","hw_ver":"Linux","bootloader_ver":"7284f8808373a36b57798a74f73bdaa9","miio_client_ver":"4.3.2","VmPeak":12608,"VmSize":12608,"VmRSS":1904,"MemFree":13984,"ap":{"ssid":"6459-3","bssid":"FC:3F:A6:D1:E2:66","rssi":"-12","freq":2412},"netif":{"localIp":"<IP_ADDRESS>","mask":"<IP_ADDRESS>","gw":"<IP_ADDRESS>"},"miio_times":[1692513,15,2295,1690176]},"exe_time":1}

Hi,
well that is odd... I unfortunately neither have a xiaomi Bluetooth device nor a gateway so I cannot test and investigate by myself.
I am not sure if the BLE key is required and necessary for the connection through the gateway.
Maybe there is a different way to connect to such devices and it is not possible over the gateway in that scenario?


./Compile.sh compile ERROR

Errors show up when I execute the command './Compile.sh '.
Env: ubuntu16.04.3   anaconda  cuda8.0  pytorch 0.4.1   python3.6
Error log is as below:
Building roi align op...
Traceback (most recent call last):
File "setup.py", line 2, in
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
File "/home/yan/anaconda3/envs/mmdetection_py36/lib/python3.6/site-packages/torch/init.py", line 80, in
from torch._C import *
ImportError: /home/yan/anaconda3/envs/mmdetection_py36/lib/python3.6/site-packages/torch/lib/libshm.so: undefined symbol: _ZTI24THRefcountedMapAllocator
Building roi pool op...
Traceback (most recent call last):
File "setup.py", line 2, in
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
File "/home/yan/anaconda3/envs/mmdetection_py36/lib/python3.6/site-packages/torch/init.py", line 80, in
from torch._C import *
ImportError: /home/yan/anaconda3/envs/mmdetection_py36/lib/python3.6/site-packages/torch/lib/libshm.so: undefined symbol: _ZTI24THRefcountedMapAllocator
Building nms op...
rm -f *.so
echo "Compiling nms kernels..."
Compiling nms kernels...
……
……

I came across the same error,did you solve the problem? Thanks @opencvfun

I meet the same problem,have you solved it?

The compiling process has been updated.


Cartographer on Windows

What do you think about adding an Appveyor or Google Compute Engine Windows build to Cartographer's CI, using Microsoft's ROS1 port?

I don't see a problem with trying that out, but I'm not sure about the CI part:

how stable/mature is the ROS Windows port?
what if a build breaks only on Windows - will it block PRs? I (and probably most other Cartographer contributors too) don't have a Windows dev environment to test and fix locally

Ok, my suggestion would be to have only builds from master built in the Windows pipeline for informational purposes as you said (post-commit, not pre-commit ;) ).

Why would you not build PRs? If you are inclined to fix your PRs for windows (if necessary) before they are merged, you can do so using Windows CI logs, even if you don’t have Windows. If you’re not, well, you could just ignore the Windows build status.

I'm also fine with that.

@MichaelGrupp (This is Lou from Microsoft, I've been working with @ojura on the Cartographer port)
The ROS1 on Windows is experimental as we are still in bring-up. We're hoping to finish core ROS1 and certain slices through manipulation and mobility by the end of the year.
FYI: On our backlog is the ability to easily set up ROS project CI builds using Azure DevOps - which is now free for OpenSource projects.
Many customers have asked for Cartographer on Windows. I'm happy to help make that happen. I think it would be a good test case of the Windows/ROS CI build tooling.
Thank you,
Lou

Sounds like something that could be discussed with the maintainers in the next "open house" session.


Document how to make reproducible runs with GluonTS

Description
Hello, I am working with PyTorch-models in GluonTS and trying to make results reproducible. In particular, I would like to set a global seed to ensure that the batchify and evaluation steps (i.e., drawing samples from the predicted distribution) produce the same results each time I run the code. I have tried using "torch.manual_seed(123)" as suggested in some documentation, but it does not seem to have any effect.
Could you please help me to understand how I can set a global seed in PyTorch-GluonTS?
Thank you for your time and help.

@StatMixedML have you also set the numpy seed? Numpy is used to sample instances from training data to construct batches, so it plays a role as well

@lostella Thanks for your reply and the hint to pl.seed_everything. Using the following helps to reduce the variability of the results from run to run, but does not completely make the results reproducible:
torch.manual_seed(123)
np.random.seed(123)
pl.seed_everything(seed=123, workers=True)

Yet, it is good enough for now, so closing the issue.
Thanks again

I'll keep it open since it doesn't hurt to track it as something we should document


RHash - build MSYS and CygWin issues including patch for 1.3.5

001-mingw-cygwin-msys.patch.txt
I was compiling RHash with MSYS and GNU GCC 6.30 as a prerequisit for cmake and I ran into some issues tried to address.  The patch does work with RHash 1.3.5 (but I'm not sure about the master branch).  There were several issues that I tried to fix.

MSYS2 and Cygwin do NOT use the lib prefix name for the .DLL.  The conventions are the prefix "msys-" for MSYS and "cyg" for CygWin.  I had to make a way to override that in the makefile with the variable "DLLNAME_PREFIX".
I wanted the make file to do some processing specifically for Windows such as have a separate .DLL and .dll.a import library for shared builds as well as build .EXE's using that convention.  I'm well aware that GCC can use the imports right from the .DLL but this is not often done (probably for compatibility with compilers that are not able to support this.  Thus, I also created another variable for IS_WIN that supports this as well as triggers some things with tests in Windows so that you could have a more uniform usage in the Makefile.  The most ideal  fix would be to consider doing something like use autoconf or cmake.
Cygwin and MSYS2 use the standard " __declspec(dllexport)" just like Windows.  Those are just software layers that sit above Windows.  Along this line, you can actually use some Windows functions within MSYS for a half-in-half out approach.
When using the SSL runtime, the OpenSSL names are different in MSYS and CYGWIN.  In MSYS, it's probably "msys-crypto-1.0.0.dll" and in CygWin, it's "cygcrypto-1.0.0.dll".
MSYS GCC defines "MSYS" in addition to "CYGWIN".  CygWin defines "CYGWIN".  _WIN32 is NOT defined for MSYS and CygWin.  This is something that has to be noted when reviewing my work as I deliberately omitted "MSYS".
I have had to use the frequency timer stuff from Windows since some tests depended upon "set_benchmark_cpu_affinity" and I also thought it might be better for the static build tests and perhaps for RHash.exe if it was using that capability.
In "RHash-1.3.5/tests/test_rhash.sh", I noticed that the "//" path issue ONLY applies if you are compiling and testing the native Windows version of the MINGW RHash.  When building and testing the "MSYS" version for the MSYS environment, you don't get that issue so I had to adjust the workaround in the .sh script appropriately.  Note that I was using the MSYS2 (http://www.msys2.org/) pacman "makepkg" facility including the "makepkg-mingw" for MINGW builds.

I have verified that the patch does work in MSYS2 as well for MINGW-64 as well as MINGW32.

I have gone ahead and did a patch for the version in GIT that seems to work.  I decided to rework another of things in the make file as well as added some other nice goodies such as:

pkg-config support
There are now three different sets of build and install rules.  I felt that this was clearner than the old IS_WIN variable and the NAME prefix variable.
I experimented with the Python bindings and it turns out to work if you use the proper run-time library names.
/etc is no longer hard-coded in the Makefile and the parse_cmd.c file.  I added a macro to the versions file that the Makefile creates. You can now override /etc with something like SYSCONFDIR=/mingw64/etc .  This should help with some atypical file placements in some Unix systems and also assists me with a relocation that I do in a different patch for Windows.
A separate importlib is now generated for MINGW, MSYS, and Cygwin builds.  I realize that GCC could directly use the DLL for imports but this is not typical and the filename for the DLL Will be different in those environments.

Please feel free to use this patch and provide me with any feedback.
001-mingw-cygwin-msys.patch.txt

Hello.
First, thank you for writing good patch!
I will start incorporate your changes. But I will not use GNU make specific code (ifneq) because it is not working from scratch on BSD/Solaris/other Unix. For difficult configuration detection I'm going to write configure script (without using autoconf). It's expected to proceed slowly, because of limited time I have for the project, but I consider the configure script very important, particularly for future features ;)

I think I make right a cmake patch if you wish or possibly an autoconf.

Alright, I have been spending quite a bit of time on a build system that uses CMake and I think that might be a good option considering that you don't like Autoconf and because CMake will be more portable.
CMake works in three ways with the build system.

It generates the appropriate Makefiles for the particular system and adjustments for many environments.
You can have the build system such as GNU make call CMake to run cmake scripts that do things such as run programs, perform tests, and some other stuff.
You could use cmake command from the command line to do things such as delete files, make symlinks, copy files, or even use something like echo.

Part of this is also that we could reduce dependencies on various Unix bashisms and small utilities such as grep, tr, and sed since Windows does typically include those.  This is taking a bit of time because there is a lot to do but I think it would be work doing considering that CMake itself uses the RHash library.


Catch ArrayIndexOutOfBoundsException

Catch ArrayIndexOutOfBoundsException when parsing request path

Codecov Report
Base: 73.75% // Head: 14.95% // Decreases project coverage by -58.80% :warning:

Coverage data is based on head (36e9ef0) compared to base (e27ffc9).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #2281       +/-   ##
=============================================
- Coverage     73.75%   14.95%   -58.81%
+ Complexity    10161     2379     -7782
=============================================
  Files           722      755       +33
  Lines         55244    57879     +2635
  Branches       6835     7121      +286
=============================================
- Hits          40744     8654    -32090
- Misses        12326    48710    +36384
+ Partials       2174      515     -1659

Impacted Files
Coverage Δ

...c/main/java/com/github/ambry/rest/RequestPath.java
0.00% <0.00%> (-90.48%)
:arrow_down:

.../src/main/java/com/github/ambry/router/Router.java
0.00% <0.00%> (-100.00%)
:arrow_down:

.../src/main/java/com/github/ambry/store/Message.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...rc/main/java/com/github/ambry/named/PutResult.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...rc/main/java/com/github/ambry/quota/QuotaMode.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...rc/main/java/com/github/ambry/quota/QuotaName.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...rc/main/java/com/github/ambry/rest/RestMethod.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...c/main/java/com/github/ambry/config/KMSConfig.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...c/main/java/com/github/ambry/config/SSLConfig.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...c/main/java/com/github/ambry/router/ByteRange.java
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 623 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

The code Chan free looks good. Please add unit test and check if this can be quickly added to an existing integration test (to confirm that in the user request path, everything will be able to pass on the correct exception to the user.

added test


Formatter: case style indention for property definitions

Could the formatter indent properties like it's done with case blocks?
So this
class Foo
   property foo_bar_foo : FooBarType = FooBarType.new
   property foo : Foo = Foo.new
   property bar_foo_bar_foo : BarFooBarFooType? =  nil
end

becomes this
class Foo
   property foo_bar_foo        : FooBarType            = FooBarType.new
   property foo                : Foo                   = Foo.new
   property bar_foo_bar_foo    : BarFooBarFooType?     = nil
end

The last one is much more readable and you can easily see what's going on.

That would be a real nightmare for diffing...

@jrester This is an interesting idea. However, property is not a keyword in the language, it's just a macro call. If we want to align these we'll also have to align getter, setter, and whatever name you'd also like to align in case it looks like a keyword (or as DSL). This makes it practically impossible for the formatter to know when things should or shouldn't be aligned.
Additionally, I'm not convinced about the formatter currently aligning things: it can make some lines too wide, and it can produce unwanted diff. So in my mind the direction should be removing automatic alignment instead of adding more of it.
I'm also closing because it only had 5 negative votes.


Proposal: Acute and Chronic Training Load (ATL/CTL) in activity's extended data

Both ATL and CTL are part of performance management, as used by some commercial tools. Both the ATL and CTL are measures of performance with a different approach.
ATL (fatigue)
An exponentially weighted average of the TRIMP of activitities in the last 7 days is a measure of fatigue.
CTL (fitness)
An exponentially weighted average of the TRIMP of activitities in the last 42 days is a measure of fitness. CTL is used by a lot of athletes to gauge their current level of fitness. They try to peak their CTL on the day of a race.
The difference between both values on a specific day is called Training Stress Balance (TSB) and is a measure for performance on that specific day.
Calculation could be based on the formulas from http://fellrnr.com/wiki/Modeling_Human_Performance#The_TSB_Formulas.

Current status
Currently I am working on implementing this feature, but I am a bit stuck with gathering TRIMP values from previous activitities.

@erikvankempen Perfect :)

https://drive.google.com/open?id=0B4AhWY3qWuORa2gwQzhVcEZ1V1U

@erikvankempen i will dive into the process which fetch all activities and stream and do calculation in. Because this will be used for my features i planned and this one.

@thomaschampagne cool. If you need any help, just notify me.

Tasks
Synchronization

[ ] Ensure activities unicity while synchronize
[ ] Do not re-save Computed activities if no new activities found
[ ] Remove zones from sync: add parameter 'noZones' in Activity computer => reduce size stored
[ ] clean up outputFields: remove fields, rename to less long keys => reduce size stored
[ ] Auto sync on strava.com only if a previous sync exist and older than 12h.

Fitness trend

[ ] Display current CTL, ATL & TSB on graph screen

TO THINK*

[ ] Allow force sync?
[ ] Clear current sync cache. Where put action?


chore(deps): check Dockerfile deps

Allow Dependabot to update images in Dockerfile

Hi~
Dockerfile is in deploy directory.

Sorry... Now it's fixed


[request] deciding wether tween.stop() should trigger the onComplete callback

I found very useful in Phaser 2 that tween.stop() was accepting an argument to control whether the onComplete callback should fire or not when interrupting the tween. It would be great to have this in Phaser 3 as well. For now, tween.stop()  stops the tween without calling onComplete.
Unless there is a reason not to/a different way to do so now?

This feature has been added. I didn't want to add it to Tween.stop because of the resetTo argument, but I think this works well enough as its own method.


Unpin requests dependency

We pinned requests on account of this: https://github.com/docker/docker-py/issues/3256
New versions have been released which fix this, so I just remove the restriction on requests since it's such a fundamental library and it was blocking other dependency upgrades / usage.

@strickvl I think you can close it in favor of this PR I already had open: https://github.com/zenml-io/zenml/pull/2843

I don't think removing the requests pin is enough to address the reason it was added there in the first place (https://github.com/docker/docker-py/issues/3256). Namely, this still fails for me:
pip install  "docker==6.1.3"
python -c "from docker.client import DockerClient; DockerClient.from_env()"

but this works:
pip install  "docker==6.1.3" "requests<2.32.0"
python -c "from docker.client import DockerClient; DockerClient.from_env()"

The only docker version that works with requests higher than 2.32.0 is docker==7.1.0, but that has the unfortunate side-effect that it's no longer compatible with docker-compose, which we rely on to run our CI.

No longer needed since we have #2843


Fix: rename rasterResampling to rasterResamplingMode

A proposed fix for https://github.com/react-native-mapbox/maps/issues/37.
When trying to build the latest version of @react-native-mapbox/maps in Xcode I get a "Semantic Issue" in RCTMGLStyle.m line 1470 'rasterResampling' is unavailable: Use rasterResamplingMode instead.

@HPieters  thanks, not sure why it was not caught by the CI. Must  be some node_module chaching issue...


[iOS] Fix data races in RCTImageLoader and RCTNetworkTask with shared atomic counters

Summary:
In order to fix the data races described in https://github.com/facebook/react-native/issues/44715, I propose a simple solution by leveraging shared counter functions wherein std::atomic is the backing for the integer values.
Changelog:
[iOS] [Fixed] - Implement shared atomic counters and replace static integers in RCTImageLoader and RCTNetworkTask that were accessed concurrently, which in some cases lead to data races.
Test Plan:
Added unit tests for the counters in RCTSharedCounterTests.

Hi @cipolleschi, thanks for the feedback! I will look into the comments and think of improvements. Will push changes when I have the time.

@cipolleschi please see the proposed changes above

(also, remember to rebase on top of main, please! 🙏 )

Since we already use Objective-C++ quite widely across the codebase, can we just replace this with std::atomic?

Since we already use Objective-C++ quite widely across the codebase, can we just replace this with std::atomic?

We certainly can. My approach was to generalize the solution, seeing it as one could make use of atomic counter functions for cases to come. I believe testing becomes easier as well, as one does not have to for example instantiate a class wherein a static count variable is used.
Is it more preferable from your point of view not to introduce the counters?

I'd rather rely on standard C++ fundamentals and use those directly, rather than using wrappers which involve shared_ptr, which have their own.
In pure Objective-C, we should also be able to use OSAtomicIncrement64 as a much simpler solution.

@javache I have revised according to your review. Please see changes.


email is not exported by  'indicative/builds/validations'

I am trying to import email and other validations like this
  import {   email,   required,   min,   max } from 'indicative/builds/validations'

but I am getting this error "email is not exported by  'indicative/builds/validations'"
Please help me to resolve this issue.

Not supported in newer release at all https://github.com/poppinss/indicative/releases/tag/v7.2.0