Add a Count-Min-based probabilistic relative frequency sketch

@havardpe please review. This is arguably a rather experimental addition (that is currently not wired to anything), but it could come in handy for gluing into the caching subsystem as part of a cache admission controller (or something else shiny) 😳👉👈
Adds an implementation of a probabilistic frequency sketch that allows for estimating the relative frequency of of elements from a stream of events. That is, the sketch does not capture the absolute frequency of a given element over time.
To reduce the requirement for the number of bits used for the sketch's underlying counters, this sketch uses automatic decaying of counter values once the number of recorded samples reaches a certain point (relative to the sketch's size). Decaying divides all counters by 2.
The underlying data structure is a Count-Min sketch [^0][^1] with automatic decaying of counters based on TinyLFU [^2].
This implementation has certain changes from a "textbook" CM sketch, inspired by the approach used in [^3]. In particular, instead of having d logical rows each with width w that are accessed with hash-derived indexes (and thus likely triggering d cache misses for large values of w) we subdivide into w/64 blocks each with fixed number d=4 rows of 32 4-bit counters, i.e. each block is exactly 64 bytes. Counter updates or reads always happen within the scope of a single block. We also ensure the block array is allocated with at least a 64-byte alignment. This ensures that a given sketch update will touch exactly 1 cache line of the underlying sketch buffer (not counting cache lines occupied by the sketch object itself, as we assume these are already present in the CPU cache). Similarly, comparing the frequency of two elements will always touch at most 2 cache lines.
The Count-Min sketch (and its cousin, the Counting Bloom Filter) using k counters is usually described as requiring k pairwise independent hash functions. This implementation assumes this requirement is unnecessary assuming a hash function with good entropy; we instead extract non-overlapping subsets of bits of a single 64-bit hash value and use these as indices into our data structure components.
[^0]: The Count-Min Sketch and its Applications (2003)
[^1]: https://en.wikipedia.org/wiki/Count–min_sketch
[^2]: TinyLFU: A Highly Efficient Cache Admission Policy (2015)
[^3]: Caffeine FrequencySketch

fwiw, I recently added the sketch benchmarks to CI and the results were opposite of what I recall. For some reason the previous version, which was not optimized for a single cache line, was faster in those results. I then saw the same on my laptop.
The commit introducing this said it was 2.4-2.5x faster. I haven't reverted to benchmark at that commit and see if there was a regression.
Strangely this was not only my observation of the block sketch being faster. The improvement was ported to C# (results) and Go (results).
I plan on revisiting this once Java supports a SIMD API, since that would justify optimizations that could lead to some rework. The performance difference wasn't a problem originally or now, making it mostly done for fun, due we use the sketch. If your usage is more sensitive then you might dig into it, as I'm unsure what benchmark results are accurate at the moment.

@havardpe PTAL

The summary is hard to read since it is comparing across Java versions. Instead click on the result json link above for an individual bar chart. I refer to the old version as “flat” for lack of a better term.
My guess is that it’s Java specific and maybe I broke escape analysis. To avoid data dependencies for instruction parallelism, I accumulate the results into an array, assuming the JIT will loop unroll, etc. An array is heap allocated, like all objects, but since it never escapes the method it should be optimized to the stack, etc. If that’s no longer happening then allocations add memory pressure and limit performance.
It’s really hard to rely on implicit optimizations that you cannot force explicitly, like I can by using explicit shifts instead of power-by-2 multiplication. I might have broken some delicate structure that helped the compiler realize it could apply these types of improvements, but that’s very difficult to design or test for. I’m assuming it’s my mistake and haven’t investigated yet, so it’s just an fyi of an unexpected change.

Understood, thank you very much for the heads up!
 Godbolt can be used with Java, but it only shows the JVM byte code—which is of dubious value.
The JIT giveth, and the JIT taketh away...

I took a quick glance at the benchmark and realized a subtle refactoring might explain part of it. I originally benchmarked by simply converting the FrequencySketch between the two versions for side-by-side runs. When I moved it into a longer-term commit and did later clean ups, I copied the old one into the test code, eagerly initialized its capacity, removed the initialization "if" guard checks on the methods, and had it implement a common interface (while using a proxy for Caffeine's actual version). That was enough to skew since we are talking about instruction-level parallelism, branch predictions, inlining, etc in the final output. What I should have done is kept it identical so there would be no unfair compiler advantage.
That now shows an improvement for large sketch sizes due to the single memory access. It is not as pronounced as 2x better and at smaller sizes it is still slower. So probably more when I have time to dig into it, and simply stole a little during a work meeting when my mind drifted...

Removing the count[] and index[] arrays fixed the remaining issues so at worst case the block-based has equal performance. Ideally these should have been stack allocated and easily optimized by the compiler into their individual components. The intent was to avoid data dependencies so that the loop would be independent and trivially unrolled. The Math.min is a branch-free single cycle intrinsic, so despite the stall it is easy for a compiler and OOO pipeline to optimize. For increment, manually loop unrolling (like the flat version does) added another 10M ops/s to close the gap at the smallest size and increase its lead at the largest.
I'm still confused as to why benchmarks results differ so much from my original analysis or those by independent ports. I'm probably still missing something or was foolish before, since the gains are smaller and I did try to benchmark each optimization idea. If I restore to the original commit there is only a +/- 10M ops/s difference that favors flat on small tables and block on large. That's not enough to have justified a change, nor explain why others saw it, but perhaps the older machine (M3 Max now, 2016 Intel then) caused some skew...
Anyway, sorry for the noise but it was confusing me, I saw your changes, and felt a need to sort it out.

Oh, the last remaining issue is simply the extra multiplication latency for a small table. Since its 128kb and the benchmark uses zipf distribution to mimic hot/cold cache access, this mostly stays in L1. The flat sketch does a 2 round hash and each loop does its own 3rd round for the index, whereas the block-based does a 3rd round prior to the loop to calculate all indexes. That data dependency means the cost of the multiplication in a microbenchmark is visible, whereas in the flat is parallelized so the cost is amortized to be cheaper. One could use a bitwise mixing operations instead, but this is a bit ridiculous as unrelated to visible performance and merely serves to explains the benchmark results for a small table.

Interesting! I don't have any instruction timings for the M-series CPUs, but at least on Skylake-era x64 a MUL looks like it has a 3-4 cycle latency, so although it's not much it's still time spent twiddling thumbs in the pipeline.
This implementation by default assumes that the provided hash function has poor entropy (which is more often than not the case with standard library hashes—these tend to be the identity function for integers 😬) and mixes it up with XXH3 once prior to use. Since this is a full 64-bit hash of (presumably) good entropy we have enough distinct bits to feed to both the block and counter index calculations.
Hmm, I suppose another difference between x64 and the M-series is 128-byte cache lines. A long array with unfortunate alignment risks pulling in (and for increments—updating) 2 cache lines of 128 bytes each for half the addressable blocks. But I would expect that large cache lines should affect the flat table even more...

I think 64 bytes is still the standard cache line size, but often 2-4 lines are pulled in at once if there is no MESI restrictions. The spatial prefetcher guesses that locality might avoid compulsory misses, today’s caches are large, and it’s cheaper to waste space than wait for a memory access. They try to be aggressive but also back off to avoid bandwidth saturations and false sharing problems. I’m guessing that my older 2016 intel was a lot simpler with its smaller caches so it probably made the block look better, whereas current hardware is so over provisioned that it’s harder to observe the benefits. Regardless it’s all for fun and it doesn’t matter what we do in practice, it’s already fast enough.


Use cockroach workload in deployment tutorials

Instead of the distinct workload binary.
Fixes #5359.

This change is

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/b9127bc760dc03376916d39b79a939fbfdb2b21a/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/cd6e153f50590954f98ffc90102b58e8fcec30ae/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/c1adbf6b9113803e7154d48051c7bfb9bb70f5cb/


Update 19115-3 test data

19115_3_attribute.xml

mrc:rangeElementDescription was out of order.
Some  mrc:rangeElementDescription elements were missing mrc:MI_RangeElementDescription
Removed "_" from gml ids unit_002


Question: Is React Hot Loader working for you?

If I run my server without webpack hot loading all my sliders look fine but with hot loading the tag styles are off (too big) and images aren't being constrained for the initial render. HTML is rendered server side for what that's worth.
Nudging the window size causes initialize to fire and everything snaps into place
I'll keep digging into this.

Fixed the window resize issue in version 0.6.9.
react-hot-loading is working for our demos.


Update 49-Group-Anagrams.js

File(s) Modified: 49-Group-Anagrams.js
Language(s) Used: javascript
Submission URL: _https://leetcode.com/submissions/detail/783539087/_

Sorry this solution has the same complexity as the previous one, please see the FAQs for more info.


Landing card slider

Worked on the slider component in the landing_card_slider branch.
Created a "ProductCard" component in the components folder.
Added Swiper as an external dependency.
Updated App.jsx to include the slider.

This is awesome.


boilr: run nixfmt; boilr: fix build

Description of changes
Just do some backport for time-rs
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

Looks good to me, please squash your commits into one. Unrelated, boilr is broken right now due to https://github.com/PhilipK/BoilR/issues/408

@foolnotion Upstream doesn't update for so long. We just fix ourself by partilly backport from time-rs. I do not think we should squash them into one commit because they are doing different thing.


Feat: Separate Quick Links

Describe the feature
The Quick Links section is not currently separated. Each link can be distinctly separated using vertical lines, similar to the method used in the Copyright and All Rights Reserved sections. This will enhance the clarity and visual separation of each link.
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

I would like to work on this issue. Please assign me to this issue and label it under GSSoc '24. Also, label its category as (level 1, 2, 3). I have implemented the same change in my recent project, so I could easily fix this issue.

I have made the necessary changes, Kindly merge the PR.


Alignment problem for CJK characters.

Hi,
Thanks for the great work!
However, the alignment samed to be not that good for CJK characters, even if I set { fullUnicode:true } for blessed, maybe wcwidth.js will help ?

columnify use  wcwidth.js and it works well for CJK characters:


Remove six library

This PR is to remove uses of the six library. I've replaced them with their python 3 equivalents. I've also updated setup.py
Ticket

Looks good but needs a version bump 👍

Looks good but needs a version bump 👍

Done, good catch thank you!


improve type parsing

current implementation cannot skip new line

after some type op(as, is)
some separater( , [ < : )

close in commit 73c5966e9246adf80b7a492ba10c08b606473210


#2187 - Assessment Workflow Enqueuer Scheduler Retry

Created a new scheduler that selects assessments in Queued and CancellationQueued statuses for more time than configured for the queue and readd them to their queues;
Added condition to process the assessment in StartApplicationAssessmentProcessor and CancelApplicationAssessmentProcessor to only process the assessment with the appropriate status.
Created E2E tests for the new scheduler;
Fixed E2E tests that broke with the check for the assessment status in the processors;
Increased timeout for the API tests because some tests not related to this ticket started to last longer than 60s.

Nice work @andrepestana-aot 👍Please have a look at the comments


Introduce checks for dependent PRs

When a large PR is split into smaller chain of dependent PRs or if it is common for you to have a single change that spans several other pull requests spread out across multiple projects, and if the order in which they are merged is significant, it would be nice if Quarkus bot checked that to prevent accidental merges

See: https://github.com/marketplace/dpulls

Is it really a problem in practice? I can recall a few cases but it doesn't happen that often IMO.
Anyway, it could be a good first issue.


Adding search to the database tree

OS Info: MacOs

It would speed up the usage if cmd+f would act as a search trigger and search through all the data listed.
Step by step logic

Press "Cmd+f"  -> search field is shown in the top
Typing in this field will search through: database name, table name, field names

I'm willing to look into it myself if I get some guidance on how the left side panel is rendered.

https://github.com/cweijan/vscode-mysql/issues/65#issuecomment-708371497


Add support for distance overrides

I would like to have some way to override the built-in accepted door interaction distance with a module for example.
The primary purpose would be to support game system specific concepts relating to it, such as limits of natural reach in Pathfinder 1e.
I wanted this so bad that I converted the original arms reach to do exactly that (https://gitlab.com/mkah-fvtt/pf1/arms-reach) before I learned of your module, but honestly I'd like for your module to have more generic support for such.

Hi, ty for the feedback.
Forgive me I don't know anything about Pathfinder, could you try to better describe which feature you would like to be integrated?
Would you like to have the possibility to set the distance instead of in grid of squares in units of measure such as "ft" or "mt"?
I always try to make this module as independent as possible from the system used, and eventually I add additional settings to manage the use cases of the various game systems.

More of an ability to override the distance calculation, with a hook or something.
But if you want to implement it directly: It's essentially using actor.data.data.range.melee for checking the appropriate distance at which to allow opening things, preferably with minimum distance of 1 grid cell (Math.max(5, actor.data.data.range.melee) pretty much). That variable stores its distance in feet as is normal for the system.
It doesn't need to be exact distance, but simply using that variable for determining it.
Tho I still think it's better to just provide a hook for it that a module or even the game system could fill independently (so any system could have their custom thing fairly trivially), since this would probably not work for people who use the alternative metric system.
But speaking of it, option of ignoring cell distance would be nice for people who play gridless regardless of system (which is also a by rules option for PF1).
Sorry if this doesn't clear it up sufficiently.

Hei mkahvl, i'm trying to integrate a hook for "replace" my standard calculation distance, but i encounter some issue on the developing..... here the code i have in mind:
const resultExplicitComputeDistance = Hooks.call('ReplaceArmsReachInteraction', doorData);
          // undefined|null|Nan go with the standard compute distance
          if(resultExplicitComputeDistance && typeof(resultExplicitComputeDistance) == 'number'){
            // 0 : Custom compute distance fail
            if (<number>resultExplicitComputeDistance === 0) {
              isNotNearEnough = false;
            }
            // 1 : Custom compute success
            else if (<number>resultExplicitComputeDistance === 1) {
              isNotNearEnough = true;
            }
            // 2 : If Custom compute distance fail fallback to the standard compute distance
            else if (<number>resultExplicitComputeDistance === 2) {
              // Conntinue
            }
            // x < 0 || x > 2 just fail
            else{
              isNotNearEnough = false;
            }
          }

but with the Hooks.call i retireve only a boolean did you know if there is a way to return a number like in this case ?

Add third parameter to the call that holds a return value object:
const result = { distance: 0 };
Hooks.call('ReplaceArmsReachInteraction', doorData, result);
// and then do something with `result.distance`

And then you'd hook into it something like:
Hooks.on('ReplaceArmsReachInteraction', (doorData, result) => result.distance = 5);

Add some hook for try to solve this issue

This issue is solved with version 2.0.0 . Now you can customize the module drag-ruler , here the details on the  api and the calculation distance is the same i used for door and stairways.
P.S. you can finally add the range arm based on the value on the single actor/token


Support configurable buttons [Feature request]

What is the motivation / use case for changing the behavior?
The buttonsConfig  could be made configurable so that you could add your own list of buttons. For example, I need some way of 'deleting' files and it would be really nice to have the delete button there. In the minimal form, the delete button could be one of the default ones.

Yes, this is another interesting feature.
Probably, the best solution is to use an array of css classes defined globally in your app, so also angular-modal-gallery could use their.
For instance something like ['my-custom-delete','fa-exturl','fa-download','my-custom-close'].
Where my-custom-delete and my-custom-close are custom css classes defined somewhere by user. To achieve this, I really need to rewrite the entire css using flexbox, because I need a better way to align icons and so on.
Also, I should try to remove font-awesome as a dependency and write custom svg default icons.
Mmm... 4.0.0 is becoming too big. I have to think about it. Probably, I should schedule only some features for 4.0.0 (to release it quickly at about the beginning of 2018) and release another major version in late 2018 with all other missing features.
related to #80

Same issue here #79

Completed. I'll release this feature in 5.0.0.
At the moment, I'm working on a private branch locally.
Please be patient, I'll release the first beta/alpha in one month or less.
If you want to be a beta tester, feel free to answer me here.

Awesome! I will definitely update once this is out and see how that works. On another note - have you tested your release with Angular 5? I suppose that if you are planning on maintaining this library it would be nice to have the major versions aligned with Angular.

Yes. I published angular-modal-gallery 4.x.x with the official support for Angular 5 and angular package format v4.
So, the next major with the feature requested here will be 5.x.x

This is how we add custom btn:
angularModalGalleryButtonsConfig: ButtonsConfig = {
    visible: true,
    strategy: ButtonsStrategy.CUSTOM,
    buttons: [
      {
        className: 'fa fa-star-o white',
        type: ButtonType.CUSTOM,
        ariaLabel: 'custom favorite aria label',
        title: 'Favorite',
        fontSize: '30px'
      },

But how do you handle click on it?

You are right, I forgot to add this thing to both examples and doc website.
I'll update this weekend.
You should use onBefore Hook and after hook, because a click on custom buttons executes these two methods one after the other without to do anything in the middle.


RSS entry id's are not unique for Freestyle multi-branch project

Consider the following two entries found in the rssAll feed
<entry>
<title>nctnhbaseworker/trunk #19 (stable)</title>
<link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
<id>tag:hudson.dev.java.net,2015:trunk:19</id>
<published>2015-12-22T00:02:26Z</published>
<updated>2015-12-22T00:02:26Z</updated>
</entry>

<entry>
<title>psclient/trunk #19 (1 test is still failing)</title>
<link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
<id>tag:hudson.dev.java.net,2015:trunk:19</id>
<published>2015-12-22T00:04:24Z</published>
<updated>2015-12-22T00:04:24Z</updated>
</entry>

They are for two different projects, but the <id> tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.
I think adding the project name in addition to the branch name in the id field would solve the issue.

I think this is a(nother) bug with Jenkins core not handling nested items correctly

I tested this out by creating "folderA" with freestyle project "a" inside. I also created "folderB" with freestyle project "a" inside.
XML from RSS feed is below. Confirms that Jenkins core has the issue.
<entry>
<title>folderB/a #1 (stable)</title>
<link href="http://irv-dev-pibld1:8080/job/folderB/job/a/1/" type="text/html" rel="alternate"/>
<id>tag:hudson.dev.java.net,2015:a:1</id>
<published>2015-12-28T23:42:02Z</published>
<updated>2015-12-28T23:42:02Z</updated>
</entry>
<entry>
<title>folderA/a #1 (stable)</title>
<link href="http://irv-dev-pibld1:8080/job/folderA/job/a/1/" type="text/html" rel="alternate"/>
<id>tag:hudson.dev.java.net,2015:a:1</id>
<published>2015-12-28T23:41:27Z</published>
<updated>2015-12-28T23:41:27Z</updated>
</entry>```

Moving to https://issues.jenkins-ci.org/browse/JENKINS-32232


Map disk cache

Adds a disk-based caching system for bifrost.map() calls to help reduce start up time in pipelines that are run in the same configuration multiple times.  This feature can also be turned off by setting the "NOMAPCACHE" variable to one in the user.mk file.

Coverage decreased (-0.02%) to 61.899% when pulling 90291f0dd9fb0e8f2cd45d6627259b86d7242eb1 on jaycedowell:map-disk-cache into 72e031595bf034948fce30b33e40b44f74697455 on ledatelescope:master.

Coverage decreased (-0.02%) to 61.899% when pulling 90291f0dd9fb0e8f2cd45d6627259b86d7242eb1 on jaycedowell:map-disk-cache into 72e031595bf034948fce30b33e40b44f74697455 on ledatelescope:master.

Codecov Report

Merging #132 into master will decrease coverage by <.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
- Coverage   58.78%   58.77%   -0.01%
==========================================
  Files          63       63
  Lines        5095     5097       +2
==========================================
+ Hits         2995     2996       +1
- Misses       2100     2101       +1

Impacted Files
Coverage Δ

python/bifrost/__init__.py
80% <100%> (ø)
:arrow_up:

python/bifrost/map.py
21.05% <50%> (+1.6%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72e0315...90291f0. Read the comment docs.

Oh, the "coverage" thing again.

+1 for this functionality -- as this is C++ level I would defer to others for review though

Codecov Report

Merging #132 into master will decrease coverage by 2.84%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
- Coverage   61.62%   58.77%   -2.85%
==========================================
  Files          64       63       -1
  Lines        5300     5097     -203
==========================================
- Hits         3266     2996     -270
- Misses       2034     2101      +67

Impacted Files
Coverage Δ

python/bifrost/map.py
21.05% <50.00%> (-56.04%)
:arrow_down:

python/bifrost/__init__.py
80.00% <100.00%> (-0.77%)
:arrow_down:

python/bifrost/fir.py
0.00% <0.00%> (-100.00%)
:arrow_down:

python/bifrost/blocks/scrunch.py
37.03% <0.00%> (-59.26%)
:arrow_down:

python/bifrost/linalg.py
33.33% <0.00%> (-56.15%)
:arrow_down:

python/bifrost/transpose.py
36.36% <0.00%> (-55.31%)
:arrow_down:

python/bifrost/fft.py
42.10% <0.00%> (-52.90%)
:arrow_down:

python/bifrost/fdmt.py
47.61% <0.00%> (-52.39%)
:arrow_down:

python/bifrost/reduce.py
50.00% <0.00%> (-38.89%)
:arrow_down:

... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a53b35b...2874bd7. Read the comment docs.

Codecov Report

Merging #132 (e1cea0b) into master (e1cea0b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #132   +/-   ##
=======================================
  Coverage   61.62%   61.62%
=======================================
  Files          64       64
  Lines        5300     5300
=======================================
  Hits         3266     3266
  Misses       2034     2034

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1cea0b...f6b075e. Read the comment docs.

Codecov Report

Merging #132 (f6b075e) into master (ada863e) will decrease coverage by 0.00%.
The diff coverage is 66.66%.

:exclamation: Current head f6b075e differs from pull request most recent head 609cf12. Consider uploading reports for the commit 609cf12 to get more accurate results

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
- Coverage   58.75%   58.75%   -0.01%
==========================================
  Files          64       64
  Lines        5300     5302       +2
==========================================
+ Hits         3114     3115       +1
- Misses       2186     2187       +1

Impacted Files
Coverage Δ

python/bifrost/map.py
22.00% <50.00%> (+1.16%)
:arrow_up:

python/bifrost/__init__.py
80.76% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79d93f5...609cf12. Read the comment docs.

The cache should be controllable through configure now.

I think this PR is probably ready for someone to look at it again, pending tests of whether or not this still works on a GPU.

One other thing I thought to look into… calling clear_cache in the test setUp is appropriate to reduce test dependence and ordering effects. But we should make sure testing includes the possibility of a cache hit, in case that path is (or becomes) buggy.

My original motivation for using so much clear_cache in the tests was to make sure that we didn't end up with failures due to cache hits on things used in a previous version of Bifrost.  Maybe we should only be calling it once at the start of test_map/test_transpose.

I did some testing today and fixed a few problems that I found.  Everything is now working as far as I can.  Nothing happens with regards to the cache if you compile with --disable-map-cache.  The cache gets cleared when the tests start.  The cache doesn't get cleared if you comment out the call to clear_map_cache.  When the cache clearing isn't called the tests run faster the second time.  The only outstanding issue that I know of is the fileutils.hpp/process_exists() one.  Additional testing with another version of CUDA (I used 10.1) would also be nice.

I did some testing today and fixed a few problems that I found.  Everything is now working as far as I can.  Nothing happens with regards to the cache if you compile with --disable-map-cache.  The cache gets cleared when the tests start.  The cache doesn't get cleared if you comment out the call to clear_map_cache.  When the cache clearing isn't called the tests run faster the second time.  The only outstanding issue that I know of is the fileutils.hpp/process_exists() one.  Additional testing with another version of CUDA (I used 10.1) would also be nice.

I should be able to try this PR again today, on cuda 11. I'll also start to look at one of the others, whatever is most relevant or ready: is that mmap ring space #135 ?

Cool, thanks.  I just finished going through all of my tests (again) under 10.1 and things still seem ok.
If you did want to look at another one either #135 or #167 would work.  #167 is short so it has that going for it.

Tests worked great for me on cuda11, tried with and without map cache enabled. It makes a huge difference in speed. Just out of curiosity, I messed with overwriting one of the files with random bytes and sure, it core dumped. Not surprising, and not worth detecting… just trying to push the limits, find the "robustness boundary." Then I tried editing one of the numbers in cache.version, and it seemed to hang instead of dump. (But that's with the corrupt file still there. Not sure whether that's significant. If the version doesn't match expectations, we shouldn't be trying to read one of the other files?)
If I delete the whole directory and start over, it works again of course. Then if I change cache.version without also corrupting one of the other files, it seems to replace it cleanly and keep moving. So I think that's okay.
I started to experiment with adding a fileutils.cpp in addition to the hpp but it's not ready yet, and maybe not necessary. I'm also slightly uncomfortable with dumping together a command line and calling system() in these routines, but I get it… it's definitely easier to use mkdir -p and rm -rf and *.inf than to code those things in C++ (or maybe even to find the libraries to do it).

I remember seeing an issue about machines with >1 GPU, and I'm wondering if the map cache makes that any worse… is it embedding GPU-0 architecture info. Or what if $HOME is shared across machines with different GPUs. Maybe not worth worrying about, since if something goes wrong it's a simple matter to wipe the directory and start fresh. Just thinking out loud about potential complications.

Then I tried editing one of the numbers in cache.version, and it seemed to hang instead of dump. (But that's with the corrupt file still there. Not sure whether that's significant. If the version doesn't match expectations, we shouldn't be trying to read one of the other files?)

The hang is surprising.  The cache.version should have been verified first and then the entire cache should have be dropped when the version information was wrong.

I started to experiment with adding a fileutils.cpp in addition to the hpp but it's not ready yet, and maybe not necessary. I'm also slightly uncomfortable with dumping together a command line and calling system() in these routines, but I get it… it's definitely easier to use mkdir -p and rm -rf and *.inf than to code those things in C++ (or maybe even to find the libraries to do it).

I had thought about this too.  The options are:

move to C++17 and use the new filesystem library,
stay with C++11 and use boost for their boost::filesystem library (it's what the C++17 one is based on),
use C system calls to implement mkdir/rm and globbing, or
stick with system().

I remember seeing an issue about machines with >1 GPU, and I'm wondering if the map cache makes that any worse… is it embedding GPU-0 architecture info. Or what if $HOME is shared across machines with different GPUs.

It shouldn't make things worse on multi-GPU systems but it might be problematic if those GPUs are heterogeneous.  The cache is stored as PTX which should be forward compatible.  The hitch is that when bifrost.map generates the PTX it targets the architecture of the GPU it has been requested on and then that will get saved to the disk cache.  On a mixed GPU system you could end up in a situation where you cache a function for a compute capability 75 device, save it as 75, and then try to load it/use it from a 52 device.  I don't think that works.
The alternative would be to do something like always generate the PTX for the lowest compute capability that Bifrost was compiled for if the disk cache is enabled.  That would solve my above problems, maybe with a little slowdown, but be largely unchanged in the homogeneous GPU case.

Regarding cache.version, yeah I'm not sure. It was a hard enough hang that ^C didn't do the trick, had to kill by PID. Could explore/trace more carefully if it's worrisome.
Regarding C++ filesystem: there seems to still be a lot of Ubuntu 18 out there. If there's not a C++17-supporting gcc in its regular apt sources, it might be too early to make that switch. Boost may be plausible, and especially if it wouldn't take major changes to reroute it to C++ standard stuff later on. “Hard pass” on implementing mkdir -p, rm -rf and glob on our own in C++.
Regarding GPU heterogeneity, it's likely an obscure situation. But would it be relatively easy to – rather than encode the architecture in cache.version, could you use a separate subdir per architecture/CUDA version/whatever, like $HOME/.bifrost/map_cache/ARCH-VERSION-TAG/*.ptx. Then if you end up on a different architecture, the appropriate cache would just appear to be absent, rather than existing but with the wrong arch. Does that make sense?

I don't think any of this necessarily has to hold up this branch. Could leave a TODO here or there as a reminder for things to pursue in the future or revisit if there's a relevant bug report. Or write it as a low-priority github issue with appropriate label (wish list, improvement, for future consideration, etc.)?

Your point on splitting up the cache by arch. does make sense but I'm not sure how necessary that is if we stick with PTX for the cache.  As far as I can tell PTX gets interpreted by the CUDA driver and JIT compiled to a binary when it is run.  So as long as we aren't using features in the PTX that the card cannot support it should be ok to have a flat cache.  That should be true if we always target the lowest arch. requested during the install.  Getting fancier is an option but I think how we do that is going to need some more thought about the details of compatibility and what CUDA really does with PTX files/binaries.  Maybe a "TODO" is the way to go.

Diagnosed the hang that I experienced before. After it core-dumped because I corrupted a ptx file, it left behind the .lock file. So next time when trying to open the cache, it was waiting on the lock. For whatever that's worth. I was messing around and probably got what I deserved. :)

I ran through my tests again this morning and I think I'm happy with this.  @league if you are happy with it too then I will merge it.

LGTM, ship it. 🚢


Install pass by default in image.

See docker credential store default behaviour:
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Codecov Report
Base: 33.33% // Head: 33.33% // No change to project coverage :thumbsup:

Coverage data is based on head (dc372ad) compared to base (02ad305).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   33.33%   33.33%
=======================================
  Files          52       52
  Lines        4803     4803
=======================================
  Hits         1601     1601
  Misses       3053     3053
  Partials      149      149

Flag
Coverage Δ

unittests
33.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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.


"Manifest unknown" errors pulling docker images

Describe the bug
Docker Hub has the following pages for images from this repo:

https://hub.docker.com/_/microsoft-iot-industrial-iot-auth-service
https://hub.docker.com/_/microsoft-iot-industrial-iot-users-service

The example docker pull commands on those pages all fail with a "manifest unknown" error:
To Reproduce
Steps to reproduce the behavior:

Go to (eg) https://hub.docker.com/_/microsoft-iot-industrial-iot-auth-service
Scroll down to 'Featured Tags'
Copy the example command line to pull one of the tags, eg:
docker pull mcr.microsoft.com/iot/industrial-iot-users-service:latest
Run the copied command line
Observe "manifest unknown" error

Expected behavior
Image pull succeeds, or the Docker Hub page is removed/updated to say the images are unavailable.
Desktop (please complete the following information):

OS: Windows Server 2016
Browser: Firefox
Version: 89

@rcowsill we have been cleaning up MCR a couple of months ago, to remove images which do not belong to any released version. We might need to review if the federation of some containers with dockerhub is still in place and needs to be cleaned up.
Have you seen issues with the Industrial-IoT platform deployment or functionality because of the not working URIs or are you just curious, why they are not there?

@rcwsill, correct, these images should not exist, that behavior is ok.  Having the dockerhub documentation still up is incorrect and will be fixed for the next release, tentatively July.

2.8.0 released and MCR yaml updated.


Could not find a part of the path '/home/runner/.dotnet/myapp/migrate'

I do get an issue at the end of step 3 during build process. I have checked the tutorial but cannot see any steps to create the missing folder. Have i got missed something?
Run dotnet ef migrations bundle --runtime linux-x64 -p DotNetCoreSqlDb/DotNetCoreSqlDb.csproj -o /home/runner/.dotnet/myapp/migrate   dotnet ef migrations bundle --runtime linux-x64 -p DotNetCoreSqlDb/DotNetCoreSqlDb.csproj -o /home/runner/.dotnet/myapp/migrate   shell: /usr/bin/bash -e {0}   env:     DOTNET_ROOT: /home/runner/.dotnet Build started... Build succeeded. Building bundle... System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/runner/.dotnet/myapp/migrate'.    at System.IO.FileSystem.LinkOrCopyFile(String sourceFullPath, String destFullPath)    at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)    at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite)    at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsBundleCommand.Execute(String[] args)    at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase.<>c__DisplayClass0_0.<Configure>b__0(String[] args)    at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)    at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args) Could not find a part of the path '/home/runner/.dotnet/myapp/migrate'. Error: Process completed with exit code 1.

@S-Sathi
It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!

I have the same issue

I added this step before the migration step
- name: Create missing directory
        shell: bash
        run: mkdir -p /home/runner/.dotnet/myapp

and it seems that at least the build has passed, doing now deployment

@S-Sathi
Thanks for your feedback! We will investigate and update as appropriate.

S-Sathi, visma-timo-juntunen, were you able to fix the issue?   Kindly ensure that the files are in root folder :/home/site/wwwroot


Spike:  Investigate Metabase performance issues

Description:
Metabase has been running a bit slower since we have updated to the newer version.
This ticket is to investigate the cause for the slow down and create tickets necessary to mitigate any issues that this may cause for metabase and the database.

Metabase deployment had resources request and limits set to 0, which would make it go to a BestEffort QoS class, more info here https://docs.developer.gov.bc.ca/application-resource-tuning/
During large questions, the cpu usage would spike to 100m - 200m which indicates of it being throttled, the database was not being "hit" or showed any kind of spike during large questions as metabase pulls DB data on a sync interval and caches large queries that take longer than 7seconds (will likely lower to 1 second).
OpenShift UI might not show real-time resources usage, a terminal is required to check what is being used in a semi real-time.
The following commands were ran in different namespaces to analyze usage:
oc -n [Metabase-namespace] top pods paired with oc -n [CCBC-namespace] adm top pods
By running these commands when a large question is running the spike on the CPU of metabase can be observed but no spike on the DB pods on the CCBC namespace.
Finally, metabase while booting tends to spike to 300m or more, hence the limit on non prod namespaces was set to 300m and 500m on prod. It will idle at around 10m.


Throw friendly error if next app target is not set to serverless

Fixes #194
If the next.config.js target is not set to serverless the component fails while reading

.next/serverless/pages-manifest.json

I've added simple check, following convention in other functions. May save some time ;)

Thank you 🙏


fixed typo

in line 98 it's C:\\path\\to\\icon.png while in line 115 is a reference to line 98 with C:\\path\\to\\icon. So I've added the missing .png

Docs Build status updates of commit c54d258:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TerminalDocs/command-palette.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit c54d258:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TerminalDocs/command-palette.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Thank you @boop5! You rock!

Thank you @boop5! You rock!


Set unique title for browser tabs

See the video on how it looks now.
Changes:

set unique ids for tabs (done in hammerhead)
small refactoring and code style changes

Merge it after the<EMAIL_ADDRESS>will be released.


Validate platform-specific packages

See #331.

I'm surprised that TeX Live allows installing packages which don't belong to the current platform. Maybe we can contact TeX Live to know more about the reason of this sort of flexibility.

@muzimuzhi  See texlive doc 3.2.1 Binary systems menu (Unix only):

Figure 5 displays the text mode binaries menu. By default, only the binaries for your current platform will be installed. From this menu, you can select installation of binaries for other platforms as well. This can be useful if you are sharing a TeX tree across a network of heterogeneous machines, or for a dual-boot system.

@pablgonz Thank you! Then it makes sense.


devices not adding

I setup the api key and all that in the guide, I see my project is under cloud which is different than the screen shot, i am in us and set my county code to 1, i am not seeing errors, but none of my devices are appearing whilst they are in the cloud dashboard. I am not sure what i am doing incorrectly.

this is actally an error i found ' or 'null'.
at TuyaSHOpenAPI._refreshAccessTokenIfNeed (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:46:63)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:28033) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Hi @adorabletechguy ,We have known your situation.
This problem is generally due to your Access ID and Access Key are expired, please check here.
We have also provided a hint for this in the latest version 1.2.1

Im having the exact same issue. Its not throwing any errors, but when the plug in is added I get HB supervisor and it appears to be running in service mode.
Account, passwords, access ID and keys are all correct.

Hi @adorabletechguy ,We have known your situation.
This problem is generally due to your Access ID and Access Key are expired, please check here.
We have also provided a hint for this in the latest version 1.2.1

You linked me to an issue response to check my credentials, I have checked my credentials, and I can confirm they are correct. I also created a new account to verify, and it still isn't working.

Hi @PNWOregon @adorabletechguy ,Sorry for the bad experience.
Please provide the following logs:
TuyaOpenAPI request: method = post, endpoint = , path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":86,"username":"","password":"d41d8cd98f00b204e9800998ecf8427e","schema":"tuyaSmart"}, headers = {"t":"1624614126479","client_id":"","nonce":"99a063b1-d599-11eb-8ebc-f1dcfcca1fb9","Signature-Headers":"client_id","sign":"0C22006023F121EAE5C1FB8809A5C1CCD3B101F8DA0BEB50818A4BEC93E9F30B","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
We will quickly locate the problem for you.

Hi @PNWOregon @adorabletechguy ,Sorry for the bad experience.
Please provide the following logs, like this:
TuyaOpenAPI request: method = post, endpoint = , path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":86,"username":"","password":"d41d8cd98f00b204e9800998ecf8427e","schema":"tuyaSmart"}, headers = {"t":"1624614126479","client_id":"","nonce":"99a063b1-d599-11eb-8ebc-f1dcfcca1fb9","Signature-Headers":"client_id","sign":"0C22006023F121EAE5C1FB8809A5C1CCD3B101F8DA0BEB50818A4BEC93E9F30B","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
We will quickly locate the problem for you. And we believe this is a relatively easy problem to solve.

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"","password":"","schema":"tuyaSmart"}, headers = {"t":"1624638139850","client_id":"*******************","nonce":"8330b2a0-d5d1-11eb-9d4f-013f2b056eff","Signature-Headers":"client_id","sign":"875F825388B227F2ABF377D5DB22C9CCAF71F59E3634E996D54C222BF03D2AE2","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}

TuyaOpenAPI response: {"code":2406,"msg":"skill id invalid","success":false,"t":1624640281450} path = /v1.0/iot-01/associated-users/actions/authorized-login
Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021.
Please linked devices by using Tuya Smart or Smart Life app in your cloud project.
Failed to get device information. Please check if the config.json is correct.

Any assistance?

Hi @adorabletechguy ,,Sorry for the late reply.
Recently, our team has been sorting out interface issues such as code 2406.
The same country code for Tuya SmartLife apps on different phones may correspond to different Availability zones.
Therefore, we recommend that you select all available Availability Zones in the cloud project, and we will improve the plugin login experience as soon as possible.
Hope this doc has been helpful: https://developer.tuya.com/en/docs/iot/Tuya_Homebridge_Plugin?id=Kamcldj76lhzt. Any questions, please contact us.

Hi @adorabletechguy , Please try this  https://github.com/tuya/tuya-homebridge/issues/45#issuecomment-871121395

I tried that yesterday, and a few other things. I also recreated a whole new account despite the fact that my other account is a week old.
TuyaOpenAPI response: {"code":1004,"msg":"sign invalid","success":false,"t":1625230229901} path = /v1.0/iot-01/associated-users/actions/authorized-login
Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021.
-- then a few lines below
[7/2/2021, 8:50:31 AM] [TuyaWebPlatform] Missing required id property on device configuration, received:
{
"device_type": "form"
}

i then do a restart
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"spazpasz@gmail.com","password":"3b5125607a7f34543c0cb9beffebc1d6","schema":"tuyaSmart"}, headers = {"t":"1625230342093","client_id":"v7jmxdsgapug3m8fhkc8","nonce":"5715f050-db34-11eb-8554-df7330dff46b","Signature-Headers":"client_id","sign":"72AFAB0359F50BB1F5EB7182C733A5DA9A83822175923ED4D5AD114C7945BD84","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}

Any fix for this yet? No changes with mine.

Hi @adorabletechguy @PNWOregon ,Please try again for code 1004, And check error code for code 2406.

it works,  but missing devices

it works, but missing devices

Hi @adorabletechguy , Please show the devices details log.

Hi,
I modified TUYASHOPENAPI.JS files with that:
this.tokenInfo = {
access_token: 'MY PERSONNAL ACCES TOKEN',
refresh_token: '',
uid: 'MY PERSONNAL UID',
expire:<PHONE_NUMBER>,
}
}
async _refreshAccessTokenIfNeed(path) {
if (path.startsWith('/v1.0/iot-01/associated-users/actions/authorized-login')) {
return;
}
if ((this.tokenInfo.expire - 60) * 1000 > new Date().getTime()) {
return;
}
All my credential is correct and i create a new cloud Projet tonight (after 25 may 2021).  Now this is the message on my console:
Initializing TuyaPlatform...
TuyaOpenAPI request: method = get, endpoint = https://openapi-ueaz.tuyaus.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1625802078423","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"84d29a60-e067-11eb-a68f-ab56750dda7b","Signature-Headers":"client_id","sign":"MY PERSONNAL CLIENT ID","sign_method":"HMAC-SHA256","access_token":"MY PERSONNAL ACCESS TOKEN","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
Preparing Advertiser for 'Homebridge E1A5' using ciao backend!
TuyaOpenAPI response: {"code":1010,"msg":"token is expired","success":false,"t":1625802078937} path = /v1.0/iot-01/associated-users/devices
Failed to get device information. Please check if the config.json is correct.
My JSON config is:
{
"options": {
"username"<EMAIL_ADDRESS>"password": "MY PASSWORD",
"accessId": "gMY ACCESS ID",
"accessKey": "MY ACCESS KEY",
"lang": "en",
"projectType": "2",
"appSchema": "tuyaSmart",
"endPoint": "https://openapi-ueaz.tuyaus.com",
"countryCode": 1,
"debug": true
},
"name": "TuyaPlatform",
"platform": "TuyaPlatform"
}
Any suggest???

I modified TUYASHOPENAPI.JS files with that:

Hi @rikray02 ,access_token expires every two hours And need to re-request the token. Please restore the previous code to ensure that the token you are using is not expired. expire is simply an expiration time that determines if a token is to be rerequested.

Hi Hanh94,
I have reinstalled the plugin from GitHub source files.  I reconfigure the pluggin and now, i have this message:
Initializing TuyaPlatform...
TuyaOpenAPI request: method = post, endpoint = https://openapi-ueaz.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = @.@.>","password":"e8ea5c947c5d8918d13f9404dad3a325","schema":"tuyaSmart"}, headers = {"t":"1625886265876","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"886d2630-e12b-11eb-b0d7-89309f93bae4","Signature-Headers":"client_id","sign":"02D9B4CABBCB3E31B0D15CC506FC7771996EE592FC1FF70A94854487003CEB25","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
Preparing Advertiser for 'Homebridge E1A5' using ciao backend!
And the other one
TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1625886266467} path = /v1.0/iot-01/associated-users/actions/authorized-login
Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021.
Please linked devices by using Tuya Smart or Smart Life app in your cloud project.
I really don’t understand why it’s doesn’t work because all my credentials are good.
Thanks for your help.
Richard
Le 9 juill. 2021 à 03:06, Hanh94<EMAIL_ADDRESS>a écrit :
I modified TUYASHOPENAPI.JS files with that:
Hi @rikray02https://github.com/rikray02 ,access_token expires every two hours And need to re-request the token. Please restore the previous code to ensure that the token you are using is not expired. expire is simply an expiration time that determines if a token is to be rerequested.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/tuya/tuya-homebridge/issues/41#issuecomment-876966200, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKFTTIO3MARPM5OYUF3VENLTW2NYBANCNFSM47EEXRQA.

Hi Hanh94, I have reinstalled the plugin from GitHub source files. I reconfigure the pluggin and now, i have this message: Initializing TuyaPlatform... TuyaOpenAPI request: method = post, endpoint = https://openapi-ueaz.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = @.@.>","password":"e8ea5c947c5d8918d13f9404dad3a325","schema":"tuyaSmart"}, headers = {"t":"1625886265876","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"886d2630-e12b-11eb-b0d7-89309f93bae4","Signature-Headers":"client_id","sign":"02D9B4CABBCB3E31B0D15CC506FC7771996EE592FC1FF70A94854487003CEB25","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} Preparing Advertiser for 'Homebridge E1A5' using ciao backend! And the other one TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1625886266467} path = /v1.0/iot-01/associated-users/actions/authorized-login Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021. Please linked devices by using Tuya Smart or Smart Life app in your cloud project. I really don’t understand why it’s doesn’t work because all my credentials are good. Thanks for your help. Richard Le 9 juill. 2021 à 03:06, Hanh94<EMAIL_ADDRESS>a écrit : I modified TUYASHOPENAPI.JS files with that: Hi @rikray02https://github.com/rikray02 ,access_token expires every two hours And need to re-request the token. Please restore the previous code to ensure that the token you are using is not expired. expire is simply an expiration time that determines if a token is to be rerequested. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#41 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKFTTIO3MARPM5OYUF3VENLTW2NYBANCNFSM47EEXRQA.

Hi @rikray02 ,
Please make sure your EndPoint is right, we found in your app login request log, your account should be in the US, the EndPoint should be https://openapi.tuyaus.com.
Please try again.

Hi Hanh94,
After many unsuccessful attempts, multiple tests and updates, post on the forums, finally, as you can see, tonight it finally works.  Thanks for your help.
Now, what happens after one year of TRIAL subscription?  Will i need to create a new account with an other email address or it will be possible ton renew a TRIAL subscription?
FIRST MESSAGE
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"riki_raymond@hotmail.com","password":"e8ea5c947c5d8918d13f9404dad3a325","schema":"tuyaSmart"}, headers = {"t":"1626145707739","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"75CEE5838AE3836FBBC542C827305C43E85F2B90001DA9ADFEEA35E6FE30A36D","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
Preparing Advertiser for 'Homebridge E1A5' using ciao backend!
SECOND MESSAGE
TuyaOpenAPI response: {"result":{"access_token":"6cc8680374cf1e7b9b741287d7464995","expire_time":7200,"refresh_token":"cb7d05b882c947a19d4c27aea864923a","uid":"az1617674687208pNBk1"},"success":true,"t":1626145708499} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1626145708475","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"EBEE3BACC81009552D427F3E004661DA72F87609A06DFF70778AC53706401A4B","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
TuyaOpenAPI response: {"result":{"devices":[{"active_time":1617729180,"biz_type":0,"category":"dj","create_time":1617729180,"icon":"smart/icon/ay15281362075689iOHb/6cf097bb1c19e5def187f2c9d2c66980.png","id":"50727542d8bfc0019a9c","ip":"<IP_ADDRESS>","lat":"46.84648321679609","local_key":"2a496b427c033783","lon":"-71.34424597752781","name":"34202 - V2 Rik","online":true,"owner_id":"38621992","product_id":"pu4xpsh4drb0qamb","product_name":"34202 - V2","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":790},{"code":"temp_value_v2","value":1000},{"code":"colour_data_v2","value":"{"h":0,"s":0,"v":1000}"},{"code":"scene_data_v2","value":"{"scene_num":1,"scene_units":[{"bright":0,"h":12,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":23,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":33,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":39,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":51,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":39,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":23,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"-05:00","uid":"az1617674687208pNBk1","update_time":1626115159,"uuid":"50727542d8bfc0019a9c"},{"active_time":1617675866,"biz_type":0,"category":"dj","create_time":1617651960,"icon":"smart/icon/ay15281362075689iOHb/6cf097bb1c19e5def187f2c9d2c66980.png","id":"075710082cf4328055fe","ip":"<IP_ADDRESS>","lat":"46.84648321679609","local_key":"c008e57cbb909e3e","lon":"-71.34424597752781","name":"Portiques","online":false,"owner_id":"38621992","product_id":"pu4xpsh4drb0qamb","product_name":"34202 - V2","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"bright_value_v2","value":1000},{"code":"temp_value_v2","value":1000},{"code":"colour_data_v2","value":"{"h":0,"s":750,"v":1000}"},{"code":"scene_data_v2","value":"{"scene_num":1,"scene_units":[{"bright":0,"h":358,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":14,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":35,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":48,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":62,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"-05:00","uid":"az1617674687208pNBk1","update_time":1625859090,"uuid":"075710082cf4328055fe"}],"has_more":false,"last_row_key":"E2DBF15694DB77735FAF097C9B410C8A","total":2},"success":true,"t":1626145708938} path = /v1.0/iot-01/associated-users/devices
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com/, path = /v1.0/devices/functions, params = {"device_ids":"50727542d8bfc0019a9c,075710082cf4328055fe"}, body = null, headers = {"t":"1626145708917","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"DDB2C1248D1AC17AA82AC8AAB825EB67C76E8866274C75F6C4916E981923508F","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
TuyaOpenAPI response: {"result":[{"category":"dj","devices":["50727542d8bfc0019a9c","075710082cf4328055fe"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{"range":["white","colour","scene","music"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{"min":10,"scale":0,"unit":"","max":1000,"step":1}"},{"code":"temp_value_v2","desc":"temp value v2","name":"temp value v2","type":"Integer","values":"{"min":0,"scale":0,"unit":"","max":1000,"step":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{"unit":"","min":0,"max":86400,"scale":0,"step":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"pu4xpsh4drb0qamb"}],"success":true,"t":1626145709370} path = /v1.0/devices/functions
Adding: 34202 - V2 Rik (dj / 50727542d8bfc0019a9c)
Creating New Accessory 50727542d8bfc0019a9c
Register Platform Accessory 34202 - V2 Rik
Adding: Portiques (dj / 075710082cf4328055fe)
Creating New Accessory 075710082cf4328055fe
Register Platform Accessory Portiques
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-03/open-hub/access-config, params = null, body = {"uid":"az1617674687208pNBk1","link_id":"97ec7bc0-e387-11eb-84bd-4be76a16232d","link_type":"mqtt","topics":"device","msg_encrypted_version":"1.0"}, headers = {"t":"1626145709376","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"93D8A07487B7B16B3B44EBD0F7B824BBA4F0AF240A0C08AD6A73D27CE37CBF44","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"}
TuyaOpenAPI response: {"result":{"client_id":"cloud_6eb129881f86931204bd850a07e33749","expire_time":7200,"password":"2720710e58675a1bf019bded6e4ee096","sink_topic":{"device":"cloud/token/out/{device_id}"},"source_topic":{"device":"cloud/token/in/16c7ef6f740ee6d580604babc6b01cc0"},"url":"ssl://m1.tuyaus.com:8883","username":"cloud_16c7ef6f740ee6d580604babc6b01cc0"},"success":true,"t":1626145709824} path = /v1.0/iot-03/open-hub/access-config
TuyaOpenMQ connecting: ssl://m1.tuyaus.com:8883
TuyaOpenMQ connected

Hi Hanh94,
After many unsuccessful attempts, multiple tests and updates, post on the forums, finally, as you can see, tonight it finally works. Thanks for your help.
Now, what happens after one year of TRIAL subscription? Will i need to create a new account with an other email address or it will be possible ton renew a TRIAL subscription?
FIRST MESSAGE
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"riki_raymond@hotmail.com","password":"e8ea5c947c5d8918d13f9404dad3a325","schema":"tuyaSmart"}, headers = {"t":"1626145707739","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"75CEE5838AE3836FBBC542C827305C43E85F2B90001DA9ADFEEA35E6FE30A36D","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} Preparing Advertiser for 'Homebridge E1A5' using ciao backend!
SECOND MESSAGE
TuyaOpenAPI response: {"result":{"access_token":"6cc8680374cf1e7b9b741287d7464995","expire_time":7200,"refresh_token":"cb7d05b882c947a19d4c27aea864923a","uid":"az1617674687208pNBk1"},"success":true,"t":1626145708499} path = /v1.0/iot-01/associated-users/actions/authorized-login TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1626145708475","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"EBEE3BACC81009552D427F3E004661DA72F87609A06DFF70778AC53706401A4B","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} TuyaOpenAPI response: {"result":{"devices":[{"active_time":1617729180,"biz_type":0,"category":"dj","create_time":1617729180,"icon":"smart/icon/ay15281362075689iOHb/6cf097bb1c19e5def187f2c9d2c66980.png","id":"50727542d8bfc0019a9c","ip":"<IP_ADDRESS>","lat":"46.84648321679609","local_key":"2a496b427c033783","lon":"-71.34424597752781","name":"34202 - V2 Rik","online":true,"owner_id":"38621992","product_id":"pu4xpsh4drb0qamb","product_name":"34202 - V2","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":790},{"code":"temp_value_v2","value":1000},{"code":"colour_data_v2","value":"{"h":0,"s":0,"v":1000}"},{"code":"scene_data_v2","value":"{"scene_num":1,"scene_units":[{"bright":0,"h":12,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":23,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":33,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":39,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":51,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":39,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":23,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"-05:00","uid":"az1617674687208pNBk1","update_time":1626115159,"uuid":"50727542d8bfc0019a9c"},{"active_time":1617675866,"biz_type":0,"category":"dj","create_time":1617651960,"icon":"smart/icon/ay15281362075689iOHb/6cf097bb1c19e5def187f2c9d2c66980.png","id":"075710082cf4328055fe","ip":"<IP_ADDRESS>","lat":"46.84648321679609","local_key":"c008e57cbb909e3e","lon":"-71.34424597752781","name":"Portiques","online":false,"owner_id":"38621992","product_id":"pu4xpsh4drb0qamb","product_name":"34202 - V2","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"bright_value_v2","value":1000},{"code":"temp_value_v2","value":1000},{"code":"colour_data_v2","value":"{"h":0,"s":750,"v":1000}"},{"code":"scene_data_v2","value":"{"scene_num":1,"scene_units":[{"bright":0,"h":358,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":14,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":35,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":48,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":62,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"-05:00","uid":"az1617674687208pNBk1","update_time":1625859090,"uuid":"075710082cf4328055fe"}],"has_more":false,"last_row_key":"E2DBF15694DB77735FAF097C9B410C8A","total":2},"success":true,"t":1626145708938} path = /v1.0/iot-01/associated-users/devices TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com/, path = /v1.0/devices/functions, params = {"device_ids":"50727542d8bfc0019a9c,075710082cf4328055fe"}, body = null, headers = {"t":"1626145708917","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"DDB2C1248D1AC17AA82AC8AAB825EB67C76E8866274C75F6C4916E981923508F","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} TuyaOpenAPI response: {"result":[{"category":"dj","devices":["50727542d8bfc0019a9c","075710082cf4328055fe"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{"range":["white","colour","scene","music"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{"min":10,"scale":0,"unit":"","max":1000,"step":1}"},{"code":"temp_value_v2","desc":"temp value v2","name":"temp value v2","type":"Integer","values":"{"min":0,"scale":0,"unit":"","max":1000,"step":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{"unit":"","min":0,"max":86400,"scale":0,"step":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"pu4xpsh4drb0qamb"}],"success":true,"t":1626145709370} path = /v1.0/devices/functions Adding: 34202 - V2 Rik (dj / 50727542d8bfc0019a9c) Creating New Accessory 50727542d8bfc0019a9c Register Platform Accessory 34202 - V2 Rik Adding: Portiques (dj / 075710082cf4328055fe) Creating New Accessory 075710082cf4328055fe Register Platform Accessory Portiques TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-03/open-hub/access-config, params = null, body = {"uid":"az1617674687208pNBk1","link_id":"97ec7bc0-e387-11eb-84bd-4be76a16232d","link_type":"mqtt","topics":"device","msg_encrypted_version":"1.0"}, headers = {"t":"1626145709376","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"93D8A07487B7B16B3B44EBD0F7B824BBA4F0AF240A0C08AD6A73D27CE37CBF44","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} TuyaOpenAPI response: {"result":{"client_id":"cloud_6eb129881f86931204bd850a07e33749","expire_time":7200,"password":"2720710e58675a1bf019bded6e4ee096","sink_topic":{"device":"cloud/token/out/{device_id}"},"source_topic":{"device":"cloud/token/in/16c7ef6f740ee6d580604babc6b01cc0"},"url":"ssl://m1.tuyaus.com:8883","username":"cloud_16c7ef6f740ee6d580604babc6b01cc0"},"success":true,"t":1626145709824} path = /v1.0/iot-03/open-hub/access-config TuyaOpenMQ connecting: ssl://m1.tuyaus.com:8883 TuyaOpenMQ connected

Hi @rikray02 , glad to hear that.
The login steps for the plug-in are not very complicated,
Correct username and password, non-expired accessid and key, and correct endpoint.
Of course we will optimize the configuration in config.json, such that the endpoint will no longer be manually typed, etc, and will be supported soon.
About  subscription:
After expiration, you can renew the subscription for free. The Trial Edition allows you to use all free API products but puts limits on the quota of API calls. For more information about the quota, see Pricing.

Hi Hanh94,
After many unsuccessful attempts, multiple tests and updates, post on the forums, finally, as you can see, tonight it finally works. Thanks for your help.
Now, what happens after one year of TRIAL subscription? Will i need to create a new account with an other email address or it will be possible ton renew a TRIAL subscription?
FIRST MESSAGE
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"riki_raymond@hotmail.com","password":"e8ea5c947c5d8918d13f9404dad3a325","schema":"tuyaSmart"}, headers = {"t":"1626145707739","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"75CEE5838AE3836FBBC542C827305C43E85F2B90001DA9ADFEEA35E6FE30A36D","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} Preparing Advertiser for 'Homebridge E1A5' using ciao backend!
SECOND MESSAGE
TuyaOpenAPI response: {"result":{"access_token":"6cc8680374cf1e7b9b741287d7464995","expire_time":7200,"refresh_token":"cb7d05b882c947a19d4c27aea864923a","uid":"az1617674687208pNBk1"},"success":true,"t":1626145708499} path = /v1.0/iot-01/associated-users/actions/authorized-login TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1626145708475","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"EBEE3BACC81009552D427F3E004661DA72F87609A06DFF70778AC53706401A4B","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} TuyaOpenAPI response: {"result":{"devices":[{"active_time":1617729180,"biz_type":0,"category":"dj","create_time":1617729180,"icon":"smart/icon/ay15281362075689iOHb/6cf097bb1c19e5def187f2c9d2c66980.png","id":"50727542d8bfc0019a9c","ip":"<IP_ADDRESS>","lat":"46.84648321679609","local_key":"2a496b427c033783","lon":"-71.34424597752781","name":"34202 - V2 Rik","online":true,"owner_id":"38621992","product_id":"pu4xpsh4drb0qamb","product_name":"34202 - V2","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":790},{"code":"temp_value_v2","value":1000},{"code":"colour_data_v2","value":"{"h":0,"s":0,"v":1000}"},{"code":"scene_data_v2","value":"{"scene_num":1,"scene_units":[{"bright":0,"h":12,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":23,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":33,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":39,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":51,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":39,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000},{"bright":0,"h":23,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":50,"unit_switch_duration":50,"v":1000}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"-05:00","uid":"az1617674687208pNBk1","update_time":1626115159,"uuid":"50727542d8bfc0019a9c"},{"active_time":1617675866,"biz_type":0,"category":"dj","create_time":1617651960,"icon":"smart/icon/ay15281362075689iOHb/6cf097bb1c19e5def187f2c9d2c66980.png","id":"075710082cf4328055fe","ip":"<IP_ADDRESS>","lat":"46.84648321679609","local_key":"c008e57cbb909e3e","lon":"-71.34424597752781","name":"Portiques","online":false,"owner_id":"38621992","product_id":"pu4xpsh4drb0qamb","product_name":"34202 - V2","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"bright_value_v2","value":1000},{"code":"temp_value_v2","value":1000},{"code":"colour_data_v2","value":"{"h":0,"s":750,"v":1000}"},{"code":"scene_data_v2","value":"{"scene_num":1,"scene_units":[{"bright":0,"h":358,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":14,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":35,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":48,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000},{"bright":0,"h":62,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":55,"unit_switch_duration":55,"v":1000}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"-05:00","uid":"az1617674687208pNBk1","update_time":1625859090,"uuid":"075710082cf4328055fe"}],"has_more":false,"last_row_key":"E2DBF15694DB77735FAF097C9B410C8A","total":2},"success":true,"t":1626145708938} path = /v1.0/iot-01/associated-users/devices TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com/, path = /v1.0/devices/functions, params = {"device_ids":"50727542d8bfc0019a9c,075710082cf4328055fe"}, body = null, headers = {"t":"1626145708917","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"DDB2C1248D1AC17AA82AC8AAB825EB67C76E8866274C75F6C4916E981923508F","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} TuyaOpenAPI response: {"result":[{"category":"dj","devices":["50727542d8bfc0019a9c","075710082cf4328055fe"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{"range":["white","colour","scene","music"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{"min":10,"scale":0,"unit":"","max":1000,"step":1}"},{"code":"temp_value_v2","desc":"temp value v2","name":"temp value v2","type":"Integer","values":"{"min":0,"scale":0,"unit":"","max":1000,"step":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{"unit":"","min":0,"max":86400,"scale":0,"step":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"pu4xpsh4drb0qamb"}],"success":true,"t":1626145709370} path = /v1.0/devices/functions Adding: 34202 - V2 Rik (dj / 50727542d8bfc0019a9c) Creating New Accessory 50727542d8bfc0019a9c Register Platform Accessory 34202 - V2 Rik Adding: Portiques (dj / 075710082cf4328055fe) Creating New Accessory 075710082cf4328055fe Register Platform Accessory Portiques TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com/, path = /v1.0/iot-03/open-hub/access-config, params = null, body = {"uid":"az1617674687208pNBk1","link_id":"97ec7bc0-e387-11eb-84bd-4be76a16232d","link_type":"mqtt","topics":"device","msg_encrypted_version":"1.0"}, headers = {"t":"1626145709376","client_id":"gsr393rvaqjlhzmjhrh7","nonce":"97e24290-e387-11eb-84bd-4be76a16232d","Signature-Headers":"client_id","sign":"93D8A07487B7B16B3B44EBD0F7B824BBA4F0AF240A0C08AD6A73D27CE37CBF44","sign_method":"HMAC-SHA256","access_token":"6cc8680374cf1e7b9b741287d7464995","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.2.1"} TuyaOpenAPI response: {"result":{"client_id":"cloud_6eb129881f86931204bd850a07e33749","expire_time":7200,"password":"2720710e58675a1bf019bded6e4ee096","sink_topic":{"device":"cloud/token/out/{device_id}"},"source_topic":{"device":"cloud/token/in/16c7ef6f740ee6d580604babc6b01cc0"},"url":"ssl://m1.tuyaus.com:8883","username":"cloud_16c7ef6f740ee6d580604babc6b01cc0"},"success":true,"t":1626145709824} path = /v1.0/iot-03/open-hub/access-config TuyaOpenMQ connecting: ssl://m1.tuyaus.com:8883 TuyaOpenMQ connected

Glad to hear you got it up and running! What was the trick? I haven’t time lately to tinker with mine, but I’m planning on it later this week.

Not sure what changed honestly, but it was an easy setup today without any issues. Thanks for your help @Hanh94!

it works, but missing devices

Hi @adorabletechguy , Have you solved the problem you encountered? If not, please submit the relevant log information according to the issue template format.

Hi guys, Since we haven't received your reply for a long time, we think our latest version should have solved your problem. We will close this issue first. If there is any problem, you can contact us at any time.


Demo code at https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.js - need updating?

Hi,
I am using your demo code at the above URL which seems to have stopped working.  I noticed there have been some socket.io changes in the last 12 hours - does the above need updating too?
Many thanks!

Hi, I added some extra clarification in the readme, check it out https://github.com/botfront/rasa-webchat/pull/374


FSCKFIX not being set correctly

puppet-rcs forces all options to upper case and uses upper case for its defaults.
The Upstart service that makes use of the 'FSCKFIX' option is 'mountall', however mountall expects FSCKFIX to use lowercase "yes":
mattbostock@preview-jumpbox-1:~$ grep FSCKFIX /etc/init/mountall.conf
    [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"

This means that the FSCKFIX option is not being enabled:
mattbostock@preview-jumpbox-1:~$ . /etc/default/rcS
mattbostock@preview-jumpbox-1:~$ echo $FSCKFIX
YES
mattbostock@preview-jumpbox-1:~$ [ "$FSCKFIX" = "yes" ]; echo $?
1

This is odd, since the default in /etc/default/rcS on a stock Precise or Trusty installation is to use capital letters from memory. Assuming that's the case, how did mountall ever work with this?
The quick fix would be to remove the upcase method from the ERB template, but I think it would be interesting to see why mountall fails with upcased values.

@ajlanghorn: Please go back to your holiday.

GitHub should stop emailing me when you raise an issue then :)

this suggests that you have work repos talking to your personal email account. you should stop that :)

I think it's a throwback from when this was transferred from ajlanghorn to alphagov. Who knows?!

Okay, I was wrong. I spun up a VM in Vagrant from the ubuntu/trusty64 Atlas box, and the default /etc/default/rcS uses lowercase values. PR coming up.


Bug: AsyncConfluentConsumer ignores auto_commit=False during app shutdown

Describe the bug
New Confluent implementation ignores auto_commit=False setting and commit messages even if they not suppose to be committed
How to reproduce
Include source code:
from faststream.confluent import KafkaBroker
from faststream import FastStream
broker = KafkaBroker(...)
app = FastStream(broker)

@broker.subscriber(
    "some_topic",
    group_id="some_group_id",
    auto_commit=False
)
async def consume(msg: PydanticModel) -> None:
    raise Exception

And steps to reproduce the behavior:

Push the message into kafka
Run the app. Make sure that it picks up the message and raises an Exception
Make sure that "Messages Behind" metric for group_id="some_group_id" is 1. Everything is correct so far, the message was not committed
Ctrl+C, gradually shut down the app

Expected behavior
"Messages Behind" metric for group_id="some_group_id" remains 1
Observed behavior
"Messages Behind" metric for group_id="some_group_id" become 0
Environment
Running FastStream 0.4.0 with CPython 3.11.6 on Darwin
Additional context
I believe the problem is here
https://github.com/airtai/faststream/blob/5cac95b33a8fa3bca536faa8766ffe30a3782811/faststream/confluent/client.py#L484-L487
Line 486, perform commit on close, no matter what.

@devova Thank you for reporting, we'll fix it next week.

Hello @devova,
Thanks for bringing this issue to our attention. We have fixed this issue in this PR https://github.com/airtai/faststream/pull/1208. We will make a minor release to pypi to reflect this fix.


python310Packages.dremel3dpy: 1.1.1 -> 2.0.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.dremel3dpy is: "Module for interacting with Dremel 3D printers"
meta.homepage for python310Packages.dremel3dpy is: "https://github.com/godely/dremel3dpy"
meta.changelog for python310Packages.dremel3dpy is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
Warning: a test defined in passthru.tests did not pass
found 2.0.1 with grep in /nix/store/cv5apdjxw21qhcgyn3ms5c5ck8aarnll-python3.10-dremel3dpy-2.0.1
found 2.0.1 in filename of file in /nix/store/cv5apdjxw21qhcgyn3ms5c5ck8aarnll-python3.10-dremel3dpy-2.0.1

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)

2 package rebuild(s)

2 x86_64-linux rebuild(s)
2 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
python310Packages.dremel3dpy
python39Packages.dremel3dpy

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/cv5apdjxw21qhcgyn3ms5c5ck8aarnll-python3.10-dremel3dpy-2.0.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.dremel3dpy https://github.com/r-ryantm/nixpkgs/archive/bbdee55013a38b1a135f0675f7816ebe1b74a5db.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/cv5apdjxw21qhcgyn3ms5c5ck8aarnll-python3.10-dremel3dpy-2.0.1
ls -la /nix/store/cv5apdjxw21qhcgyn3ms5c5ck8aarnll-python3.10-dremel3dpy-2.0.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

python310Packages.dremel3dpy
python39Packages.dremel3dpy

Maintainer pings
cc @fabaff for testing.

Result of nixpkgs-review pr 179407 run on x86_64-linux 1

2 packages built:

python310Packages.dremel3dpy
python39Packages.dremel3dpy


Update all redux with react examples to use React 16

Currently, all of the examples use React 15.5.  Updating to use react 16.

PR is here https://github.com/reactjs/redux/pull/2632


K8SPXC-510 Use ENV variables for images

Test name
Status

storage
failed

recreate
passed

haproxy
passed

smart-update
failed

scaling
passed

big-data
passed

init-deploy
passed

scaling-proxysql
passed

self-healing
passed

upgrade
passed

restore-to-encrypted-cluster
passed

limits
passed

monitoring
failed

upgrade-consistency
passed

self-healing-advanced
passed

demand-backup
passed

operator-self-healing
passed

security-context
passed

monitoring-2-0
passed

affinity
failed

one-pod
passed

auto-tuning
passed

scheduled-backup
failed

proxysql-sidecar-res-limits
passed

users
failed

demand-backup-encrypted-with-tls
passed

Test name
Status

smart-update
failed

scaling
passed

haproxy
passed

storage
failed

recreate
passed

big-data
passed

scaling-proxysql
passed

init-deploy
passed

self-healing
passed

upgrade
passed

restore-to-encrypted-cluster
passed

limits
passed

upgrade-consistency
passed

monitoring
failed

self-healing-advanced
passed

demand-backup
passed

operator-self-healing
passed

security-context
passed

monitoring-2-0
passed

affinity
failed

one-pod
passed

auto-tuning
passed

scheduled-backup
failed

proxysql-sidecar-res-limits
passed

users
failed

Test name
Status

haproxy
passed

init-deploy
passed

limits
passed

monitoring
failed

big-data
passed

recreate
passed

restore-to-encrypted-cluster
passed

demand-backup
passed

scheduled-backup
failed

scaling
passed

scaling-proxysql
passed

upgrade
passed

upgrade-consistency
passed

security-context
passed

smart-update
failed

storage
failed

self-healing
passed

self-healing-advanced
passed

operator-self-healing
passed

monitoring-2-0
passed

affinity
failed

one-pod
passed

auto-tuning
passed

proxysql-sidecar-res-limits
passed

users
failed

demand-backup-encrypted-with-tls
failed

Test name
Status

haproxy
passed

scaling
passed

init-deploy
passed

scaling-proxysql
passed

limits
passed

upgrade
passed

monitoring
failed

upgrade-consistency
passed

security-context
passed

big-data
passed

storage
failed

smart-update
failed

recreate
passed

restore-to-encrypted-cluster
passed

demand-backup
passed

scheduled-backup
failed

monitoring-2-0
passed

affinity
failed

self-healing
passed

self-healing-advanced
passed

operator-self-healing
passed

one-pod
passed

auto-tuning
passed

proxysql-sidecar-res-limits
passed

users
failed

Test name
Status

scaling
passed

smart-update
failed

haproxy
passed

storage
passed

recreate
passed

big-data
passed

self-healing
passed

scaling-proxysql
passed

init-deploy
passed

upgrade
failed

restore-to-encrypted-cluster
passed

limits
passed

self-healing-advanced
passed

monitoring
passed

monitoring-2-0
passed

operator-self-healing
failed

affinity
passed

demand-backup
passed

one-pod
passed

auto-tuning
passed

proxysql-sidecar-res-limits
passed

users
failed

scheduled-backup
passed

demand-backup-encrypted-with-tls
passed

Test name
Status

recreate
passed

restore-to-encrypted-cluster
passed

demand-backup
passed

scheduled-backup
passed

demand-backup-encrypted-with-tls
passed

haproxy
passed

storage
passed

init-deploy
passed

self-healing
passed

limits
passed

self-healing-advanced
passed

monitoring
passed

big-data
passed

operator-self-healing
failed

monitoring-2-0
passed

scaling
passed

affinity
passed

scaling-proxysql
passed

one-pod
passed

upgrade
failed

smart-update
failed

auto-tuning
passed

proxysql-sidecar-res-limits
passed

users
failed

Test name
Status

smart-update
failed

recreate
passed

scaling
passed

storage
passed

haproxy
passed

big-data
passed

self-healing
passed

scaling-proxysql
passed

init-deploy
passed

upgrade
passed

restore-to-encrypted-cluster
passed

limits
passed

self-healing-advanced
passed

upgrade-consistency
passed

monitoring
passed

operator-self-healing
failed

demand-backup
passed

monitoring-2-0
passed

security-context
passed

affinity
passed

one-pod
passed

auto-tuning
passed

scheduled-backup
passed

proxysql-sidecar-res-limits
passed

users
failed

demand-backup-encrypted-with-tls
failed


Monkeypatch and update pymatgen

Updates for latest version of pymatgen/matminer - (note this required some debugging of SA output, it looks like it returns a list of Nones, rather than a singular None now)
Monkeypatch the test so that MPRester uses test data loaded from a test_file.

Sorry, this was intended for the main fork, issued here accidentally.


Where to use '--rocksdb.total-write-buffer-size'  option

My Environment

ArangoDB Version:        3.4.3
Storage Engine:             RocksDB
Deployment Mode:       Cluster
Deployment Strategy:   ArangoDB Starter
Operating System:       CentOS 7

Problem:
Where to use '--rocksdb.total-write-buffer-size'  option?

It is an arangod options:
https://docs.arangodb.com/3.4/Manual/Programs/Arangod/Options.html#rocksdb-options
If you want to pass arangod options through the starter to the cluster nodes, then see the starter option documentation here:
https://docs.arangodb.com/3.4/Manual/Programs/Starter/Options.html#other-database-options

Thank you for your reply.
This options seems not be supported in Arangodb Starter. Then I choose Manual Start to startup a cluster, but there is a mistake.  Start as follows:
https://docs.arangodb.com/3.4/Manual/Deployment/Cluster/ManualStart.html
The command:

the error info:
FATAL unable to create database directory 'agent': failed to create directory 'agent': Permission denied
ps: I use root user

Hi,
please don't use screenshots for text. Use tripple-tics to blockquote it:
block

Please make sure the user has write access to the database directory of the agency.

This options seems not be supported in Arangodb Starter.

How do you come to this conclusion? Do you get an error? What exact error and what is the command/configuration you use?
The option --rocksdb.total-write-buffer-size was added in v3.4.0-rc.4 (2018-11-04).
If you see a Permission denied error then please verify that the path is actually writable. We can't diagnose nor fix your system from the outside, without an appropriate description of the environment and the things you see.

I use Arangodb starter to start the cluster, but it doesn't have the --rocksdb options in command. But I found this option can be configured in the arangod.conf file, so the problem solved.
when I start the cluster through manual start way, the Permission denied will happen. I think the path is writable, because I can create file in the path use command: mkdir.
whatever, I will use the first way to start cluster.

If you want to set arangod options through arangodb, then you must follow the description here: https://docs.arangodb.com/3.4/Manual/Programs/Starter/Options.html#other-database-options
--dbservers.<section>.<key>=<value>
Like:
--dbservers.rocksdb.total-write-buffer-size=123456789