[HOLD] [N7 Account Settings] Modify Component MenuItem and create new related component MenuItemWithTopDescription

Holding on approval of doc: https://docs.google.com/document/d/17akqrbC-w8FqEoDLvcLmrX6iw4uaVrT_xlwAl-IhEzE/edit#heading=h.kon5grl17zr7
Tracking issue: https://github.com/Expensify/Expensify/issues/182122
Goal:
Add a few new props to  & create a specialized component that uses them
Modifying

Add the ability to show the main text (in the title prop) with normal font weight

This is needed for many pages, including the new Profile page, All contacts page, and the Personal details page.
The current style for the MenuItem title, popoverMenuText, is hard-coded to be bold. Since this is the only place we use popoverMenuText, we’ll make the following changes:

Remove fontFamily: fontFamily.GTA_BOLD, and fontWeight: fontWeightBold, from the popoverMenuText style.
Add new prop shouldShowBasicTitle to MenuItem, which will not add styles.textStrong to the Text component displaying the title if true (leaving the title to display with normal font weight).

Add the ability to show the supporting text (in the description prop) above the main text (title prop)

This is needed for the new Profile page and the Personal details page.
Currently the View component encapsulating the title & description displays with a flex-direction: column. To get the description on top, we can just change this to flex-direction: column-reverse.

We can add this ability with a new prop, shouldShowDescriptionOnTop - if this is true, we’ll add styles.flexColumnReverse to this View, which will flip the title & description vertically.

We’re not done! Since the Text component that renders props.description (this one) currently has styles.mt1 applied to it, if we put this on top we won’t need that style anymore and we’ll want it to be applied to props.title now. To do this, we’ll make these changes:

Remove styles.mt1 from the description style
Add new style to styles/utilities/spacing.js:    gap1: {
        gap: 4,
    },

Add the new styles.gap1 on the View that renders the title & description (docs on gap css property)

Create specialized component MenuItemWithTopDescription
Since we’ll reuse the new style props for making the title not bold & inverting the description & title on a few pages (specifically the Profile page & Personal details page), we’ll make a new specialized component that does these for us automatically

Create new component MenuItemWithTopDescription (named as such to indicate the main purpose of the component is to show the description above the title instead of the standard setup with title above description)
This component will render a MenuItem like this:<MenuItem
    {...props}
    shouldShowBasicTitle
    shouldShowDescriptionOnTop
/>

We’ll use this by passing in a custom title & description (and optionally shouldShowRightIcon) which will look like this: (see doc)

Doc still in review

Doc still in review but getting super close! Still one detail ironing out with this


Setup hot reloading

Right now every change in code needs a restart of the server.
For hot reloading, you can use any of the solutions available for NodeJS. Webpack suggested.

Can install nodemon and setup devScript to run with nodemon

@jasbindar-singh sounds good. We can assign you to the PR.

@mukarramali i can do the nodemon setup if assigned.

@Bhavesh27 you can take this :)

@mukarramali https://github.com/schmiedeone/vacabot/pull/18 Added nodemon Config as well if required you can tweak it accordingly.


Not all properties are validated server side on first submit

System Details

FluentValidation version: 8.0.101
FluentValidation.Mvc5 version: 8.0.100
Web Framework version MVC 5: <IP_ADDRESS>

Issue Description
I have very simple sample Model generated using Entity Framework 6 Database First approach that looks like this:
    [Validator(typeof(SupplierEntityValidator))]
    public partial class Supplier
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int CurrencyId { get; set; }
        public System.DateTime CreatedDate { get; set; }
        public System.DateTime ModifiedDate { get; set; }

        public virtual Currency Currency { get; set; }
    }

    public partial class Currency
    {
        public int Id { get; set; }
        public string CurrencyCode { get; set; }
        public decimal BaseQuantity { get; set; }
        public decimal ExchangeRate { get; set; }

        public virtual Supplier Supplier { get; set; }
    }

Id, Name, CurrencyId, CreatedDate, ModifiedDate are set to Not Null in DB which is mapped in the EF model.

Validator class for Supplier looks like this:
    public class SupplierEntityValidator : AbstractValidator<Supplier>
    {
        public SupplierEntityValidator()
        {
            RuleFor(x => x.CurrencyId)
                .NotEmpty()
                .WithMessage("Wybór waluty jest wymagany.");

            RuleFor(x => x.Name)
                .NotEmpty()
                .WithMessage("Nazwa jest wymagana.");
        }
    }

Client side validation is turned off in web.config as I would like to use the possibility to filter (include/exclude) validated properties of the model which is not possible with FluentValidation on the client side:
  <appSettings>
    <add key="ClientValidationEnabled" value="false" />
    <add key="UnobtrusiveJavaScriptEnabled" value="false" />
  </appSettings>

When I submit form without any values filled in I get only validation messages for fields CurrencyId, CreatedDate and ModifiedDate.

It seems as the validation message for CurrencyId field comes from the SupplierEntityValidator class, messages for CreatedDate and ModifiedDate seem to be coming from default EF generated model constraints.
After filling them in and resubmitting the form the validation message for Name finally occurs coming from the SupplierEntityValidator.

Why Name validation message does not appear after the first submit?
When I run in SupplierController:
var validator = new SupplierEntityValidator();
var errors = validator.Validate(supplier);

it results in 2 errors during the first form submition.

Hi, this is not actually an issue with FluentValidation, it’s a limitation of MVC5’s validation infrastructure.
You cannot supply empty values for non-nullable value types (such as int/DateTime etc). If you do, MVC will pre-Validate these data types, and prevent further rules from executing if you supply empty values.
If you want all rules to execute at once you must make the properties nullable.

I wrote about this limitation in more detail over here:

Thank you for your explanation, I will take closer look to details you have pointed out!

ASP.NET Core does not suffer from this issue as the validation infrastructure has been drastically improved there

Is there any documentation/book that you recommend to study to fully understand the changes in validation infrastructure of ASP.NET Core?

I’m not aware of anything like that. The asp.net core validation documentation is very good, but is about how to use the validation features, not how it works internally. For that your best bet is to read the source code.


Create new search input model for each instance of a settings editor

This closes #56432 by keeping track of how many editors have been made and making a new text model for each one's search text. @roblourens what do you think of the NUM_INSTANCES static?

I think that's ok. I don't know if we'd ever instantiate two editors, then render both. Or render the controls of a settings editor twice.  Can you increment the counter inside createEditor? Or, save that 'id' for a settings editor somewhere and use that instead of the static variable.


Add linux build instructions

Since the old wiki link is dead, and the cuda build is slightly different, this should help people post fewer easy questions in the thread.

outdated. thanks anyway!


React + Tailwind Application ✅

I converted the old html files to jsx with tailwind.
The app is working fine.

@kom-senapati Great work...Merging this PR.

@kom-senapati You can checkout other issues too if you wish to contribute further.


Fix Breaking CI/Build Issues - (Revert + Bump Dependencies)

@nschonni / @ptd-tbs / @MrDeshaies  - a series of pull request from bumping packages broke the AIA preventing it from deploying new versions.
CDS is looking to provide a demonstration of the AIA's capabilities, and would like to ensure it's in working order prior to the demo. :)
This PR fixes that, and bumps several of the packages that were trying to be fixed/bumped by Dependabot.
-> Closes #992 due to duplicate (and no longer working) effort.
-> Closes #850 (just has that change in it too)
Resolves the following dependabot asks:
-> Closes #1057
-> Closes #951
-> Closes #948

There is a merge conflict with both the files

There is a merge conflict with both the files

Fixed, sorry @nschonni :)

Rubber stamp approval, I didn't pull down and test this, but I know previously the updates I had tried and rolled back had broken stuff, and I guess this has happened again

Awesome, I can't hit merge. :) Looks like perms were changed, so only folks flagged in the repo can ever.

Looks like there are some build failures https://github.com/canada-ca/aia-eia-js/actions/runs/4246561469/jobs/7383529599


add latest RBD config to ux-revamp; COUNTRY=rbd

Bring latest RBD config changes to ux-revamp for further testing and deployment

@wadhwamatic instead of merging this PR, it will likely be easier to update https://github.com/WFP-VAM/prism-app/pull/688 from master by resolving the small conflicts in the rbd prism.json

@wadhwamatic instead of merging this PR, it will likely be easier to update #688 from master by resolving the small conflicts in the rbd prism.json

thanks @ericboucher. I went that route and will close this PR


Can't stop video if AppState was changed to "background" on Android

Hi,
This take no effect on Android:
AppState.addEventListener('change', () => {
  this.state({
    paused: true
 });
});

I still hear sound of movie. But if change AppState back to active, finally video will stopped.
Seems that after APP was pushed to background state, JS can't affect to props of react-native-video.
Please, help to solve this.

Same here

@sjchmiela should we consider to implement this feature on our module view here https://github.com/brentvatne/react-native-video/blob/master/android/src/main/java/com/brentvatne/react/ReactVideoView.java, I don't think we can achieve what @nikuz (maybe many others out there, like me) wanted on a higher level like nikuz did above. You know it is very annoying when the app goes to background but MediaPlayer keep playing.

@nikuz @donnguyen does this work as expected on iOS? (assuming the "right" props are set in your info.plist)

@mattapperson yes it does work as expected on iOS

I too have the same issue.
For me the following did not work for me.
AppState.addEventListener('change', () => {
this.state({
paused: true
});
});
can u help me how to solve this

Anyone found a solution here?

Hey! How is going with this issue?

@brentvatne ?

Sorry, I really have no clue what's causing this :(

I can't seem to reproduce the issue

Ya after updating my react native version them my issue was resolved
Thanks


Update external-domain-broker to update Postgres from 11 to 15 and fix errors in the logs

In order to keep the external-domain-broker up to date and functional, the Postgres version needs to be updated as well as fixing the code related to renewal of certificates which fails in certain conditions
Acceptance Criteria
Given that Postgres is updated and verified as well as the renewal code fixed, the external-domain-broker should function without errors
Security considerations
None
Implementation sketch

[ ] research if upgrading Postgres to 15 will remove the errors related to Postgres dependencies in the app log
[ ] trace the errors in the CF application logs to find the root cause
[ ] fix and test the code
[ ] create a new release for the external-domain-broker

Breadcrumbs for future me or someone else:
I figured out that the Dockerfile that uses Postgres 11 is just for development. This should fix the test step.
We would have to backup the current production database and restore it to a new database running Postgres 15 to update from Postgres 11.
The external domain broker should build once the test step is fixed, if not then that's where the root cause will need to be investigated.

This was fixed via https://github.com/cloud-gov/external-domain-broker/pull/279 and the pipeline is working now


versionInfo as an alternative to versionIRI?

While it's desirable to have a versionIRI, some ontos just have version info and that's it.
Should we do a test specific to version info? Shall we pass half the test if there is versionInfo instead?

No, it should still be a 0% passed test because giving versionInfo without versionIRI means you have indicated there is a version but not indicated where using the versionIRI. Giving 50% pass for just versionInfo means all ontologies should have both versionInfo (50%) and versionIRI (50%).

But in the end we aim at having a version available. Having information on the version may be better than having none.

Ah - I misunderstood your comment, sorry. Then it should be 50% versionInfo + 50% versionIRI as both are recommended in WIDOCO best practices.

Maybe we can consider 100% versionIRI (ideal) + 50%(optional but desirable) versioninfo.
But what you suggest makes sense as well.


Added getwheat.ca

This PR is:

[x] Adding a new domain
[ ] Updating existing domain size
[ ] Changing domain name
[ ] Removing existing domain from list
[ ] Website code changes (512kb.club site)
[ ] Other not listed

Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

[x] I used the uncompressed size of the site
[x] I have included a link to the GTMetrix report
[x] The domain is in the correct alphabetical order
[x] This site is not a ultra lightweight site
[x] The following information is filled identical to the data file

- domain:
  url: https://getwheat.ca/
  size: 343
  last_checked: 2022/01/30

GTMetrix Report:
https://gtmetrix.com/reports/getwheat.ca/jYXxBBbo/

I used to use Grav back in the day, but had constant issues with the RSS feed for some reason, so I ditched it in the end. I should really re-visit it to see if it has matured.

It has been my platform of choice for 2 years now. You had issue with an RSS plugin? Templating an RSS should be relatively easy without a plugin really.
Anyways, give it a spin again! It really turned out into something nice since 1.7 and premium plugins.

Yeah, we're going back a few years here, so I didn't have the knowledge to build my own xml feed file, so I was stuck with a plugin.
I'll have to take it for a spin again...

Hit me up in the Grav Discord if you need pointers. I'm always lurking.


[akali] Remove port

Deprecated port.
The author of winsoft666/akali decides to delete this repository because it involves sensitive data.
Thers is no replacement repository or link, so we remove this port from vcpkg.

There is no point in leaving an empty port: Downstream usage will fail. Just remove from ports and versions/baseline.json, as was done with port xalan-c.

I didn't mention versions/a-/akali.json because I think it should be left for those who do have source assets and pin the version.

Thanks!

I didn't mention versions/a-/akali.json because I think it should be left for those who do have source assets and pin the version.

That's right. Baseline removals, version DB stays.


Read and write syscalls may read less bytes than requested

read/write syscalls may read/write less bytes then
required in the size argument, so when the larger block size
is passed to the library lfsfuse fails because read/write returns
less bytes than requested.

I've created an alternative PR that should fix this issue based on this PR: https://github.com/littlefs-project/littlefs-fuse/pull/54
Sorry about not bringing this one in and the late resolution. Thanks for the original PR.


Variable width children

Is it possible to have variable width pages?

I haven't tried this, but you could give it a go with different layouts.


How to run full indexing on a project?

Hi,
I am using cquery (from emacs) to navigate gcc source tree. When I use xref-find-definitions or xref-find-references it only shows the refs/defs in the files I already visited. It looks like other files don't get indexed; the cache for the gcc codebase is rather small atm:
143M    .vscode/cquery_cached_index
How do I index and cache the entire project?
Oh, and compile_commands.json is also suspiciously slim: only 7KiB, or 242 lines. I obtained it by running make under bear.

make clean then bear make

it maybe trickier if gcc build requires multiple stages. i don't know how to generate a full compdb.
close as it is unlikely an issue of cquery

You can also try using a .cquery file if you're having trouble generating compile_commands.json

Fangrui Song<EMAIL_ADDRESS>writes:

make clean then bear make

Thank you, compile_commands.json now contains the info for all the
translation units compiled. (Don't know why this was required though, as
I was compiling in a fresh build directory.)


Adjust ado.net based integrations to Otel spec

Changes proposed in this pull request:
Adjusts ADO.NET based integrations to Otel spec
@signalfx/instrumentation

the span name is not being changed

I spend together with @lachmatt about an hour discussing the span name. And we decided to keep it as it is as this is even what the main branch has.


[EOSi Frontend] #15 Make headroom a little less...

Make headroom a little less sensitive, e.g. have to scroll up more to get it to pop into view
Source url: https://eosi-frontend.netlify.app/why-eosi.html
Reported by: Chris ()
Reported at: 07 Jul at 13:21 UTC
Type: Feedback
Location: US, Massachusetts, Buzzards Bay
Browser: Firefox 102.0
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0
OS: macOS 10.15
Screen: 2560x1440
Viewport: 1412x699
Referrer: https://eosi-frontend.netlify.app/industry-template.html
Screenshot:

For more details please visit report page on Ybug:
https://ybug.io/dashboard/reports/detail/37bcgmftxpww3xdp2pp8

We are using this library: https://wicky.nillia.ms/headroom.js/

Fixed on https://github.com/dative/eosi-frontend-mix/commit/5f211e545d5f3c0b3fcb0aa86bc710e52b7c1997


Vault Microsoft.PowerShell.SecretStore requires a password

Pulled latest and installed the module locally.

This is not really a bug, but a feature. If no env keys are configured, the code will invoke Microsoft.PowerShell.SecretManagent to get the Api keys for the 4 built-in commercial providers.
SecretStore is just one of many extensions for SecretManagenent. It requires a password. Give it a password and the code will run.
If users have setup Microsoft.PowerShell.SecretManagent, they will be accustomed to this behavior.
Would you prefer that Microsoft.PowerShell.SecretManagent would require the end user to actively opt-in to activate?

Absolutely, yes, please.

'Would you prefer that Microsoft.PowerShell.SecretManagent would require the end user to actively opt-in to activate?'

The user should be able to install the module, set the OpenAI API Key env var and it just works.
None of the providers or SDK ports (there may be an exception) do anything around secret managenent or obfuscation of the key.
It is nice to have, not a requirement and not turned on by default.
The fewest steps to get up and running with PSAI is the goal.

Microsoft.PowerShell.SecretManagent is now fully optional


Resolve several ExpectedT problems

While forming my response to https://github.com/microsoft/vcpkg-tool/pull/483 I ran into several problems trying to use ExpectedT, so I separated out these specific changes which are intended to affect only that type:

Delete the "ErrorHolder" metaprogramming from Expected<T>. That performed 2 functions: 1. avoided storing an extra bool for ExpectedT<..., std::error_code>, and 2. giving ExpectedT a way to print the error case on value_or_exit. 1. was completely unused: there are no uses of ExpectedT<..., std::error_code> in the codebase. 2. should use the same stuff we use to print everything else (fmt), which this change does.
Make it possible to form ExpectedT<..., not-default-constructible>. This allows callers to avoid creating ExpectedT<..., unique_ptr<...>> as a workaround, as they are doing in some places. Fixing callers to avoid doing that is not in this change though (it is big enough).
Callers of ExpectedT that fell into the default "value was error" were fixed to print the actual error.
A bunch of places that wanted ExpectedT to effectively be "nothing, value, error" were fixed to just create new ExpectedTs rather than trying to pave over a nothing one. (I originally wanted to make ExpectedT unassignable but the ladder use case in registries.cpp seems reasonable)
A use after free bug in our unit tests where the code wanted C++ references to be assignable was fixed ( https://twitter.com/MalwareMinigun/status/1515171930705317889 )

Depends on https://github.com/microsoft/vcpkg-tool/pull/520

Depends on https://github.com/microsoft/vcpkg-tool/pull/521


NEConvolutionLayer is slower than the implementation on TensorflowLite.

Hi,
I have just configured 540P WDSR Model (one block) with Neon-based Arm Compute Library with NHWC layout with F32 datatype.
I also benchmarked the same model structure based on TensorflowLite on the same Android device which I have used.
The total execution time on ArmComputeLibrary (both one-thread) is 150ms Verus 91ms with TensorflowLite.
I have conducted the operator benchmarking in detail.
For example, the Convolution operation is (3, 960, 540) x (3,5,5,12) -> (12, 960, 540).
The average time cost for this operator on ACL is 71.45ms compared to 33.860 ms on TensorflowLite.
Here is my benchmark graph with --instruments=SCHEDULER_TIMER_MS

Here is TensorflowLite Benchmark for the exact same operator:

Here with the benchmark_model_code on ArmComputeLibrary for your reference:
//Arm Compute Library Source
#include "arm_compute/runtime/NEON/NEFunctions.h"
#include "arm_compute/runtime/NEON/NEScheduler.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/Allocator.h"
#include "arm_compute/runtime/BlobLifetimeManager.h"
#include "arm_compute/runtime/MemoryManagerOnDemand.h"
#include "arm_compute/runtime/PoolManager.h"
#include "utils/Utils.h"

#include "support/ToolchainSupport.h"
#include "src/core/NEON/NEMath.h"
#include "src/core/NEON/wrapper/intrinsics/intrinsics.h"
//Common Source
#include <arm_neon.h>
#include <cstdlib>
#include <sstream>
#include <time.h>
#include <fstream>
#include <chrono>

using namespace arm_compute;
using namespace utils;

class NEON_WDSR_FP32_Example : public Example
{
public:
    bool do_setup(int argc, char **argv) override
    {
        NEScheduler::get().set_num_threads(1);

        //Create Memory manager components
        auto lifetime_mgr0 = std::make_shared<BlobLifetimeManager>();
        auto lifetime_mgr1 = std::make_shared<BlobLifetimeManager>();
        auto pool_mgr0     = std::make_shared<PoolManager>();
        auto pool_mgr1     = std::make_shared<PoolManager>();
        auto mm_layers      = std::make_shared<MemoryManagerOnDemand>(lifetime_mgr0, pool_mgr0);
        auto mm_transitions = std::make_shared<MemoryManagerOnDemand>(lifetime_mgr1, pool_mgr1);

        //set memory manager where allowed to manage internal memory requirements
        conv1_main_branch = std::make_unique<NEConvolutionLayer>(mm_layers);
        conv2_main_branch = std::make_unique<NEConvolutionLayer>(mm_layers);
        conv3_main_branch = std::make_unique<NEConvolutionLayer>(mm_layers);
        conv4_main_branch = std::make_unique<NEConvolutionLayer>(mm_layers);
        conv5_main_branch = std::make_unique<NEConvolutionLayer>(mm_layers);
        sk2_conv          = std::make_unique<NEConvolutionLayer>(mm_layers);

        //[initialize tensors]
        // initialize src tensor
        TensorShape src_shape(3,960,540);
        src.allocator()->init(TensorInfo(src_shape, 1, DataType::F32, DataLayout::NHWC));
        // initialize conv1_main_branch tensor
        TensorShape conv1_weight_shape(3,3,3,4);
        TensorShape conv1_output_shape(4,960,540);
        conv1_weight.allocator()->init(TensorInfo(conv1_weight_shape, 1, DataType::F32, DataLayout::NHWC));
        conv1_bias.allocator()->init(TensorInfo(TensorShape(4), 1, DataType::F32, DataLayout::NHWC));
        conv1_out.allocator()->init(TensorInfo(conv1_output_shape, 1, DataType::F32, DataLayout::NHWC));

        // initialize conv2_main_branch tensor
        const TensorShape conv2_weight_shape(4,1,1,24);
        const TensorShape conv2_bias_shape(24);
        const TensorShape conv2_output_shape(24, 960, 540);
        conv2_weight.allocator()->init(TensorInfo(conv2_weight_shape, 1, DataType::F32, DataLayout::NHWC));
        conv2_bias.allocator()->init(TensorInfo(conv2_bias_shape, 1, DataType::F32, DataLayout::NHWC));
        conv2_out.allocator()->init(TensorInfo(conv2_output_shape, 1, DataType::F32, DataLayout::NHWC));

        // initialize conv3_main_branch tensor
        const TensorShape conv3_weight_shape(24,1,1,3);
        const TensorShape conv3_bias_shape(3);
        const TensorShape conv3_output_shape(3, 960, 540);
        conv3_weight.allocator()->init(TensorInfo(conv3_weight_shape, 1, DataType::F32, DataLayout::NHWC));
        conv3_bias.allocator()->init(TensorInfo(conv3_bias_shape, 1, DataType::F32, DataLayout::NHWC));
        conv3_out.allocator()->init(TensorInfo(conv3_output_shape, 1, DataType::F32, DataLayout::NHWC));

        // initialize conv4_main_branch tensor
        const TensorShape conv4_weight_shape(3,3,3,4);
        const TensorShape conv4_bias_shape(4);
        const TensorShape conv4_output_shape(4, 960, 540);
        conv4_weight.allocator()->init(TensorInfo(conv4_weight_shape, 1, DataType::F32, DataLayout::NHWC));
        conv4_bias.allocator()->init(TensorInfo(conv4_bias_shape, 1, DataType::F32, DataLayout::NHWC));
        conv4_out.allocator()->init(TensorInfo(conv4_output_shape, 1, DataType::F32, DataLayout::NHWC));

        // initialize conv5_main_branch tensor
        //layer5: Conv5_main_branch
        Tensor conv5_weight, conv5_bias, conv5_out;
        const TensorShape conv5_weight_shape(4,3,3,12);
        const TensorShape conv5_bias_shape(12);
        const TensorShape conv5_output_shape(12, 960, 540);
        conv5_weight.allocator()->init(TensorInfo(conv5_weight_shape, 1, DataType::F32, DataLayout::NHWC));
        conv5_bias.allocator()->init(TensorInfo(conv5_bias_shape, 1, DataType::F32, DataLayout::NHWC));
        conv5_out.allocator()->init(TensorInfo(conv5_output_shape, 1, DataType::F32, DataLayout::NHWC));

        // initialize sk2_conv tensor
        const TensorShape sk2_weight_shape(3,5,5,12);
        const TensorShape sk2_bias_shape(12);
        const TensorShape sk2_output_shape(12, 960, 540);
        sk2_conv_weight.allocator()->init(TensorInfo(sk2_weight_shape, 1, DataType::F32, DataLayout::NHWC));
        sk2_conv_bias.allocator()->init(TensorInfo(sk2_bias_shape, 1, DataType::F32, DataLayout::NHWC));
        sk2_conv_out.allocator()->init(TensorInfo(sk2_output_shape, 1, DataType::F32, DataLayout::NHWC));

        /* -----------end of tensor initialization------------------*/

        // Configure Layers
        conv1_main_branch->configure(&src, &conv1_weight, &conv1_bias, &conv1_out, PadStrideInfo(1,1,1,1));
        sk2_conv->configure(&src, &sk2_conv_weight, &sk2_conv_bias, &sk2_conv_out, PadStrideInfo(1,1,2,2));
        conv2_main_branch->configure(&conv1_out, &conv2_weight, &conv2_bias, &conv2_out, PadStrideInfo(1,1,0,0));
        conv3_main_branch->configure(&conv2_out, &conv3_weight, &conv3_bias, &conv3_out, PadStrideInfo(1,1,0,0));
        conv4_main_branch->configure(&conv3_out, &conv4_weight, &conv4_bias, &conv4_out, PadStrideInfo(1,1,1,1));
        sk1_add.configure(&conv1_out, &conv4_out, &conv4_out, ConvertPolicy::SATURATE);
        conv5_main_branch->configure(&conv4_out, &conv5_weight, &conv5_bias, &conv5_out, PadStrideInfo(1,1,1,1));
        sk2_conv->configure(&src, &sk2_conv_weight, &sk2_conv_bias, &sk2_conv_out, PadStrideInfo(1,1,2,2));
        sk2_add.configure(&sk2_conv_out, &conv5_out, &conv5_out, ConvertPolicy::SATURATE);

        /* -----------end of layer configuration------------------*/

        // Add Tensor to memory manager
        // 2 memory groups for input and output management
        memory_group0 = std::make_unique<MemoryGroup>(mm_transitions);
        memory_group1 = std::make_unique<MemoryGroup>(mm_transitions);

        //memory_group0->manage(&conv1_out);
        //conv1_out.allocator()->allocate();
        memory_group1->manage(&conv2_out);
        conv2_out.allocator()->allocate();
        memory_group0->manage(&conv3_out);
        conv3_out.allocator()->allocate();
        //memory_group1->manage(&conv4_out);
        //conv4_out.allocator()->allocate();
        //memory_group0->manage(&conv5_out);
        //conv5_out.allocator()->allocate();
        memory_group1->manage(&sk2_conv_out);
        sk2_conv_out.allocator()->allocate();

        conv1_out.allocator()->allocate();
        conv4_out.allocator()->allocate();
        conv5_out.allocator()->allocate();

        src.allocator()->allocate();
        conv1_weight.allocator()->allocate();
        conv1_bias.allocator()->allocate();

        conv2_weight.allocator()->allocate();
        conv2_bias.allocator()->allocate();

        conv3_weight.allocator()->allocate();
        conv3_bias.allocator()->allocate();

        conv4_weight.allocator()->allocate();
        conv4_bias.allocator()->allocate();

        conv5_weight.allocator()->allocate();
        conv5_bias.allocator()->allocate();

        sk2_conv_weight.allocator()->allocate();
        sk2_conv_bias.allocator()->allocate();

        //populate layer manager
        mm_layers->populate(allocator, 1);
        //populate transition manager
        mm_transitions->populate(allocator, 2);

        return true;
    }

    void do_run() override
    {
        //Acquire memory for the memory groups
        memory_group0->acquire();
        memory_group1->acquire();

        sk2_conv->run();

        //test only the skiplink convolution
        //conv1_main_branch->run();
        //conv2_main_branch->run();
        //conv3_main_branch->run();
        //conv4_main_branch->run();
        //sk1_add.run();
        //conv5_main_branch->run();
        //sk2_add.run();

        memory_group0->release();
        memory_group1->release();
    }

private:
    // The src tensor should contain the input image
    Tensor src{};
    // Intermediate tensors used
    Tensor conv1_weight{};
    Tensor conv1_bias{};
    Tensor conv1_out{};

    Tensor conv2_weight{};
    Tensor conv2_bias{};
    Tensor conv2_out{};

    Tensor conv3_weight{};
    Tensor conv3_bias{};
    Tensor conv3_out{};

    Tensor conv4_weight{};
    Tensor conv4_bias{};
    Tensor conv4_out{};

    Tensor conv5_weight{};
    Tensor conv5_bias{};
    Tensor conv5_out{};

    Tensor sk2_conv_weight{};
    Tensor sk2_conv_bias{};
    Tensor sk2_conv_out{};

    //Allocator
    Allocator allocator{};

    //Memory groups
    std::unique_ptr<MemoryGroup> memory_group0{};
    std::unique_ptr<MemoryGroup> memory_group1{};

    //Layers
    std::unique_ptr<NEConvolutionLayer> conv1_main_branch{};
    std::unique_ptr<NEConvolutionLayer> conv2_main_branch{};
    std::unique_ptr<NEConvolutionLayer> conv3_main_branch{};
    std::unique_ptr<NEConvolutionLayer> conv4_main_branch{};
    std::unique_ptr<NEConvolutionLayer> conv5_main_branch{};
    std::unique_ptr<NEConvolutionLayer> sk2_conv{};
    NEArithmeticAddition                sk1_add{};
    NEArithmeticAddition                sk2_add{};
};

int main(int argc, char **argv)
{
    std::cout<<"start testing...\n";

    return utils::run_example<NEON_WDSR_FP32_Example>(argc, argv);
}

The wdsr_540p_fp32.tflite file has been attached also if you want to benchmark the performance for TFLITE:
https://drive.google.com/file/d/1aL9sq8oDUKPu-lZqq5we7s7Vnf0enPnt/view?usp=sharing
Thanks for the patience!

Hi @morgolock , could you please check this issue?
I just want to make sure there is nothing wrong with my settings and the benchmarking I have conducted.

Hi @GGGGxxxxxxxxr
I'd suggest you try ArmNN's ExecuteNetwork to assess the performance of this model.
See below the inference time of ACL
root@acl_hikey_9:~/tmp/user/armnn/2302# LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./ExecuteNetwork -c CpuAcc -m ../../tflite_models/wdsr_960.tflite -N --iterations=5 |grep Inference
Info: Inference time: 400.57 ms
Info: Inference time: 315.57 ms
Info: Inference time: 318.07 ms
Info: Inference time: 318.24 ms
Info: Inference time: 319.84 ms

Versus the time using tflite inference time
root@acl_hikey_9:~/tmp/user/armnn/2302# LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./ExecuteNetwork -c CpuAcc -m ../../tflite_models/wdsr_960.tflite -N --iterations=5 -T tflite |grep Inference
Info: Inference time: 525.38 ms
Info: Inference time: 516.27 ms
Info: Inference time: 526.44 ms
Info: Inference time: 525.00 ms
Info: Inference time: 552.10 ms

In general, I would recommend using ExecuteNetwork when you have a .tflite model rather than implementing the model by hand using ACL operators.
Hope this helps.

Hi @morgolock,
Thanks for your advice!
I have tried the pre-built binary of ArmNN on my android devices,
here is the command I used for benchmark:
./ExecuteNetwork -c CpuAcc -m /data/local/tmp/wdsr_960.tflite -N --iterations=10 --number-of-threads=1
This is my result:

With 1-thread, it takes about 240ms for this wads_960.tflite model execution.
I have tried the command with "-T" (enable TFLITE runtime), the result is worse than ArmNN.
Here is the benchmark with "-T":

But that TFLITE Inferencing speed seems like quite unmatched with the result generated by the official benchmark tool from TFLITE.
Here is the link for TFLITE official benchmark:
https://www.tensorflow.org/lite/performance/measurement
Thanks again!

Hi @GGGGxxxxxxxxr

But that TFLITE Inferencing speed seems like quite unmatched with the result generated by the official benchmark tool from TFLITE.

The difference you see may be because we are using different tflite versions. I used tflite v2.10, which version of tflite did you use? How big is the difference ?

Hi @morgolock
I have found out the cause of this issue.
In TensorflowLite, if XNNPACK has been enabled, the performance on CPU would be dramatically increased.
If I disable XNNPACK in Tensorflowlite, the performance would be worse than ArmNN.
Seems like XNNPACK provides a super-optimized backend implementation for operators.
It would generate a speedup over 50%. From 220ms to 90ms with one-thread on the same model.
You could try TensorflowLite Benchmark with the TFLITE model, with  _use_xnnpack= true / false.
You could tell the difference.
Thanks!


Make hints the same colour as comments.

Since https://github.com/helix-editor/helix/pull/5934 landed in 23.05 helix supports hints from the LSP.
This PR change the hints colors to be the same as comments because otherwise they show the same colour as code which is confusing.
I am far from a UX expert so feel free to suggest something better ! :)
Edit : after finding this post I landed on the following for ever-forest-medium-light :
"ui.virtual.inlay-hint" = {fg = "grey2", bg = "bg1", modifiers = ["italic"]}

Thanks for the contribution!
I think the comment color is a good choice here, signifying that it's not code and blending it a bit into the background. I'll try out the PR soon, but likely merge it as-is. The file mode change of the build script looks fine, too (I developed the themes on Windows which has no concept of an executable flag).
You may have noticed that this repo has become mostly stale, as I didn't have the time to consistently keep up with changes in helix and patch the themes accordingly. I'm fine PRs like this, but I don't know when/if I get back to it and rework the themes to cover all of helix' new features.

You may have noticed that this repo has become mostly stale, as I didn't have the time to consistently keep up with changes in helix and patch the themes accordingly.

To be honest the theme looks good as is for me ! I just enabled hints, got confused and it was a quick fix :)
That's one of the reasons open source is nice, others can continue what you started


Working travis build status

Remove broken build status caused by the name change of the github organization.

Thanks!


Init docs site

closes #24

Summary by Sourcery
This pull request sets up a documentation site for the ufpy package using MkDocs with the Material theme. It includes configuration for Read the Docs, various MkDocs plugins, and markdown extensions. The documentation covers the UDict and UStack classes, generators, type checking protocols, and type aliases.

New Features:

Initialized a documentation site using MkDocs with the Material theme.
Added documentation for the UDict and UStack classes, various generators, type checking protocols, and type aliases.

Enhancements:

Configured MkDocs with various plugins and markdown extensions to enhance the documentation site.

Build:

Added a Read the Docs configuration file to automate the build and deployment of the documentation site.

Documentation:

Created an index page with an introduction to the ufpy package, installation instructions, and usage examples.
Added individual documentation pages for UDict, UStack, generators, type checking protocols, and type aliases.

Approved


stove UNICA NOBIS FIRE not climate ma number

hi, I've a questions..
Is possible to have a number.stufa_salotto_vent_rear?  now I have only climate:stufa_salotto_vent_rear but i cannot use to set in node red fan speed. in nodered..so if there are both one and the other it would be better
thanks

Hi! You can call the action climate.set_fan_mode from Node-RED. As destination use your climate.stufa_salotto_vent_rear

okey...just do it (i don't know what.. but I deleted and remaked the node and work fine)...now another question for you...please..
do you have a list of all the states and all the attributes of all the entities of the unique micronova nobis? Because I often can't figure out how to configure the nodes. for example: if I go into the entity's history, if you select the wood reserve it tells me the state is "ok" (I imagine it means that the wood is sufficient) but when it enters the wood reserve, how does the status change? So I would like a list for all the other entities too if possible thanks

I added them in  0.6.0

thanks for the replyI'm sorry to bother you for such simple things, unfortunately I'm not a programmer, and I'm not even that intelligent, for me the world of home automation is a new, intriguing and interesting world. unfortunately I lack the basics and often ask stupid questions. like for example the next one I'll make for you:I have searched and searched in every way to find a way to find by myself all the states and attribute names that an entity can have.For example also of all the entities of your work. I still don't understand how to use many of them because I don't know what states or attributes they can take on. Is there a way to figure this out? or simply where should I look for the necessary documentation to discover this data?Thank you again for your infinite patience with meInviato dal mio Galaxy
-------- Messaggio originale --------Da: Vincent Wolsink @.> Data: 27/11/24  07:48  (GMT+01:00) A: vincentwolsink/home_assistant_micronova_agua_iot @.> Cc: merlino1975 @.>, Author @.> Oggetto: Re: [vincentwolsink/home_assistant_micronova_agua_iot] stove UNICA
NOBIS FIRE not climate ma number (Issue #169)
Btw, wood reserve is a binary sensor so you can just use on or off
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

forgiveness, an observation and a request for explanation. If I may abuse your patience.I have made a routine that if I open the pellet door (the stove gives an AL16 alarm and gives me a minute to load the pellets otherwise the stove turns off) Alexa makes me count down e.g. there are 60 seconds left to load the pellets, or something like that.But when I open the door it doesn't start the routine immediately but after about 10 seconds or more. I don't understand if it's a problem with the entity, if it's a problem with my home assistant server, if I'm doing something wrong in writing the routine. or if it's alexa that's slow.What do you think about itInviato dal mio Galaxy
-------- Messaggio originale --------Da: Vincent Wolsink @.> Data: 27/11/24  07:48  (GMT+01:00) A: vincentwolsink/home_assistant_micronova_agua_iot @.> Cc: merlino1975 @.>, Author @.> Oggetto: Re: [vincentwolsink/home_assistant_micronova_agua_iot] stove UNICA
NOBIS FIRE not climate ma number (Issue #169)
Btw, wood reserve is a binary sensor so you can just use on or off
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

I have searched and searched in every way to find a way to find by myself all the states and attribute names that an entity can have.For example also of all the entities of your work. I still don't understand how to use many of them because I don't know what states or attributes they can take on. Is there a way to figure this out?

Usually you can find this in documentation. Since the states for this integration are dynamic and differ per stove I added them to the extra attributes for you, where applicable.

But when I open the door it doesn't start the routine immediately but after about 10 seconds or more. I don't understand if it's a problem with the entity, if it's a problem with my home assistant server, if I'm doing something wrong in writing the routine.

This integration (just like a majority of the integrations) relies on cloud polling for getting updates. This polling happens every 5 min. Which means worst case there is a 5 min delay between you opening the door and AL16 alarm happening. There is no way to make this faster since this will overload the cloud endpoints.


missing class when doing incremental build

if a class is changed and don't need to be modified by javassist,the class will miss in dex

Fixed at commit https://github.com/didi/DroidAssist/commit/0060e723ee4361cad8e505af172b0251dd973cbd


Foreign fetch post for M54

R: @petele @PaulKinlan
This has been previously reviewed out-of-band.

LGTM as it appears the feedback from the original draft has already been addressed.


Huge pull of edits

Editing provides, playlists, history tracking, status item menu, auto hide title, about box contributor accrediting, and centralized prefs managed by the app delegate. Not a trivial pull offer my edits as a thanks for a great tool I use daily. This edit is 2.1 (20).

Sync'd up to make things easier; add late change to activate when holding SHIFT on mouse over.

This commit completes document aka multiple window support. TODO items include playlist execution as serial play of items or queue using new AV queue object. Given the scope of edits this mergeable pull is well beyond  single "edit" but hopefully others will find it useful as I do - I use it daily,


[fix bug 1061418] Change the event owner when cloning an event.

Coverage decreased (-0.01%) to 91.62% when pulling cc39f87bac4c47b78f05c662ea9357f0f73d615e on akatsoulas:1061418-event-clone into 29ba69c0ba810550a200af461bb0c503c02d5b57 on mozilla:master.

lgtm r+


Problem with ver. 4.0.1

Updated to ver. 4.0.1. I found a big problem, missed the output msg!
Example:
The simplest flow, using a Smart_Switch  plus 2 nodes:
[{"id":"4c90f0fb.6e6d2","type":"tab","label":"extra.test","disabled":false,"info":""},{"id":"9aec7c62.dedc2","type":"debug","z":"4c90f0fb.6e6d2","name":"FROM SWITCH","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":320,"y":80,"wires":[]},{"id":"adcdaeb2.6e71f","type":"inject","z":"4c90f0fb.6e6d2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"dps\":\"1\",\"set\":false}","payloadType":"json","x":130,"y":160,"wires":[["5ba5abff.f3fcb4"]]},{"id":"5ba5abff.f3fcb4","type":"tuya-smart-device","z":"4c90f0fb.6e6d2","deviceName":"switch module#1","deviceId":"bfa355aa196ae*******","deviceKey":"10ad2960ff******","deviceIp":"","retryTimeout":"4000","findTimeout":"4000","tuyaVersion":"3.1","x":110,"y":80,"wires":[["9aec7c62.dedc2"]]}]

The debug output:
  TuyAPI Pinging <IP_ADDRESS> +10s
  TuyAPI Received data: 000055aa00000000000000090000000c00000000b051ab030000aa55 +119ms
  TuyAPI Parsed: +2ms
  TuyAPI { payload: false, leftover: false, commandByte: 9, sequenceN: 0 } +3ms
  TuyAPI Pong from <IP_ADDRESS> +1ms
  express:router dispatching POST /inject/adcdaeb2.6e71f +2m
  express:router query  : /inject/adcdaeb2.6e71f +1ms
  express:router expressInit  : /inject/adcdaeb2.6e71f +3ms
  express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
  express:router dispatching POST /inject/adcdaeb2.6e71f +1ms
  express:router query  : /inject/adcdaeb2.6e71f +0ms
  express:router expressInit  : /inject/adcdaeb2.6e71f +1ms
  express:router corsMiddleware  : /inject/adcdaeb2.6e71f +1ms
  express:router jsonParser  : /inject/adcdaeb2.6e71f +1ms
  body-parser:json content-type undefined +2m
  body-parser:json skip parsing +0ms
  express:router urlencodedParser  : /inject/adcdaeb2.6e71f +2ms
  body-parser:urlencoded content-type undefined +1ms
  body-parser:urlencoded skip parsing +1ms
  express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
  express:router dispatching POST /inject/adcdaeb2.6e71f +5ms
  express:router query  : /inject/adcdaeb2.6e71f +0ms
  express:router expressInit  : /inject/adcdaeb2.6e71f +3ms
  express:router serveStatic  : /inject/adcdaeb2.6e71f +0ms
  express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
  express:router dispatching POST /inject/adcdaeb2.6e71f +0ms
  express:router query  : /inject/adcdaeb2.6e71f +1ms
  express:router expressInit  : /inject/adcdaeb2.6e71f +0ms
  express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
  express:router dispatching POST /inject/adcdaeb2.6e71f +0ms
  express:router query  : /inject/adcdaeb2.6e71f +1ms
  express:router expressInit  : /inject/adcdaeb2.6e71f +0ms
  TuyAPI SET Payload: +8s
  TuyAPI {
  TuyAPI   devId: 'bfa355aa196ae*******',
  TuyAPI   gwId: 'bfa355aa196ae*******',
  TuyAPI   uid: '',
  TuyAPI   t:<PHONE_NUMBER>,
  TuyAPI   dps: { '1': false }
  TuyAPI } +4ms
  TuyAPI Received data: 000055aa00000021000000070000000c00000000167be2e10000aa55 +218ms
  TuyAPI Parsed: +1ms
  TuyAPI { payload: false, leftover: false, commandByte: 7, sequenceN: 33 } +1ms
  TuyAPI Got SET ack. +1ms
  TuyAPI Received data: 000055aa00000000000000080000004b00000000332e3300000000000000ac00000001f3fc6d8608d019e3d7c7e5022c16e184883cc6cbd441c8b209250a0222ae613e4ab9f738ccf13e1cc293961a60ddb6431b66f5220000aa55 +97ms
  TuyAPI Parsed: +0ms
  TuyAPI {
  TuyAPI   payload: { dps: { '1': false }, t:<PHONE_NUMBER> },
  TuyAPI   leftover: false,
  TuyAPI   commandByte: 8,
  TuyAPI   sequenceN: 0
  TuyAPI } +2ms
  TuyAPI Received DATA packet +1ms
  TuyAPI Pinging <IP_ADDRESS> +2s
  TuyAPI Received data: 000055aa00000000000000090000000c00000000b051ab030000aa55 +54ms
  TuyAPI Parsed: +2ms
  TuyAPI { payload: false, leftover: false, commandByte: 9, sequenceN: 0 } +2ms
  TuyAPI Pong from <IP_ADDRESS> +2ms
  engine:ws received "2" +19s
  engine:socket packet +19s
  engine:socket got ping +2ms
  engine:socket sending packet "pong" (undefined) +0ms
  engine:socket flushing buffer to transport +1ms
  engine:ws writing "3" +4ms`

The log shows data send and received by tuyapi,  but nothing in output from node-red-contrib-tuya-smart-device !!
Best regards
m.s.

In the 7.0 version of tuya , the data event was changed to dp-refresh.
https://github.com/vinodsr/node-red-contrib-tuya-smart-device/blob/a60d0c83716e345706f0b542f4bcb6cba5275b64/src/tuya-smart-device.js#L106
It's working for my devices .
Is it because of this ? Can you change the event back to data and check?
Also can you share the node red logs for this usecase.
On Mon, 12 Apr, 2021, 5:32 pm Marco Sillano, @.***>
wrote:

Updated to ver. 4.0.1. I found a big problem, missed the output msg!
Example:
The simplest flow, using a Smart_Switch
https://github.com/msillano/tuyaDAEMON/blob/main/devices/Smart_Switch01/device_Smart_Switch01.pdf
plus 2 nodes:
[{"id":"4c90f0fb.6e6d2","type":"tab","label":"extra.test","disabled":false,"info":""},{"id":"9aec7c62.dedc2","type":"debug","z":"4c90f0fb.6e6d2","name":"FROM SWITCH","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":320,"y":80,"wires":[]},{"id":"adcdaeb2.6e71f","type":"inject","z":"4c90f0fb.6e6d2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"dps":"1","set":false}","payloadType":"json","x":130,"y":160,"wires":[["5ba5abff.f3fcb4"]]},{"id":"5ba5abff.f3fcb4","type":"tuya-smart-device","z":"4c90f0fb.6e6d2","deviceName":"switch module#1","deviceId":"bfa355aa196ae*******","deviceKey":"10ad2960ff******","deviceIp":"","retryTimeout":"4000","findTimeout":"4000","tuyaVersion":"3.1","x":110,"y":80,"wires":[["9aec7c62.dedc2"]]}]
The debug output:
TuyAPI Pinging <IP_ADDRESS> +10s
TuyAPI Received data: 000055aa00000000000000090000000c00000000b051ab030000aa55 +119ms
TuyAPI Parsed: +2ms
TuyAPI { payload: false, leftover: false, commandByte: 9, sequenceN: 0 } +3ms
TuyAPI Pong from <IP_ADDRESS> +1ms
express:router dispatching POST /inject/adcdaeb2.6e71f +2m
express:router query  : /inject/adcdaeb2.6e71f +1ms
express:router expressInit  : /inject/adcdaeb2.6e71f +3ms
express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
express:router dispatching POST /inject/adcdaeb2.6e71f +1ms
express:router query  : /inject/adcdaeb2.6e71f +0ms
express:router expressInit  : /inject/adcdaeb2.6e71f +1ms
express:router corsMiddleware  : /inject/adcdaeb2.6e71f +1ms
express:router jsonParser  : /inject/adcdaeb2.6e71f +1ms
body-parser:json content-type undefined +2m
body-parser:json skip parsing +0ms
express:router urlencodedParser  : /inject/adcdaeb2.6e71f +2ms
body-parser:urlencoded content-type undefined +1ms
body-parser:urlencoded skip parsing +1ms
express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
express:router dispatching POST /inject/adcdaeb2.6e71f +5ms
express:router query  : /inject/adcdaeb2.6e71f +0ms
express:router expressInit  : /inject/adcdaeb2.6e71f +3ms
express:router serveStatic  : /inject/adcdaeb2.6e71f +0ms
express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
express:router dispatching POST /inject/adcdaeb2.6e71f +0ms
express:router query  : /inject/adcdaeb2.6e71f +1ms
express:router expressInit  : /inject/adcdaeb2.6e71f +0ms
express:router mounted_app  : /inject/adcdaeb2.6e71f +1ms
express:router dispatching POST /inject/adcdaeb2.6e71f +0ms
express:router query  : /inject/adcdaeb2.6e71f +1ms
express:router expressInit  : /inject/adcdaeb2.6e71f +0ms
TuyAPI SET Payload: +8s
TuyAPI {
TuyAPI   devId: 'bfa355aa196ae*******',
TuyAPI   gwId: 'bfa355aa196ae*******',
TuyAPI   uid: '',
TuyAPI   t:<PHONE_NUMBER>,
TuyAPI   dps: { '1': false }
TuyAPI } +4ms
TuyAPI Received data: 000055aa00000021000000070000000c00000000167be2e10000aa55 +218ms
TuyAPI Parsed: +1ms
TuyAPI { payload: false, leftover: false, commandByte: 7, sequenceN: 33 } +1ms
TuyAPI Got SET ack. +1ms
TuyAPI Received data: 000055aa00000000000000080000004b00000000332e3300000000000000ac00000001f3fc6d8608d019e3d7c7e5022c16e184883cc6cbd441c8b209250a0222ae613e4ab9f738ccf13e1cc293961a60ddb6431b66f5220000aa55 +97ms
TuyAPI Parsed: +0ms
TuyAPI {
TuyAPI   payload: { dps: { '1': false }, t:<PHONE_NUMBER> },
TuyAPI   leftover: false,
TuyAPI   commandByte: 8,
TuyAPI   sequenceN: 0
TuyAPI } +2ms
TuyAPI Received DATA packet +1ms
TuyAPI Pinging <IP_ADDRESS> +2s
TuyAPI Received data: 000055aa00000000000000090000000c00000000b051ab030000aa55 +54ms
TuyAPI Parsed: +2ms
TuyAPI { payload: false, leftover: false, commandByte: 9, sequenceN: 0 } +2ms
TuyAPI Pong from <IP_ADDRESS> +2ms
engine:ws received "2" +19s
engine:socket packet +19s
engine:socket got ping +2ms
engine:socket sending packet "pong" (undefined) +0ms
engine:socket flushing buffer to transport +1ms
engine:ws writing "3" +4ms`
The log shows data send and received by tuyapi, but nothing in output from
node-red-contrib-tuya-smart-device !! Strange.
p.s.
Of course, the ver. 3.0.2 works well with all devices.
Best regards
m.s.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/vinodsr/node-red-contrib-tuya-smart-device/issues/54,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADQ6OH2YIB36ES5J3BLDG3TILOMRANCNFSM42ZEZKVQ
.

Using ver  3.0.2 and tuyapi 6.1.1
================ output (OK) :

     object
		payload: object
			data: object
				dps: object
					1: false
				t:<PHONE_NUMBER>
		deviceId: "bfa355aa196ae5975cy6ii"
		deviceName: "switch module#1"
	_msgid: "2d3df1b1.32761e"

updating to 4.0.2, using palette, restarted node-rerd:
================ output (BAD) : nothing

The log:
 TuyAPI SET Payload: +5s
  TuyAPI {
  TuyAPI   devId: 'bfa355aa196ae5975cy6ii',
  TuyAPI   gwId: 'bfa355aa196ae5975cy6ii',
  TuyAPI   uid: '',
  TuyAPI   t:<PHONE_NUMBER>,
  TuyAPI   dps: { '1': false }
  TuyAPI } +0ms
  TuyAPI Received data: 000055aa00000001000000070000000c00000000a505a9140000aa55 +229ms
  TuyAPI Parsed: +1ms
  TuyAPI { payload: false, leftover: false, commandByte: 7, sequenceN: 1 } +0ms
  TuyAPI Got SET ack. +1ms
  TuyAPI Received data: 000055aa00000000000000080000004b00000000332e3300000000000000c200000001f3fc6d8608d019e3d7c7e5022c16e18406d0bec5f45b020a11b4373b024dbf50b61ffb0660ed11097028967164685eda204d01950000aa55 +92ms
  TuyAPI Parsed: +0ms
  TuyAPI {
  TuyAPI   payload: { dps: { '1': false }, t:<PHONE_NUMBER> },
  TuyAPI   leftover: false,
  TuyAPI   commandByte: 8,
  TuyAPI   sequenceN: 0
  TuyAPI } +1ms
  TuyAPI Received DATA packet +0ms

using 4.0.2, modified so:

106 ......
      tuyaDevice.on('dp-refresh', data => {
          node.log(`dp-refresh from device: ${JSON.stringify(data)}`);
          setStatusConnected();
          node.send({
              payload: {
                  data: data,
                  deviceId: node.deviceId,
                  deviceName: node.deviceName
              }
          });
      });
     tuyaDevice.on('data', data => {
          node.log(`data from device: ${JSON.stringify(data)}`);
          setStatusConnected();
          node.send({
              payload: {
                  data: data,
                  deviceId: node.deviceId,
                  deviceName: node.deviceName
              }
          });
      });

================ output (OK) ( but from 'data' event):
The log:
 TuyAPI Got SET ack. +0ms
 TuyAPI Received data: 000055aa00000000000000080000004b00000000332e3300000000000000c500000001f3fc6d8608d019e3d7c7e5022c16e184d3d9699d020f52eda405b5d1c484ef3cb61ffb0660ed11097028967164685edaa93e69560000aa55 +96ms
 TuyAPI Parsed: +1ms
 TuyAPI {
 TuyAPI   payload: { dps: { '1': false }, t:<PHONE_NUMBER> },
 TuyAPI   leftover: false,
 TuyAPI   commandByte: 8,
 TuyAPI   sequenceN: 0
 TuyAPI } +1ms
 TuyAPI Received DATA packet +1ms
13 Apr 17:29:11 - [info] [tuya-smart-device:switch module#1] data from device: {"dps":{"1":false},"t":1618327749}
 TuyAPI Pinging <IP_ADDRESS> +7s

using  tuyapi 6.1.1, so modified:

50      nullPayloadOnJSONError = false,
        issueGetOnConnect = false,
        issueRefreshOnConnect = true

801    throw new Error('find() timed out device ' + this.device.id);

and ADDED a second device (AC meter):
I get the data packet from "dp_refresh" and from "data" events from the same device:
================ output (OK)
The Log:
TuyAPI Received data: 000055aa00000000000000080000006b00000000332e330000000000000401000000018c83b36d05731852accc351738c9da074287d07fa9a93b83e680bc4317031bf38f8848c06fc97ef23e9e3a907e6d813d4d8404c890341f6e1f17d43f57240276780babfe07ab875790c509da561b996646763f250000aa55 +275ms
TuyAPI Parsed: +1ms
TuyAPI {
TuyAPI   payload: { devId: '486441603c6105ca6f51', dps: { '20': 2300 }, t:<PHONE_NUMBER> },
TuyAPI   leftover: false,
TuyAPI   commandByte: 8,
TuyAPI   sequenceN: 0
TuyAPI } +1ms
TuyAPI Received DP_REFRESH packet. +0ms
13 Apr 18:05:50 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"486441603c6105ca6f51","dps":{"20":2300},"t":1618329950}
TuyAPI Pinging <IP_ADDRESS> +8s
(omissis...)
TuyAPI Got SET ack. +2ms
TuyAPI Received data: 000055aa00000000000000080000006b00000000332e330000000000000402000000018c83b36d05731852accc351738c9da074287d07fa9a93b83e680bc4317031bf3df1921081dfb2fe75b15f2efcbc2359d86af3ad5a068d2d5c0e7c91fbee2abcdfd064abafbec9b14a5a1e906aea7805c4453b7180000aa55 +45ms
TuyAPI Parsed: +1ms
TuyAPI {
TuyAPI   payload: { devId: '486441603c6105ca6f51', dps: { '1': true }, t:<PHONE_NUMBER> },
TuyAPI   leftover: false,
TuyAPI   commandByte: 8,
TuyAPI   sequenceN: 0
TuyAPI } +3ms
TuyAPI Received DATA packet +2ms
13 Apr 18:06:27 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"486441603c6105ca6f51","dps":{"1":true},"t":1618329987}
TuyAPI Pinging <IP_ADDRESS> +1s
(omissis...)
TuyAPI Received data: 000055aa00000000000000080000005b00000000332e330000000000000403000000018c83b36d05731852accc351738c9da074287d07fa9a93b83e680bc4317031bf3ed233fc246199abe22fce613ed4836b3e5fb3f5b072881d3062276de407e50460b9294030000aa55 +1s
TuyAPI Parsed: +1ms
TuyAPI {
TuyAPI   payload: { devId: '486441603c6105ca6f51', dps: { '18': 0 }, t:<PHONE_NUMBER> },
TuyAPI   leftover: false,
TuyAPI   commandByte: 8,
TuyAPI   sequenceN: 0
TuyAPI } +4ms
TuyAPI Received DP_REFRESH packet. +2ms
13 Apr 18:07:11 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"486441603c6105ca6f51","dps":{"18":0},"t":1618330031}
TuyAPI Pinging <IP_ADDRESS> +7s
(omissis...)
TuyAPI GET Payload: +4s
TuyAPI {
TuyAPI   gwId: '486441603c6105ca6f51',
TuyAPI   devId: '486441603c6105ca6f51',
TuyAPI   t: '1618330425',
TuyAPI   dps: {},
TuyAPI   uid: '486441603c6105ca6f51'
TuyAPI } +0ms
TuyAPI Received data: 000055aa000000330000000a0000006c000000008c83b36d05731852accc351738c9da074287d07fa9a93b83e680bc4317031bf3ea5438c333565d9b521b86bdc708906ffb71a2916bb5f8ba76d4c31fad8ea6bbe35a47e326940699d5cb788a96194ee02a4466b17970d17566ceadabca79aa158e7d0b150000aa55 +209ms
TuyAPI Parsed: +1ms
TuyAPI {
TuyAPI   payload: {
TuyAPI     devId: '486441603c6105ca6f51',
TuyAPI     dps: { '1': true, '9': 0, '18': 0, '19': 44, '20': 2300, '101': 108 }
TuyAPI   },
TuyAPI   leftover: false,
TuyAPI   commandByte: 10,
TuyAPI   sequenceN: 51
TuyAPI } +4ms
TuyAPI Received DATA packet +3ms
13 Apr 18:13:45 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"486441603c6105ca6f51","dps":{"1":true,"9":0,"18":0,"19":44,"20":2300,"101":108}}
TuyAPI Pinging <IP_ADDRESS> +4s
 (omissis...)
TuyAPI Pong from <IP_ADDRESS> +1ms
TuyAPI Received data: 000055aa00000000000000080000006b00000000332e330000000000000405000000018c83b36d05731852accc351738c9da074287d07fa9a93b83e680bc4317031bf3857d8a0a6ec06c1c6fadff21ddbfca2fc29015c85b3e3208abb8034e026ad7d0780babfe07ab875790c509da561b99667714e3e80000aa55 +894ms
TuyAPI Parsed: +2ms
TuyAPI {
TuyAPI   payload: { devId: '486441603c6105ca6f51', dps: { '20': 2321 }, t:<PHONE_NUMBER> },
TuyAPI   leftover: false,
TuyAPI   commandByte: 8,
TuyAPI   sequenceN: 0
TuyAPI } +3ms
TuyAPI Received DP_REFRESH packet. +2ms
13 Apr 18:13:51 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"486441603c6105ca6f51","dps":{"20":2321},"t":1618330431}

Conclusion:
- I will test some days this last option, to see if it is okay in any situations (I'm now using  20+ devices in 2 O.S.).
Best regards
m.s.

@msillano  what I see for your log is that the messages are not repeated for data and data refresh events..may be I need to subscribe for both.
Waiting for further updates from your testing.

Using an 'AC meter' (https://m.made-in-china.com/product/Dds238-2-WiFi-Single-Phase-DIN-Rail-Type-WiFi-Remote-Control-Energy-Meter-790065132.html).
dP Key: 1 switch, 9: countdown, 18: Current (mA), 19: Watt10, 20: V10, 101: KWh * 100
SCHEMA {"operation":"GET", "schema":true}: as expected.
14 Apr 16:27:00 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":117}}
14 Apr 16:27:01 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":117}}
14 Apr 16:27:02 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":117}}
14 Apr 16:27:03 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":117}}
14 Apr 16:27:04 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"101":118},"t":1618410423}  (note: PUSH by device)
14 Apr 16:27:07 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":118}}
14 Apr 16:28:23 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":118}}
14 Apr 16:30:16 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2312,"101":118}}
14 Apr 16:30:19 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":556},"t":1618410618} (note: PUSHed)
14 Apr 16:30:20 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"19":199},"t":1618410619} (note: PUSHed)
14 Apr 16:30:20 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":99},"t":1618410620}  (note: PUSHed)
14 Apr 16:30:20 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"19":87},"t":1618410620}  (note: PUSHed)
14 Apr 16:30:21 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":99,"19":87,"20":2312,"101":118}}
14 Apr 16:30:32 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":99,"19":87,"20":2312,"101":118}}

GET {"operation":"GET","dps":"20"}: strange, like SCHEMA
14 Apr 15:53:23 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2308,"101":117}}
14 Apr 15:53:24 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2308,"101":117}}
14 Apr 15:53:25 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2308,"101":117}}
14 Apr 15:53:26 - [info] [tuya-smart-device:AC meter] data from device: {"devId":"48644******","dps":{"1":true,"9":0,"18":57,"19":44,"20":2308,"101":117}}

SET null {"dps":"20", "set":null}: as expected
14 Apr 15:55:52 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2310},"t":1618408551}
14 Apr 15:55:53 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2310},"t":1618408552}
14 Apr 15:55:55 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2310},"t":1618408554}
14 Apr 15:55:56 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2310},"t":1618408555}
14 Apr 15:55:57 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2310},"t":1618408556}
14 Apr 15:55:58 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2310},"t":1618408557}

As you can see data don't change. Very low sampling rate: see timing.
Changed code in tuya-smart-device.js:
 32       switch (operation) {
               case "RFR":
                    tuyaDevice.refresh(msg.payload);
                    break;
                case "SET":

RFT 20 {"operation":"RFR", "dps":"20"} repeat every 1 sec:
14 Apr 16:04:58 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2301},"t":1618409097}
14 Apr 16:04:59 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2299},"t":1618409098}
14 Apr 16:05:00 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":58},"t":1618409099}
14 Apr 16:05:00 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2300},"t":1618409099}
14 Apr 16:05:01 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":57},"t":1618409100}
14 Apr 16:05:02 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"19":43},"t":1618409101}
14 Apr 16:05:02 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2299},"t":1618409101}
14 Apr 16:05:03 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"19":44},"t":1618409102}
14 Apr 16:05:03 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2298},"t":1618409102}
14 Apr 16:05:05 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":58},"t":1618409104}
14 Apr 16:05:05 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2299},"t":1618409104}

data changes every reading, Fast sampling rate (every request, now 1 sec.)
some data look missed (e.g. 16:05:04)
I asked for dps 20, but I get results also for 18, 19...
maybe data is sent only in case of change: that justifies both 2 and 3.

Works also so : {"operation":"RFR"} repeat every 1 sec:
14 Apr 16:12:59 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"19":45},"t":1618409578}
14 Apr 16:12:59 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2302},"t":1618409578}
14 Apr 16:13:00 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":57},"t":1618409579}
14 Apr 16:13:00 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"19":44},"t":1618409579}
14 Apr 16:13:00 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2304},"t":1618409579}
14 Apr 16:13:01 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"18":58},"t":1618409580}
14 Apr 16:13:01 - [info] [tuya-smart-device:AC meter] dp-refresh from device: {"devId":"48644******","dps":{"20":2305},"t":1618409580}

Conclusion.

In some devices, the REFRESH command (18) can change the default device sample rate, as fast as 1 sec.
The GET not: it uses the default sample rate, and repeat the last data send (From MQTT engine?).
Some dps are not interested by the REFRESH: in this case the dps 1, 9, 101.
Normally some dps look PUSHed as 'dp-refresh' at any variation (dps 18, 19), some not (dps 20): it does some averages?
Here SCHEMA and GET are always 'data' events, so I think you must use both events: 'data' and 'dp-refresh', as I do.
As usual with Tuya devices, this behavior can change from device to device.
For that, I don't like the wired dps arrays present in tuyapi - index.js, at lines 104 and 732. Strange, but eliminating the arrays, the result doesn't change!

Best regards
m.s.

@msillano in order to avoid complex flows, what i am planning is

add option to refresh as a command
by default the node will subscribe for both data and data refresh events. but this behavior can be set from the node's config page.

I will push the changes to a separate branch and you can test it.

@msillano  Can you please verify the new feature @  feature/add-support-for-refresh branch
Now you can send the new operation "REFRESH".
You can also listen to multiple events in the config page. (for both single and generic node)

It works well... Thanks
20 Apr 16:42:52 - [info] [tuya-smart-device:power strip] Data from device  [event:data]: {"devId":"3613666124a1600db127","dps":{"1":false,"2":false,"3":false,"4":false,"5":false,"9":0,"10":0,"11":0,"12":0,"13":0}}
20 Apr 16:43:04 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"103":15},"cid":"00158d00056a19ad","t":1618929783}
20 Apr 16:43:04 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"101":55},"cid":"00158d00*****","t":1618929783}
// FAST mode, 6s
20 Apr 16:45:44 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"19":45},"t":1618929943}
20 Apr 16:45:44 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2331},"t":1618929944}
20 Apr 16:45:50 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"18":57},"t":1618929949}
20 Apr 16:45:50 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"19":44},"t":1618929949}
20 Apr 16:45:50 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2329},"t":1618929949}
20 Apr 16:45:56 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2331},"t":1618929955}
20 Apr 16:45:58 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"19":45},"t":1618929957}
20 Apr 16:46:02 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"18":58},"t":1618929962}
20 Apr 16:46:02 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2333},"t":1618929962}
// back to slow mode
20 Apr 16:48:04 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2324},"t":1618930083}
20 Apr 16:52:17 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2335},"t":1618930336}
20 Apr 16:54:24 - [info] [tuya-smart-device:power strip] Data from device  [event:data]: {"devId":"3613666124*****","dps":{"1":true,"2":true,"3":true,"4":true,"5":true},"t":1618930463}
20 Apr 16:54:28 - [info] [tuya-smart-device:power strip] Data from device  [event:data]: {"devId":"3613666124*****","dps":{"1":false,"2":false,"3":false,"4":false,"5":false},"t":1618930468}
20 Apr 16:54:58 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"18":58},"t":1618930497}
20 Apr 16:56:58 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2332},"t":1618930617}
20 Apr 16:58:11 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2320},"t":1618930690}
20 Apr 16:58:24 - [info] [tuya-smart-device:meter] Data from device  [event:dp-refresh]: {"devId":"48644160*****","dps":{"20":2331},"t":1618930703}
20 Apr 16:58:38 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"103":14},"cid":"00158d00*****","t":1618930717}
20 Apr 16:58:40 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"101":54},"cid":"00158d00*****","t":1618930717}
20 Apr 16:59:00 - [info] [tuya-smart-device:Smart IR #1] initiating the find command
20 Apr 16:59:59 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"115":"DQ0NDQ0MDAwMDA0MDA0NDQ0AAAAAAAAA"},"cid":"60a423ff*****","t":1618930798}
20 Apr 17:00:00 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"110":"EBAQEBAQEBATExMTExMTExMAAAAAAAAA"},"cid":"60a423ff*****","t":1618930799}
20 Apr 17:00:01 - [info] [tuya-smart-device:Zigbee Gateway] Data from device  [event:dp-refresh]: {"dps":{"119":"ZGRkZGRkZGRkZGRkZGRkZGQAAAAAAAAA"},"cid":"60a423ff*****","t":1618930800}

In FAST mode data are send every 6 seconds (as set in looptimer2 node) OK
In slow mode data rate is very variable: 2 min... 13 sec. OK
As you can see, some devices send  [event:data]  OK

'by default the node will subscribe for both data and data refresh events. but this behavior can be set from the node's config page.':  the unique reason I see to change the default  is the case of duplicated data.
But that never happened  on my devices.
Best regards
m.s.

Changes are now merged.  Please check version 4.0.2


NTUEEPLUS-57. Write New Doc

What is this PR for?

Update README and delete redundant pictures.
What type of PR is it?
Documentation
Todos

[ ] - None

What is the Jira issue?

https://ntueeplus.atlassian.net/browse/NTUEEPLUS-57
Screenshots (if appropriate)

@noidname01


Memory leak Docker container HASS 0.66.1

Home Assistant release with the issue:

0.66.1
Last working Home Assistant release (if known):
n/a
Operating environment (Hass.io/Docker/Windows/etc.):

Docker, QNAP, latest HASS - installed exactly as specified in the instructions.
Description of problem:
Huge memory leak. HASS reaches 4Gb RAM in 2 days.
The HASS configuration contains only ZWave sensors (30 devices) feeding data to a InfluxDB container.
Everything else was removed.
Network Mode is set to “Host” for both containers. No memory leak on the InfluxDB container.
In the resource center the python process uses all this RAM.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
zwave:
  usb_path: /dev/ttyACM0

influxdb:
  database: test

The problem sits with the Docker logging feature. It records by default all the console output from HASS and the log quickly fills the RAM. Maybe this should be mentioned in the documentation together with a few lines on how to disable the logging.

Hi @covrig , how did you manage to sort the problem, I have the same issue as well, Ram usage in two days gets to over 1 gig?

Thanks a lot, will try this on Synology


vcpkg install blaze:x64-windows --head broken

OS: Windows
I used the updated vcpkg.

> .\vcpkg install blaze:x64-windows --head
Computing installation plan...
The following packages will be built and installed:
    blaze[core]:x64-windows (from HEAD)
  * lapack[core]:x64-windows
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Starting package 1/2: lapack:x64-windows
Building package lapack[core]:x64-windows...
Could not locate cached archive: C:\Users\Bita\AppData\Local\vcpkg\archives\3f\3f16cd709cb2af214437ff62d1640c9c67bffb08.zip
-- Configuring x64-windows
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\Bita\AppData\Local\vcpkg\archives\3f\3f16cd709cb2af214437ff62d1640c9c67bffb08.zip
Building package lapack[core]:x64-windows... done
Installing package lapack[core]:x64-windows...
Installing package lapack[core]:x64-windows... done
Elapsed time for package lapack:x64-windows: 21.13 s
Starting package 2/2: blaze:x64-windows
Building package blaze[core]:x64-windows from HEAD...
-- Downloading https://api.bitbucket.com/2.0/repositories/blaze-lib/blaze/refs/branches/master...
-- Skipping hash check for C:/Repos/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.version.
-- Downloading https://bitbucket.com/blaze-lib/blaze/get/master.tar.gz...
-- Skipping hash check for C:/Repos/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.
-- Extracting source C:/Repos/vcpkg/downloads/blaze-lib-blaze-master.tar.gz
-- Applying patch fix-vm-build.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:54 (message):
  Applying patch failed.  Checking patch CMakeLists.txt...

  error: while searching for:

        endif (flag EQUAL 0)?
     endif (APPLE)?

  ?

     if (flag)?
        message("Cache size not found automatically. Using default value as cache size.")?
        set(tmp ${BLAZE_CACHE_SIZE_DEFAULT})?
     endif (flag)?

  ?

     string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp?
     math(EXPR BLAZE_CACHE_SIZE ${tmp}*1024) # Convert to bytes (assuming that the value is given in kibibytes)?

  ?

  endif (${BLAZE_CACHE_SIZE_AUTO})?

  error: patch failed: CMakeLists.txt:145

  error: CMakeLists.txt: patch does not apply

Call Stack (most recent call first):
  scripts/cmake/vcpkg_extract_source_archive_ex.cmake:141 (vcpkg_apply_patches)
  scripts/cmake/vcpkg_from_bitbucket.cmake:189 (vcpkg_extract_source_archive_ex)
  ports/blaze/portfile.cmake:1 (vcpkg_from_bitbucket)
  scripts/ports.cmake:79 (include)

Error: Building package blaze:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: blaze:x64-windows
  Vcpkg version: 2020.06.15-nohash

Additionally, attach any relevant sections from the log files above.

without --head it works properly.

Thanks for posting this issue. .\vcpkg install port_name --head will install the latest version of port from source, the patches may be apply failed in latest version of port. If you want update this port, you can submit an issue to report.

@taless474 We are applying the patch https://bitbucket.org/blaze-lib/blaze/pull-requests/44/ to Blaze before building it, because without that patch we are unable to build Blaze in our test harness. See here:
https://github.com/microsoft/vcpkg/blob/32eccc18191fbb57b159784a1724d2d00613ae82/ports/blaze/portfile.cmake#L7-L8
That patch has already been applied in Blaze's upstream, so applying the patch to --head fails. You can modify the portfile to remove those attempts to patch before attempting to build --head, possibly using overlay ports.

Thank you for your responses.
I am not sure how to use overlay ports. I have tried
vcpkg_from_bitbucket(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO blaze-lib/blaze
    HEAD_REF master
)

in the blaze's portfile.cmake and used .\vcpkg install blaze:x64-windows --head. It seems to work but in the buildtree I see that the last release commit has been installed. I really appreciate it if you explain more how I can fix this.

@taless474

Copy $/ports/blaze to another directory, let's call it "myoverlay".
Edit myoverlay/blaze/portfile.cmake to remove that PATCHES.
Pass --overlay-ports=myoverlay when invoking vcpkg commands.

PS D:\vcpkg> tree D:\myoverlay /F
Folder PATH listing for volume Dev
Volume serial number is 1093-EAAD
D:\MYOVERLAY
└───blaze
        CONTROL
        fix-vm-build.patch
        portfile.cmake

PS D:\vcpkg> type D:\myoverlay\blaze\portfile.cmake
vcpkg_from_bitbucket(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO blaze-lib/blaze
    REF 0380370f0626de2ad0ec7ea815803e22bbf6b42e
    SHA512 47df2a291febf0565787ed9c4222ee1958d03c5b76c54923e4d8e44f75321c266e81d69ba4512a4ab07d7e431c065d025e01269cf9c1d5f0927f133885def4c7
    HEAD_REF master
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
    OPTIONS
        -DBLAZE_SMP_THREADS=OpenMP
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH share/blaze/cmake)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
PS D:\vcpkg> .\vcpkg.exe install blaze --head --overlay-ports=D:\myoverlay
Computing installation plan...
The following packages will be built and installed:
    blaze[core]:x86-windows (from HEAD) -- D:\myoverlay\blaze
  * boost-assert[core]:x86-windows
  * boost-build[core]:x86-windows
  * boost-compatibility[core]:x86-windows
  * boost-config[core]:x86-windows
  * boost-container-hash[core]:x86-windows
  * boost-core[core]:x86-windows
  * boost-detail[core]:x86-windows
  * boost-exception[core]:x86-windows
  * boost-integer[core]:x86-windows
  * boost-io[core]:x86-windows
  * boost-modular-build-helper[core]:x86-windows
  * boost-move[core]:x86-windows
  * boost-preprocessor[core]:x86-windows
  * boost-smart-ptr[core]:x86-windows
  * boost-static-assert[core]:x86-windows
  * boost-throw-exception[core]:x86-windows
  * boost-tuple[core]:x86-windows
  * boost-type-traits[core]:x86-windows
  * boost-uninstall[core]:x86-windows
  * boost-utility[core]:x86-windows
  * boost-vcpkg-helpers[core]:x86-windows
  * lapack[core]:x86-windows
  * lapack-reference[blas-select,core,noblas]:x86-windows
  * openblas[core]:x86-windows
  * vcpkg-gfortran[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
Starting package 1/26: boost-uninstall:x86-windows
Building package boost-uninstall[core]:x86-windows...
[... Bill removed lines here to reduce github comment size ...]
Starting package 26/26: blaze:x86-windows
Building package blaze[core]:x86-windows from HEAD...
-- Installing port from location: D:\myoverlay\blaze
-- Downloading https://api.bitbucket.com/2.0/repositories/blaze-lib/blaze/refs/branches/master...
-- Skipping hash check for D:/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.version.
-- Downloading https://bitbucket.com/blaze-lib/blaze/get/master.tar.gz...
-- Skipping hash check for D:/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.
-- Extracting source D:/vcpkg/downloads/blaze-lib-blaze-master.tar.gz
-- Using source at D:/vcpkg/buildtrees/blaze/src/head/c3daf1f845-d874939a6b.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: D:/vcpkg/packages/blaze_x86-windows/share/blaze/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package blaze[core]:x86-windows... done
Installing package blaze[core]:x86-windows...
Installing package blaze[core]:x86-windows... done
Elapsed time for package blaze:x86-windows: 11.13 s

Total elapsed time: 3.055 min

The package blaze:x86-windows provides CMake targets:

    find_package(blaze CONFIG REQUIRED)
    target_link_libraries(main PRIVATE blaze::blaze)

Thanks you.

Thanks for posting this issue. This issue has been fixed. So I am closing this issue for now.


btc public key casting between bytes and hex encoded string

An oracle sends us a btc public key in the format of a hex encoded string. Inside the keeper methor SetBtcPublicKeyForValidator we cast it to bytes before storing in the KV store.
store.Set([]byte(types.GetBtcPublicKeyByValidatorKey(validator)), []byte(btcPk.GetBtcPublicKey()))

Similarly, in GetBtcPublicKeyByValidator we cast it back to a string.
pk, err := types.NewBtcPublicKey(string(btcPk))

I think these castings are wrong and should be tested and corrected.

This was fixed by using hex.DecodeString and hex.EncodeToString.


Provide TYPO3 Base Variant example

The Problem/Issue/Bug:
This patch adds an example on how to add a Base Variant to TYPO3 for the local ldevelopment with DDEV which is often asked for.
How this PR Solves The Problem:
Manual Testing Instructions:
Automated Testing Overview:

Related Issue Link(s):
Release/Deployment notes:

Thanks!


fix backwards compatibility

Fix backwards compatibility
Instanced functions use the new handler.  Static functions will still requre the context argument until such time as this library is integrated into both Pack and S2I

/lgtm yolo

/lgtm


[Help Wanted] UX Design Challenge - Navigating between multiple servers

Navigating between multiple servers
This ticket is a "Mattermost Open Source UX Design Challenge" we encourage you to participate in this challenge and share your expertise and ideas on how to improve Mattermost. Throughout this process you will be engaging with our community of experts in the UX Design channel on our pre-release server here, exchanging ideas in order to build something everyone is excited to use!
Goal Definition
Desired Impact
We have customers with tens of thousands of users on two separate servers. The impact of this design is to provide an updated UI for navigating between those servers with a simple, elegant and aesthetically polished experience for those users.
Goal
To examine Mattermost's existing user experience and design patterns around navigating multiple servers and propose a refinement of the design using heuristic evaluation and competitive analysis to mockup a wire-frame.
(We do not expect complete designs, wireframes and supporting material to serve as a starting point for assessing the possible solution)
Background Details
This came out of multiple discussions within the design team at Mattermost as one of the most obvious areas for improvement from an aesthetic / polish perspective.
The feature is intended for users that connect and navigate multiple servers instances, typically seen in large enterprise deployments.
Use Cases
Normally a designer would have access to product managers, user researchers, personas, use cases and other supporting materials when working, and this is not the case with this exercise.
Please assume you are the user for which the interface is targeting, and the context is using Mattermost for day-to-day communication at work.
Navigating multiple servers
Currently only visible in the desktop application when more then one server is configured.

The user will navigate between multiple configured servers through the tabs across the top of the application.

The system can generate notification jewels in the server tab for any mentions made to your user, or if the session expires in the tab that’s not in focus.

Exercise Instructions

We estimate a design should take around 4-8 hours to complete depending on your skill level.
Should you produce a better design than all other contributors in this challenge, your work may be used by the Mattermost open source project, in which case you will be credited for the design in its release announcement, and in the history of the open source project through the tickets created to implement the feature.

Fill out the Mattermost contributor level agreement here.
Sign-up for the Mattermost Community Server.
Sign-up for the Mattermost Test Server.
Download the appropriate desktop application for your operating system here.
Find the preferences for the desktop application and add both servers to the desktop application.
Understand the functionality for navigating between multiple servers
Conduct a heuristic evaluation to critique the usability and design of the current implementation.
Conduct a competitive analysis of other products to explore commonly used practices and patterns.
Mockup a wireframe of key screens for a new design that addresses the heuristic evaluation issues identified in Step 6 and 7.
Conduct a heuristic evaluation of your mockup and iterate on the design until you feel your design is a clear improvement from the original design
On the Mattermost server, go to the Design Challenge channel and make a posting with:
a. A link to this ticket
b. Your heuristic evaluation of the original design from Step 6
c. Your competitive analysis from Step 7
d. The wireframe mockups of your newly proposed design
Optional: Answer any feedback from the community on your design ideas

Once complete, please contact reach out to a UX Design core contributor in the UX Design Channel on our pre-release server here and submit your design for review.

Confirmed with @michaelgamble as completed and to be closed.


Tool to Migrate 1.0 Violations Data to 2.0

After doing a quick survey of customers about the data migration needs from 1.0 to 2.0, only the violation data has been mentioned as needed to be migrated.

Have followed up with the one user who asked for this, and there is no response. So, since 2.0 release has been out a while now, this doesn't seem to be needed.  But if anyone needs this, please feel free to re-open.