Convert Bureau Structure to Wagtail

Convert Bureau Structure to Wagtail
Additions

Added CSS file to customize Wagtail Admin for the Bureau Structure.

Changes

Modified Jinja, Less, and python files to migrate the bureau structure page from a Sheer page to Wagtail. I left the current Sheer Page in place and just updated the necessary associated files to make it atomic.

Testing

Run gulp build
Add a Browse page via Wagtail.
Add a Bureau Structure block to the page
Verify that the page previews as expected.

Review

@cfpb/cfgov-backends
@Scotchester

Screenshots
Notes

It might make sense to use snippets at some point but it would have to more flexible then just injecting that snippet into a 25 / 75 organism

The CSS modifications to the Wagtail admin are experimental and will probably need to be adjusted.

Todos

Checklist

[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the front end playbook
[ ] Passes all existing automated tests
[ ] New functions include new tests
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged
[ ] Visually tested in supported browsers and devices
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

@richaagarwal, can you take a look at this PR.

Sure, on it!

I'll try to review this today, too.

Did a quick review locally -- one thing I noticed is that an image is required to upload, but then that image doesn't display.  Not sure how that's supposed to work.

Left a few more comments, but otherwise looks good.  I won't be around for the next 10 days so don't wait on me for final approval.  Curious what next steps are -- will the current bureau page be deleted after this is merged in and someone has created the page in Wagtail?

@sebworks Could you post a screenshot or two of what the interface for this will look like in the CMS? I'd like to get a view of what our admin users will see and verify the field labels etc. Also happy to just chat via a short demo if that's easier!

Thanks for the preview @sebworks. As promised, here are my suggested updates to the field titles:

Hah, @schaferjh you countermanded my earlier suggestion to change FROM Line 1 and Line 2 TO Title 1 and Title 2. Am I wrong about there being a situation where it isn't just for two different titles? I would not want people to view this as a formatting opportunity for people with a single title.

I would not want people to view this as a formatting opportunity for people with a single title.

Hmmmm. I was trying to minimize the duplication of Title: Title Title, but you are right that we don't want people to start writing "Assistant" and "Director" on seperate lines just for the heck of it.
How about this: Get rid of Title 1 and Title 2 outside the fields and keep the hint text inside the fields as Title 1 and Title 2. Getting rid of some visual clutter at least?

@schaferjh, A couple notes:

Wagtail blocks currently don't specifically support setting the placeholder text ( https://github.com/torchbox/wagtail/issues/2328 ), it only supports default text.  We can implement a workaround if you think it's necessary.

The Hyperlink atom doesn't support default text. We can fix this issue as well if necessary.

Updated screenshots:

I'm a little confused, please bear with me:

https://github.com/torchbox/wagtail/issues/2328 seems to refer to something that we are already able to do -- In your posted screenshots, for example, the Division lead field has a label of "Division lead" and placeholder text says "Name" -- ??

In my response to Scott above I suggested removing the field labels for two text fields and just having the placeholder text -- is that not possible? If not, then I suggest "Line 1"/"Title 1" as the label and placeholder combo for these to address Scott's concern.

Adding default text to the hyperlink was a nice to have -- no worries there. Instead could you place instructional text under that field that says "Suggested text: More information about these offices"?

Making sure I'm reading the screen shots right: you're showing me what the admin looks like first on the Office of the Director branch and then the Divisions branch? I can assume that adding an office under a division looks the same as on the Office of the Director side, yes?

torchbox/wagtail#2328 seems to refer to something that we are already able to do -- In your posted screenshots, for example, the Division lead field has a label of "Division lead" and placeholder text says "Name" -- ??

So the screenshots show a mix of default text and placeholders. It's hard to tell the difference from a screenshot. I'll just make them placeholders.

In my response to Scott above I suggested removing the field labels for two text fields and just having the placeholder text -- is that not possible? If not, then I suggest "Line 1"/"Title 1" as the label and placeholder combo for these to address Scott's concern.

Yep, there is always a way. Might not be pretty though.

Adding default text to the hyperlink was a nice to have -- no worries there. Instead could you place instructional text under that field that says "Suggested text: More information about these offices"?

There currently isn't a way to provide help text or default text for the Hyperlink atom. I'll submit a PR with a fix for that.

Making sure I'm reading the screen shots right: you're showing me what the admin looks like first on the Office of the Director branch and then the Divisions branch? I can assume that adding an office under a division looks the same as on the Office of the Director side, yes?

Yes, that is correct

Re: removing  the field labels for two text fields and just having the placeholder text --
If there's a "not pretty"/complicated way to do this, don't bother -- please use Line 1/Line 2 as labels and Title 1/Title 2 as placeholders.
Re: instructional (help) text under the hyperlink
If that's not currently possible for the hyperlink atom, let's break out that change into a seperate effort and not let it hold up this PR.
Thanks!

@schaferjh, fixed the labels and placeholder issues :

:+1:

Ok, some great improvements here since I last reviewed but I came across a few minor issues, still.
This screenshot shows me getting validation errors if Titles are not entered:

In the case of people like the Deputy Director and the Chief of Staff, no titles at all should be entered. In other positions, many people should only need one Title to be entered.
I think those fields need to both be optional all the time.

#2605 is merged. @sebworks let me know if you want me to help merge that into this PR.

@chosak, merged and migration added.


Simplify deployment of intl apps

When a Dart app, which uses the intl package, is pub-built and compiled into JavaScript, dart2js creates 80 pattern and 80 symbol JSON files under the packages/intl directory.  These 160 JSON files (2 per each existing locale whether used in the app or not) in turn must be loaded over to the server and downloaded by the clients.  Is there a way to merge these files into one file?  Is it not possible to keep the files for only the locales that the app requires.  It seems to me that internationalization could be handled much more efficiently than it currently is.
////////////////////////////////////////////////////////////////////////////////////
Editor: 1.0.0_r30798 (2013-12-02)
OS: Windows 7 - amd64 (6.1)
JVM: 1.7.0_45
projects: 7
open dart files: 0
auto-run pub: true
localhost resolves to: <IP_ADDRESS>
mem max/total/free: 1778 / 963 / 618 MB
thread count: 27
index: 1830668 relationships in 317984 keys in 1318 sources
SDK installed: true
Dartium installed: true

This issue has been moved to dart-lang/intl#32.


Microsoft promotes Logic Apps as the officially supported workflow designer - what about external content like this?

Is Designer going to be only 2013 version going forward for this activity or any other alternative way?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8fda841a-d06a-a222-ab01-60466afcd2ca
Version Independent ID: 0f8e9d94-7009-7d9f-32b7-47d24623c55c
Content: Create external content types for SQL Server in SharePoint
Content Source: docs/general-development/how-to-create-external-content-types-for-sql-server-in-sharepoint.md
Product: sharepoint
GitHub Login: @spdevdocs
Microsoft Alias: spdevdocs

SharePoint Designer 2013 was the last version of SPD. The recommended workflow solution in SharePoint is now Microsoft Flow. If you need more control, you can leverage Azure Logic Apps.


Add Documentation - How to patch

I would like to play omori on linux. How do I apply this patch?

Hey! sorry for long response I will add a documentation as soon as possible.

Awesome. even just any hint as to what patching program to use

@surrealegg any progress?

I'm really sorry for no progress at all I have been really busy IRL and I wasn't able to spend time on it

understandable. It just came up again that I would like to be able to run omori optimized on linux, and this repo looks promising but I have no clue how to use it

Yeah sorry about that. I just created a pull request for that. Here are the instructions https://github.com/surrealegg/omori-linux-patch/blob/add-documentation/README.md let me know if there's any issues


Can we update the background Image dynamically ?

Hello,
Thank you for this great package ! I am trying to update the image dynamically when I press a button.
The set state have not effect on the image ... :(
Any idea how I could achieve this ?
Thank you,
Benjamin

Hello,
Thank you for this great package ! I am trying to update the image dynamically when I press a button. The set state have not effect on the image ... :(
Any idea how I could achieve this ?
Thank you, Benjamin

I'm sorry for any inconvenience.
original version[1.0.0] couldn't change drawer background image
so I had released new update version including function of your request
check new version and have a check that image can change.
thank you :)


openapi/javascript_examples.js: Automate validation of responses and rendering of JavaScript examples in the docs.

[UPDATED]

@timabbott @showell @aero31aero Can you guys have a look ? There are some details I've added in the PR description above.

@zulipbot remove "has conflicts"

@aero31aero @timabbott @showell
I've updated the PR and added screenshots in the description.

@timabbott Can you have a look ?

For the CSS change, I think maybe the issue is the same one we had with rendered_markdown.scss which that code was copied from; see git log -p static/styles/rendered_markdown.scss.  I'd prefer to use the same solution if we can.

I get this exception trying to run test-api:
(node:16675) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'func' of undefined
    at generate_validation_data (/home/tabbott/zulip/zerver/openapi/javascript_examples.js:22:38)
    at main (/home/tabbott/zulip/zerver/openapi/javascript_examples.js:38:15)
(node:16675) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:16675) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I assume it's node version dependent, but I'm using v12.16.1, which is what our repository configures, so I don't understand it.
The create_user example looks good, but the send_message one is definitely worse than the original in a way we need to fix.  I'll post comments on the details in inline comments.

For a path forward for this PR, I'd like us to merge this PR except the create-user commit after just fixing the node errors above and cleaning up the CSS; further fixes required to make the create-user example work should be in a follow-up series (I don't want to reread the basic commits for this fresh rather than as a delta again).

Merged, thanks @akashaviator!  I'll posted in Zulip on thoughts for further improvements to this; it's great progress but I think the interface isn't quite right.


FAILURE: Build failed with an exception.

deploy to android device use command react-native run-android  found this error
who know about this problem or not?
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:preDexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDexDebug'.
> java.lang.RuntimeException: Exception while checking library jar

I'm unable to reproduce this problem. Moreover, we have automatic builds that trigger upon each commit and they are fine.

You could make sure that Git LFS is installed correctly i.e. you've run git lfs install at least once. Afterwards, please clean the source directory from any npm and gradle artifacts such as node_modules and build directories that are not part of the source repository. Then run npm install again.


nginx-ingress-controller unavailable

What kind of request is this (question/bug/enhancement/feature request):
question
Steps to reproduce (least amount of steps as possible):

run rancher using docker on port 80
go to System -> Resources  -> Workload -> nginx-ingress

Result:
Because nginx-ingress is unavailable, I can't use ingress to connect frontend and backend app, I tried to run docker on port 8080, however, chrome shows an error ERR_SSL_PROTOCOL_ERROR, how can I solve this problem?


Smooth/quality SVG scaling problem

How can I scale/zoom in a slide containing an svg without loosing quality? When I scale [scale(0.1)] the slide the vector svg image gets blurry and pixelated. How can I fix it?
THANX!

I'm not 100% sure if that will solve the issue fully, but is worth trying - don't use scales smaller than 1 (like 0.1 in your case).
When you do that your original size of SVG is made 10x smaller by the browser (and 'rendered' in this small size) - later impress.js makes is 10x bigger to properly display it. So you get this pixelated blurry image (just like you would if you try to scale up very small image).
If you use scales always bigger than 1 it means that browser scales up everything (rendering bigger than it is originally) and impress.js will scale it down to display it (to blurry pixels should be visible).
So - if in your case the smallest scale you use is 0.1 simply multiply all the scales in your presentation by 10. So scale 0.1 will become 1, 1 will become 10, etc.
I hope it helps.

Thank you for the prompt reply, I'll try it.

This is a snippet of my code:

Исходная работа

When I go to "stop2", the previous slide gets zoomed in and the "parent03.svg" gets blurry and pixelated. How can I apply your advise in this situation?

Try:

Исходная работа

(add scale 10 to the step without a scale defined - it's 1 by default, and change 0.1 to 1)

@sasha310813 I have met this problem two years ago. I have a demo http://impress.sinaapp.com/, which use SVG file. If I open it in Firefox, SVG works fine. If I use Chrome, SVG will be blurry. At that time, I found that if I turn off Use hardware acceleration when available in settings, SVG will not be blurry, but transition animation will not be smooth. I tried this method a moment ago. It doesn't take effect now.

We should document how to fix this problem, and if necessary help to push browsers forward in making SVG play nicely with CSS 3D animations.

duplicate of https://github.com/impress/impress.js/issues/198 which has more info
Thanks for the firefox tip, it's much better than chrome, though slower.

It seems later versions of firefox now work like chrome too - I tried disabling accelerated graphics and got the same result. However I've worked out a fix that works well enough for me
body {
    zoom: 2;
    transform: scale(0.5);
    transform-origin: center 0px;
}

The downside with this approach is that you lose anti-aliasing in some cases, because things are being drawn big and then zoomed out without anti-aliasing, but it does mean that when you scale in on svg's they are a bit better.

I've tried this as well - I'm trying to display SVG in a first slide (created using Snap if that makes any difference), then zoom in to another slide, and the initial SVG appears pixellated. Again, only happens in Chrome, scale transforms don't make any difference though.

I found a workaround that works for me. I don't need any 3D transformations, so I don't know how this will work if you need them.
By adding perspective: none !important; to the container (with id='impress') quality of scaled svg got fixed in my case. However maybe there will be other problems later because I haven't tested this properly yet. And yes, I think it's just a workaround and not a real solution to the problem

Is this still an issue? And is it Chromium only?


Opening large PDFs crash the app

Yeah, if you're the kind of weirdo who wants to annotate a 100MB document... good luck.
This is probably due to the limits on the length of data URIs, which the app internally uses to represent file data.

https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications#using_object_urls


Feature/1 raylib encapsulation

Codecov Report

Merging #105 (ed54868) into master (7bbb899) will decrease coverage by 0.27%.
The diff coverage is 0.00%.

:exclamation: Current head ed54868 differs from pull request most recent head 7841b17. Consider uploading reports for the commit 7841b17 to get more accurate results

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
- Coverage   22.33%   22.05%   -0.28%
==========================================
  Files          74       75       +1
  Lines        1276     1292      +16
  Branches      452      453       +1
==========================================
  Hits          285      285
- Misses        867      883      +16
  Partials      124      124

Impacted Files
Coverage Δ

src/game/User.cpp
0.00% <ø> (ø)

src/main.cpp
0.00% <0.00%> (ø)

src/raylib/model/Mesh.cpp
0.00% <0.00%> (ø)

src/raylib/model/Model.cpp
0.00% <0.00%> (ø)

src/raylib/textures/Image.cpp
0.00% <0.00%> (ø)

src/raylib/textures/Texture2D.cpp
0.00% <0.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 7bbb899...7841b17. Read the comment docs.


Github Pages - Deploy playgrounds to GH pages

[x] Setup

[x] https://llk.github.io/scratch-blocks
[ ] https://llk.github.io/scratch-blocks/playgrounds/horizontal.html
[ ] https://llk.github.io/scratch-blocks/playgrounds/vertical.html

[x] Update playgrounds to use compressed blocks or solve issue with closure-library dep.
[x] Update travis config to deploy on merge to develop

Well, i managed to do a gh-pages branch that works.
It uses Compressed Playgrounds (even the Horizontal one)
Note: the travis config was not updated in the branch
joaoh1.github.io/scratch-blocks (The Links in the page will not work because it's prepared for PR)
joaoh1.github.io/scratch-blocks/vertical.html
joaoh1.github.io/scratch-blocks/horizontal.html
I was going to make a PR for this, but there was no "gh-pages" branch.

Resolved in https://github.com/LLK/scratch-blocks/pull/755

Resolved in #755 (and fixed again in 279fb6331a3f93fb91d97885c25236b92afea823). Addendum to the previous plan, the links are:

https://llk.github.io/scratch-blocks/playgrounds/tests/vertical_playground.html
https://llk.github.io/scratch-blocks/playgrounds/tests/horizontal_playground.html


Parent nodes in tree-like recursive structure always appear as child of their children

I have the following model:
const Role = DS.Model.extend(ModelMixin, {
  name: DS.attr('string'),
  subordinates: DS.hasMany('role'),
});

As can be seen, this is a tree-like structure, where a role has many roles underneath it, and so on and so on. The subordinates of a role can be fetched differently depending on some query params to that request, hence the need to use this addon. Namely, you can pass a integer depth parameter to the request for subordinates or a role, and that number determines up to what depth down the tree to fetch subordinates.
// fetches only direct subordinates (depth = 0)
// => /role/:roleId/subordinates
role.get('subordinates')

// fetches direct subordinates and their subordinates too
// => /role/:roleId/subordinates?depth=0
role.query('subordinates', { depth: 1 })

However, I'm finding an apparently buggy behavior when using .query, not found when using .get. Assume the following tree:
CEO
    - CTO
        - Head of Software Division
        - Head of Hardware Division
    - CFO
    - ...

// Assume `rootRole` in the following code is the CEO role in the tree above
rootRole.get('subordinates')
  .then(roles => roles.get('firstObject.subordinates'))
  .then(subordinates => console.log(subordinates.mapBy('name')));
// => ["Head of Software Division", "Head of Hardware Division"]

As you would agree, the above code should print in the console the names of the roles under CTO in the tree above, that is ["Head of Software Division", "Head of Hardware Division"].
However, if I use .query instead of .get in the first line, then weirdly the CEO starts to appear as subordinate of all its subordinates:
rootRole.query('subordinates', { depth: 1 })
  .then(roles => roles.get('firstObject.subordinates'))
  .then(subordinates => console.log(subordinates.mapBy('name')));
// => ["Head of Software Division", "Head of Hardware Division", "CEO"]

I've tested this at other levels and with other roles, both in the second layer of the tree, and in deeper layers. Always all roles include their parent role in the array of subordinates. And when using .get this behavior goes away.
At this point I assume is either a misuse or misunderstanding of this addon, or a bug. Can you help me determine why is this happening?

I have more insights into this, and it's probably a problem with Ember Data without even using this add-on. I tested the above with .get instead of .query but hard-coding the api to return the relationship links with the extra query param already in place. So .get would use that URL without needing to be given the param dynamically. The result is the same as when I use .query giving iy the params dynamically. I'll try to create a small ember app to reproduce this in an isolated manner.

I ended up creating the app that reproduces the problem without using this addon. I also reported the issue in Ember Data's repository. Therefore I'm closing the issue here.


[SPARK-43085][SQL] Support column DEFAULT assignment for multi-part table names

What changes were proposed in this pull request?
This PR adds support for column DEFAULT assignment for multi-part table names.
Why are the changes needed?
Spark SQL workloads that refer to tables with multi-part names may want to use column DEFAULT functionality. This PR enables this.
Does this PR introduce any user-facing change?
Yes, column DEFAULT assignment now works with multi-part table names.
How was this patch tested?
This PR adds unit tests.

Thanks, merging to master/3.4


Many of the docker images seem to be out of sync with latest inference community version

https://github.com/huggingface/api-inference-community/blob/3ad052ea9d4ca913dd6064cbf2326a959f513e46/docker_images/espnet/requirements.txt#L1

I feel like that they should be kept up to date, esp with changes made recently to accept header usages in #287

Ping the relevant maintainers if you want.
But no, the API is not intended to be a product, so keeping up-to-date is not something we want to commit to.

Ping the relevant maintainers if you want.

I'm still not sure how to accomplish this, let alone figure out who to contact

Hi there! If you would like to upgrade the version of a specific library for a specific reason (e.g. missing params), feel free to open a PR to do the version bump


Aamp trickplay fix

Summary: Allow the removal and reattachment of Audio sources mid playback.
Type: Feature
Test Plan: Unittests, Component Tests, Aamp DASH video test stream.
Jira: RIALTO-431

Job for AI/job/AI_BUILDS/job/AI-Trigger-PullRequests started: https://pv-jen015.uk2.scp.bskyb.com/job/AI/job/AI_BUILDS/job/AI-Trigger-PullRequests/121/

https://jenkins.code.rdkcentral.com/job/github-triggered/46930/ started

https://jenkins.code.rdkcentral.com/job/build-component/86243/ started.

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/12410/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/18510/ started.

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36377/

https://jenkins.code.rdkcentral.com/job/github-triggered/46935/ started

https://jenkins.code.rdkcentral.com/job/build-component/86254/ started.

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/12416/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/18521/ started.

Job for AI/job/AI_BUILDS/job/AI-Trigger-PullRequests started: https://pv-jen015.uk2.scp.bskyb.com/job/AI/job/AI_BUILDS/job/AI-Trigger-PullRequests/123/

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36385/

Sanity tests for ['BCM Reference Refapp2'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36386/

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/12422/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/46940/ started

https://jenkins.code.rdkcentral.com/job/build-component/86261/ started.

Job for AI/job/AI_BUILDS/job/AI-Trigger-PullRequests started: https://pv-jen015.uk2.scp.bskyb.com/job/AI/job/AI_BUILDS/job/AI-Trigger-PullRequests/124/

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/18534/ started.

Sanity tests for ['BCM Reference Refapp2'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36409/

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36410/

https://jenkins.code.rdkcentral.com/job/github-triggered/46942/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/12426/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/18540/ started.

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36421/

Sanity tests for ['BCM Reference Refapp2'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36422/

https://jenkins.code.rdkcentral.com/job/github-triggered/46950/ started

https://jenkins.code.rdkcentral.com/job/build-component/86283/ started.

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/12436/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/18556/ started.

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36452/

Sanity tests for ['BCM Reference Refapp2'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36456/

https://jenkins.code.rdkcentral.com/job/github-triggered/46959/ started

Job for AI/job/AI_BUILDS/job/AI-Trigger-PullRequests started: https://pv-jen015.uk2.scp.bskyb.com/job/AI/job/AI_BUILDS/job/AI-Trigger-PullRequests/131/

https://jenkins.code.rdkcentral.com/job/build-component/86296/ started.

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/12451/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/18562/ started.

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36473/

Sanity tests for ['BCM Reference Refapp2'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/36474/


Add a color palette processor

You should be able to add a colorPalette property to any comment. If that comment contains color variables we can give templating access to these values so that you can loop over them and generate a color palette in your pattern library.

Closed by https://github.com/himedlooff/dox-ray/commit/d44081384804f9e62f5e3b24ec2a1667dd2cd75d


ModuleNotFoundError: No module named 'torch.hub'; 'torch' is not a package

hello sir, i try to install your repo and i get this error when i run your python program :
ModuleNotFoundError: No module named 'torch.hub'; 'torch' is not a package
i use this req version:
torch 1.13.0
torchaudio 0.13.0
I try to install torch 1.7.0 like your req, but error massage showed. The massage Like i can't found that version (1.7.0).
Can you help me for solve this problem sir?
thankyou sir. I really appreciate your help. :)

hello sir, i try to install your repo and i get this error when i run your python program :
ModuleNotFoundError: No module named 'torch.hub'; 'torch' is not a package
i use this req version: torch 1.13.0 torchaudio 0.13.0
I try to install torch 1.7.0 like your req, but error massage showed. The massage Like i can't found that version (1.7.0). Can you help me for solve this problem sir?
thankyou sir. I really appreciate your help. :)

solved sir, thats my bad for giving python program title torch.py XD


Develop into master (code review)

@aronasorman in case you've requested code reviews or assistance from others, feel free to assign 'em here :+1:

@benjaoming yup! I'll have to add more documentation to help reviewers, should be done by today

Pushed more changes! Still no documentation, but insantiating InMemClient and then callingclient.schedule should work. There's still a bug regarding scheduling more than 3 jobs (with a corresponding failing test for that), but otherwise basic things should work now.

Also uploaded the requirements for testing (pytest). Otherwise this should work out of the box with just the standard library.

uh oh – looks master and develop are out-of-sync

yup @indirectlylit, haven't investigated, but I'll figure it out... not sure what branch strategy @aronasorman wants, would suggest NOT having a develop branch -- see #23

There is a conflict in src/barbequeue/storage/backends/inmem.py, so something must have been changed at some point in master.
Once again: Please consider a simple branch strategy by removing the develop branch when it adds unnecessary complexity to development and maintenance of the repo.

I can merge develop into master locally w/o conflicts. Not sure what strategy Github uses.


Engine console spam being output to MA, causing it to crash when typing.

Engine console spam being output to MA, causing it to crash when typing.  This happens when nolog is true,  and i have fixed these in my own branch before by adding -logFile /dev/null for linux and -logFile NUL for windows to the start args for scpsl.

Closing because this should be fixed, please re-open if you find the latest test version available on the Discord still has this issue, the release #206 is planned to happen soon.


lint main and bin file paths

I've seen this in a few of our project's lately, so it'd be nice if the finepack tool could check if the file specified in main and bin paths are valid (something like fs.existsSync() or whatever).
For example, I think by default npm sets the main script to "index.js". In my case, the index file is set to "indexxxx.js" which doesn't exist. It'd be nice if finepack could display a warning or error.
{
  "name": "espree-test",
  "description": "",
  "version": "1.0.0",
  "author": "peter",
  "dependencies": {
    "canonical-json": "0.0.4",
    "espree": "1.11.0"
  },
  "license": "WTFPL",
  "main": "indexxxx.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}

Basically something like this (but I guess in CoffeeScript):
'use strict';

var exists = require('fs').existsSync;

var pkg = require('./package.json');

if (pkg.main) {
  checkFile(pkg.main);
}

if (pkg.bin) {
  switch (typeof pkg.bin) {
  case 'string':
    checkFile(pkg.bin);
    break;

  case 'object':
    Object.keys(pkg.bin).forEach(function (key) {
      checkFile(pkg.bin[key]);
    });
    break;
  }
}

function checkFile(file) {
  if (!exists(file)) {
    console.error('%s doesn\'t exist.', file);
  }
}

Not sure if there are other fields in package.json that may point to specific paths, but those would probably be good to lint to, if any of this is a good idea.

I put this in the backlog for the next version :-)


Neuron objects with no type attributes

When using the API no type() is returned for Neurons and many Facts do not have evidence() associated with them..
It is not clear whether this is on the db or API end.
This issue is already mentioned in #62 but I am raising it here to further channel our discussions.

@travs great observations.  Curious why PHAL is the only one with a type....?

This is something we can put into the test actually:
Try this:
import rdflib
import pprint
g = rdflib.Graph ("ZODB")
g.parse ("OpenWorm/WormData.n3")
ntype_query = "SELECT ?type ?value WHERE {?type a <http://openworm.org/entities/Neuron_type>. \
'?type <http://openworm.org/entities/SimpleProperty/value> ?value}"
ntype_r = g.query (ntype_query).result
len (ntype_r)
pprint.pprint (ntype_r)

And if I did not make a type here it should give now only "sensory" and "motor" neuron types. We also can then easily look what are the neurons with types
type_neurons_query = "SELECT ?name_value ?type_value WHERE {?type a <http://openworm.org/entities/Neuron_type>." \
              "?type <http://openworm.org/entities/SimpleProperty/value> ?type_value." \
              "?cell <http://openworm.org/entities/Neuron/type> ?type." \
              "?cell <http://openworm.org/entities/Cell/name> ?name." \
              "?name <http://openworm.org/entities/SimpleProperty/value> ?name_value."\
              "?name a <http://openworm.org/entities/Cell_name>}"
pprint.pprint (g.query (type_neurons_query).result)

Which will print next:

[(rdflib.term.Literal(u'PHAL'), rdflib.term.Literal(u'sensory')),
(rdflib.term.Literal(u'DD5'), rdflib.term.Literal(u'motor'))]

All other neurons are having empty type variable in the nodes, which are looking something like Travis showed (there are 610 of them)

I'd expect that the data is going in wrong in the first place from the database in insert_worm.py.  Looks like we need to work up tests that pull from the SQL Lite database and compare to what ends up in PyOpenWorm.  There may be some confusions on how to resolve the structure of the SQLite database that got built into this method.

I believe this is fixed as well with #82


Export Anserini (Lucene) index to Solr

We currently use Docker: https://github.com/castorini/SolrAnserini
Seems to me that using Docker isn't particularly necessary, since Solr itself is pretty easy to stand up. Would be nice to have something like this:
export_index_to_solr --solr-root /path/ -core core17 ...

Do we still need this after adding https://github.com/castorini/anserini/pull/600?

No longer needed. Closing.


add swipeFlags to enable swipe in LinearLayoutManager

Thanks! I need to see when i have time to merge and test this, but it looks good so far.


Update Play Store graphics

Graphics for Google Play.zip

The car is red : ) @colourfreak

Ignore this. Push this as it is.

Ok.


chore(SetTheory/Surreal/Multiplication): fix typos

Fix some small typos and re-wrap a few lines.

bors merge


Figure out a long term solution for building the Elm component library

Right now I'm the only owner of the Netlify team that's responsible for the component library's builds. I'm moving to Stavanger at the end of April and to add another member to the Netlify team we need to pay monthly. We should see if there's an alternative where everyone has access to it, perhaps not in Netlify.

and to add another member to the Netlify team we need to pay monthly.

also if we remove you as a member ?

One suggestion is to move the hosting to the same setup we use in AWS.

It is now moved on over to GitHub pages
https://github.com/SGFinansAS/elm-components/pull/297


fix: avoid calling assignReturnRoutes with controller as target

fixes: #6357

@zwave-js-bot automerge


Incorrect SAL annotation causing code analysis warning

[in] Context
A pointer to caller-defined context information to be passed as the Context parameter of the callback routine specified in the WorkerRoutine parameter.

WorkerRoutine is declared as:
typedef VOID
(*PFLT_DEFERRED_IO_WORKITEM_ROUTINE) (
      _in PFLT_DEFERRED_IO_WORKITEM  FltWorkItem,
      __in PFLT_CALLBACK_DATA  CallbackData,
      __in_opt PVOID  Context
      );

WorkerRoutine's Context parameter is marked as __in_opt, meaning it can be NULL, and indeed there can be cases where there is no need for any Context in WorkerRoutine. However FltQueueDeferredIoWorkItem's Context parameter is marked as in. So if the caller pass in NULL for FltQueueDeferredIoWorkItem's Context because they have no need for any Context in WorkerRoutine, code analysis would produce C6387 - '_Param_(5)' could be '0': this does not adhere to the specification for the function 'FltQueueDeferredIoWorkItem'.
Also, the SAL used for WorkerRoutine's declaration is inconsistent (_in vs __in) and do not match the actual declaration fltkernel.h (_In_, _In_opt_).

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0c68fdef-072f-0a16-60d5-c0c3c2b04c93
Version Independent ID: 5307944c-6802-a6bb-c58c-239eb0d94bdc
Content: FltQueueDeferredIoWorkItem function (fltkernel.h) - Windows drivers
Content Source: wdk-ddi-src/content/fltkernel/nf-fltkernel-fltqueuedeferredioworkitem.md
Product: windows-hardware
Technology: wdk-api-reference
GitHub Login: @lorihollasch
Microsoft Alias: loriwhip

Thanks for reporting this issue, @wmjdgla - great catch! I have fixed WorkerRoutine's SAL on this page. The engineering team has filed an internal bug about FltQueueDeferredIoWorkItem's incorrect SAL annotation - its Context parameter should indeed be In_opt like the WorkerRoutine.


fix shellcheck error

fix #8333

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: jimmycyj
If they are not already assigned, you can assign the PR to them by writing /assign @jimmycyj in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

tests/e2e/local/minikube/OWNERS
tests/e2e/local/vagrant/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

fix #8333

/assign @hklai

Nice catch! @lichuqiang
LGTM

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: hklai
If they are not already assigned, you can assign the PR to them by writing /assign @hklai in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

tests/e2e/local/minikube/OWNERS
tests/e2e/local/vagrant/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/ok-to-test

@lichuqiang: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
ce212e48b85ca739b89551e38df8c5e833426f15
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@hklai Can you pls take a look at this?

/retest

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: hklai
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

tests/e2e/local/OWNERS [hklai]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lichuqiang: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
ce212e48b85ca739b89551e38df8c5e833426f15
link
/test istio-unit-tests

prow/istio-pilot-multicluster-e2e.sh
ce212e48b85ca739b89551e38df8c5e833426f15
link
/test istio-pilot-multicluster-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Merging as the test failures are unrelated


[Rameau] Re-construct a single Genre controlled vocabularies from RAMEAU

The idea is to get a single SKOS file (encoded in Turtle) containing the useful concepts describing musical genres that come from RAMEAU.
Sources:

An excel file prepared by Frédéric containing 684 terms, see https://drive.google.com/file/d/0B5xduP7QwIkOcTlSVnVfdVR2b3c/view
An excel file prepared by Frédéric containing 288 true alignments between IAML and RAMEAU, see https://drive.google.com/file/d/0B5xduP7QwIkOLVZjZldCaTJhelE/view
The pattern to get the SKOS description of each concept is to GET 'http://data.bnf.fr/' + numerical_id + forme_retenue (lowercasing + replacing white space by _) in order to get the ARK identifier

If it can be useful, there is already a NodeJS script that i used to perform a similar task.
Briefly, it read a csv (trivial conversion of the excel files) and read the code from each line.
The code is then used for querying http://data.bnf.fr/sparql. The only difference is that in our tables the code contain a prefix FRBNF that should be removed.
EXAMPLE for the first line: FRBNF16962284 - "Acid House" - results
SELECT *
WHERE {
   ?idArk bnf-onto:FRBNF "16962284"^^xsd:integer;
    ?p ?o
}

It save the collected data as SKOS:collection (see output), but it can be adapted.

In the generated vocabulary rameau.genres.ttl, there are only 670 terms because in the excel file there are:

1 blank row;
13 genres without BNF identifier:
Bombas
Norteño (musique)
Octuors de jazz
Old time (musique)
Opéras télévisés
Pub-rock
R'n'B contemporain
Riot grrrl
Rock psychédélique
Ska-punk
Taqsim
Thayambaka
Trance

Thanks for the investigation @manoach. We will ask Frédéric to further complete the Excel sheet (provide the 13 missing ark) during this week DOREMUS meeting

@manoach have you committed the final script for the generation of rameau.genres.ttl ?
I am trying the one in the script folder (rameau-genre-script.js) but I think that it is not the last version.

@pasqLisena, yes, I did it. After running rameau-genre-script.js, the genres-rameau-post-script must be executed for rebuilding the URIs.

Ok, now I see.
We should have an agreement on the uri policy because they are not coherent:

For genres is http://data.doremus.org/vocabulary/rameau/genre/<label>
For mop is http://data.bnf.fr/ark:/12148/<ark_number>

If the dump is an exact subset of the RAMEAU dump, and if we are not adding any new statements, then we should not mint new URIs for those concepts. I would therefore keep mop like this and modify the genre thesaurus and not creating new URIs to identify existing concepts but re-use ark identifier. Between, the filename should be genre-rameau.ttl

In the alignements file there are:

1 concept from RAMEAU without BNF identifier : [Gagaku]

1 concept [Boogie-woogie] with a BNF identifier (12290265) but without ARK identifier. The SPARQL query gives no result

SELECT ?idArk
WHERE {
   ?idArk bnf-onto:FRBNF "12290265"^^xsd:integer
}

@manoach the genre-rameau vocabulary appears to have a problem. We have for all entities
http://data.bnf.fr/ark:/12148/cb11963474g a skos:Concept ;
rdfs:seeAlso http://catalogue.bnf.fr/ark:/12148/cb11963474g ;
= http://stitch.cs.vu.nl/vocabularies/rameau/ark:/12148/cb11963474g ;
while we just need a comma instead of "; = ".

http://data.bnf.fr/ark:/12148/cb11963474g a skos:Concept ;
rdfs:seeAlso http://catalogue.bnf.fr/ark:/12148/cb11963474g ;
= http://stitch.cs.vu.nl/vocabularies/rameau/ark:/12148/cb11963474g ;
while we just need a comma instead of "; = ".

The fact is that = is a short form for owl:sameAs in Turtle.

The fact is that = is a short form for owl:sameAs in Turtle.

Yeah but seems that Jena is not supporting this shortcut.
"Fail Loading files in Jena: com.hp.hpl.jena.n3.turtle.TurtleParseException: Line 18, column 5: = (owl:sameAs) not legal in Turtle"

@kgtodorov Change your turtle parser ;-)

Well, it is a trivial modification, we can do it :)
I had the same problem of Konstantin also.

Can this issue be closed now?

yes


Update to Offsets & Whatnot for ACNH 2.0?

I'm not sure if this is the correct place to mention this, but ACNH 2.0 just dropped (a day early).
I just wanted to make sure you were aware of it because I LOOOOVE ACNH Poker & am dying to use once more...in 2.0.
Thank you for all of your hard work.
It is always appreciated.
Stay shiny :D

Not so fast, speed demon.
This is a big update. It will take some time.
Please be patient.

I know. lol
I just wanted to help make sure you knew they dropped it early. lol

I can't wait I'm so excited

How's everything going 🥰 need hugs


Individual User Statistics page

We need an aggregate user statistics page so users that get an email about their downloads are given a link to view your overall statistics in ScholarSphere. We need a page to represent this views and downloads

closing this; see #1210


add navigation JavaScript API

add a static Router.go(path) method
-- rename the vaadin-router:navigate event to vaadin-router:go to match the method name.
add a vaadin-router:route-changed event

Closes #30

This change is

Reviewed 10 of 10 files at r1.
Review status: :shipit: complete! all files reviewed, all discussions resolved

Comments from Reviewable

Review status: all files reviewed, 2 unresolved discussions (waiting on @vlukashov)

demo/vaadin-router-redirect-demos.html, line 151 at r1 (raw file):

    </vaadin-demo-snippet>

      NOTE: the same effect can be acheived by dispatching a

typo: achieved

src/router.js, line 278 at r1 (raw file):

          }
          this.__removeOutletContent();
          this.__fireRouteChangedEvent(pathnameOrContext.pathname || pathnameOrContext);

BTW do we need a separate error event here?
Not a blocker to me, can be added later if needed

src/router.js, line 524 at r1 (raw file):

   */
  subscribe() {
    window.addEventListener('vaadin-router:go',

nit: now when the event is shorter, consider writing this in one line maybe?

Comments from Reviewable

Review status: 2 of 16 files reviewed, 1 unresolved discussion (waiting on @SomeoneToIgnore and @web-padawan)

demo/vaadin-router-redirect-demos.html, line 151 at r1 (raw file):
Previously, web-padawan (Sergey Kulikov) wrote…
typo: achieved

done

src/router.js, line 278 at r1 (raw file):
Previously, web-padawan (Sergey Kulikov) wrote…
BTW do we need a separate error event here?
Not a blocker to me, can be added later if needed

done

src/router.js, line 524 at r1 (raw file):
Previously, web-padawan (Sergey Kulikov) wrote…
nit: now when the event is shorter, consider writing this in one line maybe?

done

Comments from Reviewable

Bump docs then LGTM

Reviewed 14 of 14 files at r2.
Review status: :shipit: complete! all files reviewed, all discussions resolved

Comments from Reviewable

Reviewed 2 of 10 files at r1.
Review status: :shipit: complete! all files reviewed, all discussions resolved

Comments from Reviewable

Reviewed 5 of 5 files at r3.
Review status: :shipit: complete! all files reviewed, all discussions resolved

Comments from Reviewable


Python shell: typing '.' right after code completion does not trigger code completion again

From pierre.raybaut on 2009-08-30T06:22:34Z
xxx
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=14

From pierre.raybaut on 2009-08-30T07:26:11Z
Fixed in v1.0.0beta4
Status: Fixed


Adding preprocessed data type

Adding additional data type option for ObsSurface for data which is already in OpenGHG format.
Current limitations:

necessary metadata must be included in netcdf file attributes OR passed in as additional arguments in a manual way
site must already exist in our acrg_site_info.json file.

Closes #276

Codecov Report

Merging #339 (766d4b1) into devel (68d57b5) will increase coverage by 0.25%.
 Consider uploading reports for the commit d33b879 to get more accurate results

@@            Coverage Diff             @@
##            devel     #339      +/-   ##
==========================================
+ Coverage   80.29%   80.55%   +0.25%
==========================================
  Files         150      152       +2
  Lines       10550    10706     +156
==========================================
+ Hits         8471     8624     +153
- Misses       2079     2082       +3

Impacted Files
Coverage Δ

openghg/standardise/surface/_openghg.py
84.61% <84.61%> (ø)

openghg/util/_species.py
95.34% <94.11%> (-1.08%)
:arrow_down:

openghg/retrieve/_access.py
66.50% <100.00%> (-1.83%)
:arrow_down:

openghg/standardise/meta/__init__.py
100.00% <100.00%> (ø)

openghg/standardise/meta/_metadata.py
100.00% <100.00%> (ø)

openghg/standardise/surface/__init__.py
100.00% <100.00%> (ø)

openghg/types/_enum.py
100.00% <100.00%> (ø)

openghg/util/__init__.py
100.00% <100.00%> (ø)

tests/standardise/surface/test_openghg.py
100.00% <100.00%> (ø)

tests/store/test_obssurface.py
97.14% <100.00%> (+0.09%)
:arrow_up:

... and 1 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 68d57b5...d33b879. Read the comment docs.


Fix the footer in docs

Well that's the footer fix, but we now have a codecov failure 🙃

Codecov is probably unhappy about the flurry of activity.
I also have to fix my deployment, see #62 comments.

🤣 you're too fast for me @orbeckst


TLS QUIC Transport Parameter For Retry SCID

From RFC 9000#7.3, the scenario is:
Client                                                  Server

   Initial: DCID=S1, SCID=C1 ->
                                       <- Retry: DCID=C1, SCID=S2
   Initial: DCID=S2, SCID=C1 ->
                                     <- Initial: DCID=C1, SCID=S3
                                ...

The important point here is the fact that server changes SCID on its INITIAL after retry, (see Initial: DCID=C1, SCID=S3).
However, it seems the HANDSHAKE packet afterwards generated by the server does not correctly populate the quic transport parameter. In particular, the retry_source_connection_id (0x10).
That field should contain the SCID used in the RETRY packet (from the example above would be S2).
Instead, in quiche code seems that field is always populated with the SCID build for the INITIAL packet (in the example would be S3): here -today mainline commit-.

If I am not wrong, this will make all handshakes fail because of this check on the client side (which comes from the RFC9000#7.3).
The only workarounds I see (with possible drawbacks) are:

Do not perform RETRY mechanism. This makes denial of service attacks easier tho.
Do not change SCID during RETRY/INITIAL (that is having S2 == S3).

Essentially, this is what has been made in the example of this repo example/server.rs.
I am not sure if there are security implications into having S2 == S3 and whether it's fine keeping the same connection id.

Is this a known limitation or am I missing something else?

// This is a simplified and illustrative example.
impl Connection {
    fn handle_retry(&mut self, retry_packet: &RetryPacket) {
        // Store the SCID from the RETRY packet
        self.retry_source_connection_id = retry_packet.scid.clone();
    }

    fn generate_initial_packet(&self) -> InitialPacket {
        let mut initial_packet = InitialPacket::new();

        // Ensure retry_source_connection_id is set correctly
        initial_packet.retry_source_connection_id = self.retry_source_connection_id.clone();

        initial_packet
    }
}


Update gRPC dependency on 1.0.0.pre1

Previous 0.15.0 causes version inconsistency with gcloud-ruby.

Current coverage is 98.48% (diff: 100%)

Merging #36 into master will increase coverage by 0.08%

@@             master        #36   diff @@
==========================================
  Files            11         11
  Lines          1189       1189
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1170       1171     +1
+ Misses           19         18     -1
  Partials          0          0

Powered by Codecov. Last update cb11ed8...fba0ee6

LGTM


Add Thunno

I've created the Thunno Dockerfile. I accidentally made the folder name uppercase, so the other three commits are me trying to rename it to lowercase.

Please remove the .DS_Store files. You should probably add .DS_Store to your global git excludes file

@pxeger I've deleted both the .DS_Store files.


Add ability to add user name

Idea
Add ability to specify user name. So in the future user could use it instead of Me
Implementation Steps

Add optional Username field on Sign Up page

Store username in Mongo db for later usage (for that check out how storing user email works)

lemme work on this

Sure, good luck!


Better README, use a rust-toolchain.toml

Better README and a rust-toolchain.toml means avoid having to manually switch to nightly

🤷🏻♂


Add support for specifying a custom build directory

@gaearon
The Problem
I'm developing an application that already has a file named BUILD in the root of the project. On most nix systems, this would be totally fine, but OSX and Windows have case-insensitive file systems.
Since BUILD already exists, when I run yarn build it complains about the conflicting file/dir name.
The Solution
I've updated config/paths.js to optionally accept process.env.BUILD_DIR. If supplied, this will be used for the target path of the build.
If it's not supplied, everything works the same as it does now.

Is it possible to build client-side portion of the app into a subfolder? Then the problem is moot.
I don't think we'll take this unfortunately. The nice thing about CRA is it creates some convention for other tools to build on. This is only possible as long as we all agree on folder names.
I appreciate the PR though.

I support adding this feature.


Bluesun inverter ModBUS register list

Is your feature request related to a problem?
No
Describe the solution you'd like
Trying to use the integration for Bluesun hybrid inverter.  My inverter model is BSE15KH3. I would very much appreciate if somebody shared the register file. I got one from Bluesun but is very old and most of the registers are not correct. I will contribute by sharing the yaml file (after tested) so it's accessible for other users.
Describe alternatives you've considered
Waiting from Bluesun to provide correct file with ModBUS registers
edit: typo

David, where can i send you an email with the files and explanation?

You can upload it right here. 😉 Just drag and drop the file in the textbox. 😉

old file not showing all correct data, especially the battery. thought was the wrong and asked new file...
google sheets file:
https://docs.google.com/spreadsheets/d/1hLhIKdW9gyouqYl-kxwpdWvRxji5lwPeI-_4htfawfA/edit?usp=sharing
new file, not working giving error loading device
RS485_MODBUS(ESINV-33000ID) Hybrid Inverter.pdf

How does your yaml look like currently?

connection not stable. disconnecting after a while.
how can i turn on the logger and where to find it?

bluesun.txt
this is a stable working file.
need help:
with the double register values
with parsing the state registers

You cut it off (the log ends) just before it could reveal any information.

i'm using mini-pc with HA operating system. using the wifi of the pc to connect to the wifi dongle AP.
they're right next to each other.
the wifi dongle is connecting to solarman platform via router that is about 4 meters away with signal quality 98%

maybe the query time of 30sec is too often, i'll try 60 sec and see what happens

maybe the query time of 30sec is too often, I'll try 60 sec and see what happens

No, that's not it.

i was also trying modbus board with esphome connected to another comm port of the inverter trying it out.
i disconnected that device. since we got it working this way, i don't think i need that one.
let's focus and keep the connection stable.
however, i have to mention that the inverter was also disonnecting from solarman platform. i do a restart of the dongle via the webpage and it's back on.
but i'm crazy how rare is the upload interval between inverter and the solarman webpage

however, i have to mention that the inverter was also disonnecting from solarman platform. i do a restart of the dongle via the webpage and it's back on.

but i'm crazy how rare is the upload interval between inverter and the solarman webpage

That really could indicate some problems with/on your network, imo..

why am not able to connect via the dongle's lan ip address and not use the dongl AP?
anything settings that i've missed?

I really don't think you can turn web off so it looks like the stick is just unresponsive.

well what do you know. my mikrotik router had the upnp disabled by default. i presume the stick uses it to open ports and since it failed was behaving strangely.
just enabled upnp, reverted to 30sec update interval, and finally got connected through the lan ip address of the stick

well what do you know. my mikrotik router had the upnp disabled by default. i presume the stick uses it to open ports and since it failed was behaving strangely.

I don't think it should be like turning it on and off again repeatedly? But who knows...

just enabled upnp, reverted to 30sec update interval, and finally got connected through the lan ip address of the stick

Yeah it should handle even once a second updates. (5 seconds is the lowest possible w/ integrations though)

disconnected again. not a full hour working... any ideas?

Run it with enabled debug logging from the time of the restart of the stick until it stops working again. Maybe the transition will reveal something.

home-assistant (1).log

do you know why the sensors are not showing in groups?

do you know why the sensors are not showing in groups?

That's not their purpose. It's only for profile configuration. You can set update_interval and code for groups.

did a new setup with the wizard on the stick. disabled/hided the AP now no clients connecting on it.
another issue i might have is that i have a lot of switches and sensors using esp8266 and esp32 devices . i have 4 access points and about 60 wifi/lan clients. i'd say that the wifi is quite congested maybe the stick doesn't like the environment.
it's been running stable for more than 3 hours now.
by the way you have to give contact, let's see how we can cooperate

it's been running stable for more than 3 hours now.

That sounds promising!

update: very stable and working.
moving on with setting variables.
@davidrapan, need help with time addresses

√
AC charging start time 1
TimeOnAcChg1
2509
U16
2
H:0-23     M:0-59

√
AC charging end   time 1
TimeOffAcChg1
2510
U16
2
H:0-23     M:0-59

log:
2024-11-08 10:00:35.056 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139921206156672] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/time/init.py", line 37, in _async_set_value
return await entity.async_set_value(service_call.data[ATTR_TIME])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solarman/time.py", line 67, in async_set_value
await self.write(self._to_native_value(value), value.strftime(TIME_FORMAT))
File "/config/custom_components/solarman/entity.py", line 146, in write
if await self.coordinator.inverter.call(self.code, self.register, value, ACTION_ATTEMPTS_MAX) > 0 and state:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solarman/api.py", line 271, in call
response = await self.safe_read_write(code, start, arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solarman/api.py", line 166, in safe_read_write
if (response := await self.read_write(code, start, arg)) and (length := ilen(response)) and (expected := arg if code < CODE.WRITE_SINGLE_COIL else 1) and length != expected:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solarman/api.py", line 157, in read_write
return await self.write_holding_register(start, arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solarman/api.py", line 99, in write_holding_register
return await super().write_holding_register(register_addr, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5_async.py", line 376, in write_holding_register
value = await self._get_modbus_response(mb_request_frame)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5_async.py", line 271, in _get_modbus_response
modbus_values = rtu.parse_response_adu(mb_response_frame, mb_request_frame)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/umodbus/client/serial/rtu.py", line 190, in parse_response_adu
function = create_function_from_response_pdu(resp_pdu, req_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/umodbus/functions.py", line 132, in create_function_from_response_pdu
function_code = pdu_to_function_code_or_raise_error(resp_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/umodbus/functions.py", line 118, in pdu_to_function_code_or_raise_error
raise error_code_to_exception_map[error_code]
umodbus.exceptions.IllegalDataValueError:  The value contained in the request data field is not an allowable value
for the server.

debug logger:
2024-11-08 10:50:37.097 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 03 ~ 2504 - 2510 | 0x09C8 - 0x09CE # 007 ...
2024-11-08 10:50:37.098 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] SENT: a5 17 00 10 45 64 00 2a c1 78 d1 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 09 c8 00 07 86 6a d2 15
2024-11-08 10:50:37.124 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] RECD: a5 21 00 10 15 64 6a 2a c1 78 d1 02 01 70 e1 08 00 96 13 00 00 7c fd 24 67 01 03 0e 01 f4 02 58 00 46 00 5f 03 e8 00 14 04 32 65 54 45 15
2024-11-08 10:50:37.125 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 03 ~ 2504 - 2510 | 0x09C8 - 0x09CE # 007 succeeded.
2024-11-08 10:50:37.125 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 0530 - 0560 | 0x0212 - 0x0230 # 031 ...
2024-11-08 10:50:37.125 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] SENT: a5 17 00 10 45 65 00 2a c1 78 d1 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 02 12 00 1f 10 7f ce 15
2024-11-08 10:50:37.167 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] RECD: a5 51 00 10 15 65 6b 2a c1 78 d1 02 01 70 e1 08 00 96 13 00 00 7c fd 24 67 01 04 3e 00 05 00 00 00 f4 ff ff ff dc 00 00 00 d5 ff ff fe 43 00 00 01 ee 00 00 01 75 00 00 02 5e 00 00 01 3e 00 00 05 13 00 00 01 60 00 00 05 42 00 00 15 d3 11 b3 01 1e 05 a8 13 63 02 ea 10 2b bb 5a 9a 15
2024-11-08 10:50:37.168 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 0530 - 0560 | 0x0212 - 0x0230 # 031 succeeded.
2024-11-08 10:50:37.168 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 1007 - 1007 | 0x03EF - 0x03EF # 001 ...
2024-11-08 10:50:37.168 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] SENT: a5 17 00 10 45 66 00 2a c1 78 d1 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 03 ef 00 01 00 7b 7b 15
2024-11-08 10:50:37.198 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] RECD: a5 15 00 10 15 66 6c 2a c1 78 d1 02 01 70 e1 08 00 96 13 00 00 7c fd 24 67 01 04 02 00 7c b8 d1 55 15
2024-11-08 10:50:37.198 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 1007 - 1007 | 0x03EF - 0x03EF # 001 succeeded.
2024-11-08 10:50:37.199 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 2002 - 2014 | 0x07D2 - 0x07DE # 013 ...
2024-11-08 10:50:37.199 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] SENT: a5 17 00 10 45 67 00 2a c1 78 d1 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 07 d2 00 0d 90 82 06 15
2024-11-08 10:50:37.229 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] RECD: a5 2d 00 10 15 67 6d 2a c1 78 d1 02 01 70 e1 08 00 96 13 00 00 7c fd 24 67 01 04 1a 00 26 00 64 0c 8c fa a7 0c 84 ff ff ee da 00 7f 00 0f 00 00 05 49 00 00 06 1e 40 3d 18 15
2024-11-08 10:50:37.230 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 2002 - 2014 | 0x07D2 - 0x07DE # 013 succeeded.
2024-11-08 10:50:37.230 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 2500 - 2514 | 0x09C4 - 0x09D2 # 015 ...
2024-11-08 10:50:37.230 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] SENT: a5 17 00 10 45 68 00 2a c1 78 d1 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 09 c4 00 0f f2 6f 4c 15
2024-11-08 10:50:37.261 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] RECD: a5 31 00 10 15 68 6e 2a c1 78 d1 02 01 70 e1 08 00 96 13 00 00 7c fd 24 67 01 04 1e 00 03 00 00 00 00 00 00 00 00 00 02 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 78 12 96 b5 15
2024-11-08 10:50:37.261 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Querying 04 ~ 2500 - 2514 | 0x09C4 - 0x09D2 # 015 succeeded.
2024-11-08 10:50:37.262 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Returning 27 new values to the Coordinator. [Previous State: Connected (1)]
2024-11-08 10:50:37.262 DEBUG (MainThread) [custom_components.solarman.coordinator] Finished fetching Bluesun data in 0.166 seconds (success: True)
2024-11-08 10:50:37.275 DEBUG (MainThread) [custom_components.solarman.time] SolarmanTimeEntity.native_value of Bluesun 4 AC Charge Time 1 Finish: ValueError: unconverted data remains: 4
2024-11-08 10:50:42.096 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Scheduling 0 query requests. #260
2024-11-08 10:50:42.096 DEBUG (MainThread) [custom_components.solarman.coordinator] Finished fetching Bluesun data in 0.001 seconds (success: True)
2024-11-08 10:50:42.100 DEBUG (MainThread) [custom_components.solarman.time] SolarmanTimeEntity.native_value of Bluesun 4 AC Charge Time 1 Finish: ValueError: unconverted data remains: 4
2024-11-08 10:50:47.096 DEBUG (MainThread) [custom_components.solarman.api] [3514351914] Scheduling 0 query requests. #265

more loggin:
2024-11-08 11:23:34.466 DEBUG (MainThread) [custom_components.solarman.time] SolarmanTimeEntity.native_value of Bluesun 3 AC Charge Time 1 Start: ValueError: time data '\x00\x14' does not match format '%H:%M'

i tried to set 01:50
when i set this time in solarman platform, reading any value in the H place higher than 0 gives incorrect value

Set it to 01:50 in the Solarman App and then read the register using built-in action in Developer tools >> ACTIONS >> Solarman: Read Holding Registers (Modbus Function Code 3) and show me the result.

more loggin:
2024-11-08 11:23:34.466 DEBUG (MainThread) [custom_components.solarman.time] SolarmanTimeEntity.native_value of Bluesun 3 AC Charge Time 1 Start: ValueError: time data '\x00\x14' does not match format '%H:%M'

check above post:
more loggin:
2024-11-08 11:23:34.466 DEBUG (MainThread) [custom_components.solarman.time] SolarmanTimeEntity.native_value of Bluesun 3 AC Charge Time 1 Start: ValueError: time data '\x00\x14' does not match format '%H:%M'

I did, do what I asked in previous post please.

No.

Set it in Solarman App to 23:59 and read again.

response:
"2509": 5947

I'm not sure how is the value encoded in the register...

is it possible to be a string in the format: H:xxM:xx  ?

can we at least try to give it command to start charging and leave the times set on solarman ?
how to arrange this:

It could have been just a switch but sure.

https://github.com/davidrapan/ha-solarman/issues/252#issuecomment-2464836229
your opinion?

i think is more important to find out how to control the inverter.
last night inverter didn't charge even though i didn't touch these values. these values were set on solarman.
however, i created an automation to set charging power and SoC based on sun availability. not to charge the batteries max if there will be generation from solar.
no mater what i did on solarman, the inverter wouldn't go into charging the batteries. a while ago i came across registers: 206:207
but these are even more complicated for me to solve.

Run function enable | FuncEn | 206-207 | U32 | 4 | Run function enable
-- | -- | -- | -- | -- | --

B0:switch machine
--
B1:Soft start enable
B2:Power soft
B3:EPS Mode enable
B4:Timing AC charge enable
B5:Timing  charge enable
B6:Timing discharge enable
B7:JET simulating test
B8:DRMS enable
B9:ripple control
B10: Grid high voltage drop
B11: Grid Low Voltage Rise
B12: Grid over-frequency and load reduction
B13: Grid under-frequency load increase
B14:HVRT
B15:LVRT
B16:Timing Forbid discharge enable
B17: other17
B18:other18
B19:other19
B20:DisselGenFunction
B21:DieselWorkMode
B22:other22
B23:EcoEn
B24~B31 Reseved

can you please help with formatting switches for all of these options?

been reading for hours about parsing time from modbus rtu...
i found this regarding date:
https://stackoverflow.com/questions/20018623/hex-decimal-to-date-and-time-from-modbus
any hints on direction to solution?

can you please help with formatting switches for all of these options?

What do you mean? you just do platform: select do the lookup table using bit: {index} instead of key.

in this case to have an on/off switch for every option i need to configure a different switch for all of them?
sorry but i'm just a hobby programmer, i need an example to see the syntax and then adopt.

i found this, but as i said before - is way above my abilities...
Reading individual bits from a 16-bit register
Some manufacturers use 16-bit registers to store individual boolean values (bits), so with a single read from a single address, 16 booleans could be retrieved. This is sometimes called a flag register.
You need to read the register as an integer, and then extract the bit you are interested in. For example to extract the third bit from right:
registervalue = instrument.read_register(4143)
is_my_bit_set = (registervalue & 0b0000000000000100) > 0
or if using hexadecimal numbers in your code instead:
is_my_bit_set = (registervalue & 0x0004) > 0
More information on bit manipulation in Python, see the “Single bits” section of https://wiki.python.org/moin/BitManipulation

You could do it using switches, yes.
But if you want maybe I could try to extend select platform to be able to set multiple bits (if you really need that).

You could do it using switches, yes. (Switch platform do support set of individual bits)
But if you want maybe I could try to extend select platform to be able to set multiple bits. (If you really need that)

yes, please.
i need functions under registers 206-207.
especially these functions:
B4:Timing AC charge enable
B5:Timing charge enable
B6:Timing discharge enable
and also for me is a must have the timing.
the issue where we don't know how the time is coded.
i have written to the chinese also, let's see what they come up with as answer.
i use these functions to control the charging/discharging based on weather forecast.
how much and when to charge the batteries from low/night tariff.
based on cloud/sun percentage we set charging between 50 to 100%.
it contributes to fully utilizing sun energy, when there is no sun - we need the batteries fully charged at night to decrease electricity cost

got a reply from the tech support.
he said to parse the 2 bytes separately.
if 1458 is parsed together will give 3642, separately should give the right values
14 58=OE 3A

Okay I will try to implement it.

@davidrapan how is the implementation coming along?

Time parsing
feat: Time platform dec/hex parsing/displaying
Add to the entity description:
dec: 0x100

can you please provide an example of the code/syntax?

It will look exactly the same as in:
https://github.com/davidrapan/ha-solarman/blob/60a95b402ed59eb82eca1acd024d9c63084a014f/custom_components/solarman/inverter_definitions/deye_sg04lp3.yaml#L1801
And you only add:
platform: select

Time parsing
feat: Time platform dec/hex parsing/displaying
Add to the entity description:
dec: 0x100

Thank you for your work.
however, still not reading the time correctly.
this is the code:
- name: AC Charge Time1 End
platform: time
rule: 9
dec: 0x100
registers: [2510]
code:
read: 0x03
time is: 05:30
it reads as: 13:10

And did you updated the code (manually cause there is no new version yet) and restarted HA?

nope, sorry - didn't restart.
restarted, time reading correctly.
not writing. response in logs
home-assistant_2024-11-19T08-52-24.172Z.log

And what time you were trying to set?

You can try latest commit.

You can try latest commit.

damn, it worked!!!
your Brilliant!!!
thank you so much
the only thing remaining is to set the 206, 207 registers and working modes.
i posted a code above, please correct it however you see fit.
after this, the file will be complete with all functions and i will share all the sensors and configuration so you can include it in the repository

Code you showed above should work, what seems to be the issue then?

inverter turned off, looks like it turned off Bit 0

as i said during the post with the code: inverter turned off, looks like it turned off Bit 0
it didn't control function assigned to B4, but under B0. it turned off the whole inverter

Yes because it will set only bit 4. It's not currently able to turn on and off single bit.

Yes because it will set only bit 4. It's not currently able to turn on and off single bit.
I'll add support for declaring multiple bits and it should be doable after.

Please let me know when this will be possible.
I'll keep an eye on your repository.
In the meanwhile, i can post my file so you can share it and finally include BlueSun on supported inverter list

bluesun.txt
enjoy

So w/ that commit you can do something like this:
  - name: Work Mode
    platform: select
    registers: [206, 207]
    code:
      read: 0x03
    rule: 1
    lookup:
      - key: 0
        value: "Off"
      - bit: 0
        value: "On"
      - bit: [0, 4]
        value: "Grid Charging"

When I wanted to add your profile to the repository, I found that this device uses exactly the same registries as afore_hybrid.yaml, so I would rather recommend you switch to it and if you are missing any entities there, we can of course add them!

feat: Extended Afore Hybrid profile

feat: Extended Afore Hybrid profile

even though there seem to be similarities, the today losses section has nothing similar. all registers point to something totally different

when i used measurement, the energy dashboard was giving weird total at the 23:00-24:00. with this "use" the issue is gone. idk why is this, but this works

Maybe because you used incorrectly Today/Daily Production/Battery Charge/Discharge instead of Total. But trust me I'm 100% sure that state_class: "total" is wrong.

even though there seem to be similarities, the today losses section has nothing similar. all registers point to something totally different

No. It's all the same. It points to registers which you don't even have in your file or to registers with just single register instead of two.

edit: checking other registers. the hexadecimal addresses don't help. yap, definitely many differences.
however, i will try the on/off solution for the functions

It is exactly the same. I checked every single register.

It is exactly the same. I checked every single entity description. If you don't agree let's see give me an example of single entity which does not corelate.
Just load it with that file, and you will see. 😉

how is this custom sensor??
  - name: Today Losses
    friendly_name: Today's Losses
    description: Includes today's consumption of the inverter device itself as well AC/DC conversion losses
    class: "energy"
    state_class: "total_increasing"
    ensure_increasing:
    uom: "kWh"
    rule: 1
    digits: 1
    scale: 0.1
    registers: [0x03EB, 0x03EF, 0x03EE, 0x07DA, 0x03EA, 0x03EC, 0x07D9]
    uint: enforce
    sensors:
      - registers: [0x03EB]
      - registers: [0x03EF, 0x03EE]
      - registers: [0x07DA]
      - operator: subtract
        registers: [0x03EA]
      - operator: subtract
        registers: [0x03EC]
      - operator: subtract
        registers: [0x07D9]

registers
hex           decimal
0x03EB     1003
0x03EF     1007
0x03EE     1006
0x07DA    2010
0x03EA     1002
0x03EC     1004
0x07D9    2009
check excel for registers.
am i understanding this so badly?

Custom sensor it is because it uses multiple registers from inverter and does calculation over them, you can read more about it in this repo wiki.
Why you are checking entity which is not even in your file? I don't understand. Check registers which are in both files.

i understand, thank you.
how to make the following work?

group: Device
items:

name: Work Mode
platform: select
registers: [0x00CF, 0x00CE]
code:
read: 0x03
write: 0x06
rule: 1
lookup:

key: 0
value: "Off"
bit: 0
value: "On"
bit: [0, 4]
value: "Time of Use"

just tested it, got an error message: Failed to perform the action select/select_option. The value contained in the request data field is not an allowable value for the server.

I'm going to need debug log with that action performed.

home-assistant_solarman_2024-11-27T20-31-10.360Z.log

fix: Work Mode for Afore Hybrid profile
BTW you can add Total Losses sensor into individual device consumptions in Energy dashboard and track consumption of the inverter and conversion losses. 😉

fix: Work Mode for Afore Hybrid profile

it did send the command. however, it again turned off the inverter - not the function.

BTW you can add Total Losses sensor into individual device consumptions in Energy dashboard and track consumption of the inverter and conversion losses. 😉

yap, will do in future as more individual tracking for devices are added

it did send the command. however, it again turned off the inverter - not the function.

What option is there selected when is inverter on? What option did you select?

yap, will do in future as more individual tracking for devices are added

I don't understand?

home-assistant_solarman_2024-11-27T20-56-29.909Z.log
if i select:
- bit: [0, 4]
value: "Time of Use"
again the same error

You are not using latest version of the code from this repository.

What option is there selected when is inverter on? What option did you select?

selected off

You are not using latest version of the code from this repository.

You are not using latest version of the code from this repository.

true, just noticed you changed 3 files. fixed
after selecting option:

bit: [0, 4]

the integration/device fails to load.
log:
home-assistant_solarman_2024-11-27T20-56-29.909Z.log

I don't see anything different from before.

I don't see anything different from before.

sry, wrong file
home-assistant_solarman_2024-11-27T21-11-51.172Z.log

The order of the registers proly needs to be reversed.

Are you sure you have updated parser.py too?

after commenting this entity, the device loads.
deleting comments, device fails to load.
even after several combinations device didn't load. the combinations:
renamed entity
reversed registers
comment only the problematic selection (bit: [0, 4] ...)
yes, i'm sure. since i was just checking the posting on this thread, didn't notice you changed other files.
after your reminder, i did replace the 3 changed files

fix: Enum class & Select platform dictionary default
And tell me which entities (registers) are you missing in that afore_hybrid.yaml profile so I can add them.

fix: Enum class & Select platform dictionary default

this did enable the device load, but now reading incorrectly the state of this feature.
timing AC charge is on, the feature is reading it off. i will even try to change it.
every time the inverter shuts down, i lose power to the house since all my house is now connected to the EPS power outlet of the inverter.

as far as i am concerned, i am very happy and greatly thankful for your integration and the great work you put in maintaining it.
after the resolution of the reading and writing the registers with the times, i have created many automations:

automations depending weather conditions to change charging power and min/max states.
changing Ban discharge times for days that we have low cost electricity, i can control the battery not to charge and be used
unnecessarily.
charge power depending on battery state and the available time of low tariff for the 2nd cycle
etc.

therefore, if you decide to close this issue - please do.
i will be available to share any automations and helpers i created for a sophisticated utilization of the battery
if you want you can keep the thread open and i can periodically check it and provide active support for any additional testing that you might need.
p.s.: i'm out for tonight, got early morning tasks. again, thank you very much.

fix: Enum class & Select platform dictionary default

Specifically, I tested it on my installation and it worked, guess something strange must be happening in your case.
Open parser.py and add (not replace) this line on the row number 116:
_LOGGER.warning(f"{from_bit_index(o["bit"])} == {value}: {from_bit_index(o["bit"]) == value}")

So the row which is originally on the row number 116 moves to 117.

is this ok?

tried with this code:
  - name: "Timing AC Charge"
    platform: select
    registers: [0x00CE, 0x00CF]
    code:
      read: 0x03
    rule: 1
    icon: "mdi:home-lightning-bolt"
    lookup:
      - key: 0
        value: "Off"
      - bit: 0
        value: "On"
      - bit: [0, 4]
        value: "Timing AC ChargeEnable"

result:

is this ok?

Yes.

tried with this code:

Could be wrong order of registers.

tried the registers order too.
this is the log
home-assistant_solarman_2024-11-28T18-26-59.877Z.log

I don't see those messages in there, You probably made a mistake somewhere.
BTW, As I said before already, your file contains many errors as seen here (long term statistics won't work, etc.):
MainThread) [custom_components.solarman.sensor] async_setup: async_add_entities
2024-11-28 19:26:56.875 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_pvt_total_power (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'total_increasing' which is impossible considering device class ('power') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.876 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_pvt_total_power_day (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.879 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_pvt_total_power_all (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.880 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_state (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('enum') it is using; expected None; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.881 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_voltage (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using native unit of measurement 'V' which is not a valid unit for the device class ('power') it is using; expected one of ['kW', 'W']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.881 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_current (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using native unit of measurement 'A' which is not a valid unit for the device class ('power') it is using; expected one of ['kW', 'W']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.882 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_daily_charge (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.882 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_daily_discharge (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.882 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_total_charge (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-11-28 19:26:56.883 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bluesun_battery_total_discharge (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues

bluesun2.txt
i fixed the file for the "total" as you suggested. i'll look into the other things

i just loaded the device with afore_hybrid.yaml
the work mode shows the same. didn't try the register order though

I need to see output in the log of that code change we did few moments ago. Did you restart HA?

home-assistant_solarman_2024-11-28T19-03-00.796Z.log
yes, i restarted. just didn't change the order of the registers. i needed the device back online with my file since i need the entities

nope sry, too late now. i need the long term entity records. will use the data to show the benefits of using battery compared to just solar.
i need to this data to calculate savings and who this to customers

nope sry, too late now. i need the long term entity records.

Your history is messed up already anyway, because of those errors in your file. 😉 You are using this for like 2 weeks tops, so it's no history, I wouldn't call it too late at all. There is a guide in Discussions how to transfer/merge history under different names. But  sure it's up to you.
Anyway inverter is currently set to 5308417, which translates as (set bits):

B0:switch machine: inverter is on
B16:Timing Forbid discharge enable: is on
B20:DisselGenFunction: is on
B22: is on

You need to add additional options:
      - bit: [0, 4, 16, 20, 22]
        value: "Time of Use & Forbid Discharge & Generator & B22"
      - bit: [0, 16, 20, 22]
        value: "Forbid Discharge & Generator & B22"

yes, my el. invoice period is on the 12th of the month. these too weeks are very valuable to me, can't wait for the next invoice...
i think this algebraic calculation of import/export will ruin my calculations.
i have custom sensors calculating positive and negative values for each phase.
i also took your advice and set the export to 100w.
let's see how it goes.
however, you could make possible that we could load as second device with the other file and have them both 😉

i think this algebraic calculation of import/export will ruin my calculations.
i have custom sensors calculating positive and negative values for each phase.

I don't know what you mean by that. And sure it can be valuable insight if you have phases and their consumption somewhat logically separated.

i also took your advice and set the export to 100w.

It really depends on how is electricity billed in your region. So make sure it's good for your case.

however, you could make possible that we could load as second device

I think it would just create unnecessarily communication overhead with the logger. But you can overcome the limitation of 1 serial number = 1 device by creating device with some made up serial number and then proceed with manual edit of the entry of newly added device in /homeassistant/.storage/core.config_entries and change inverter_serial item.
It's not about me being happy. I'm just trying to help you. 😉

i think this algebraic calculation of import/export will ruin my calculations.
i have custom sensors calculating positive and negative values for each phase.

I don't know what you mean by that. And sure it can be valuable insight if you have phases and their consumption somewhat logically separated.

i also took your advice and set the export to 100w.

It really depends on how is electricity billed in your region. So make sure it's good for your case.

however, you could make possible that we could load as second device

As i could ready from that page where you suggest this, it seems our countries have the same type of meter. A pulse counting meter that reads pulses generated when electricity is flowing. I understand this as whatever the flow of electricity, pulses are generated and counted.
The tech. support of BlueSun somehow thinks that some European countries have "algebraic total" of phases. Meaning, if you export some electricity while importing some - if the algebraic sum of positive and negative is near 0 - than you don't pay.
Personally, i think they are totally wrong. How wrong, i will know in about 2 weeks.
That's why i need my sensors to store data until billing period finishes and i get the invoice so i can raise another issue with them. they offered that if necessary, they can add additional features for the inverter firmware.
This is also important why we must keep the file separated (clearly identify that is for BlueSun), correctly identify model and i guess firmware versions too since there will be additional features added to the inverter.
I'm really positively surprised with their tech. support and let's see how it goes.

some European countries have "algebraic total" of phases

Yes. Germany for example (as stated in our wiki): Smart meter reading method v1r0A 20170622.pdf

This is also important why we must keep the file separated

I really don't think so and the plan for the future is to get rid of the files completely anyway. 😉

some European countries have "algebraic total" of phases

Yes. Germany for example (as stated in our wiki), more info: Smart meter reading method v1r0A 20170622.pdf

Yes, exactly. This document even questions the operation of a "smart" meter.
In my country you can't report a system and can't get a bi-directional smart meter with inverters higher than 6 KW or max PV capacity <6 KW (max 5.99KW).
So, if you have larger system you're stuck with consumption only. Therefore, you're stuck with an old meter which is not bi-directional nor smart.

This energy distribution mafia is p*ssing me of too... Even so, we don't have it THAT strict, but what can you do, right?

As a businessman, it's my job to find solutions to "limitations".
That's why i'm trying so hard to log data and use as "proof" that there are solutions to some of the "limitations".
And i have to mention again how happy i am with Bluesun tech. support.
This "mafia" in our country has 4 blocks of high tariffs. Each block is significantly with higher price.
I estimate that with 15kw inverter and 30kw of batteries, a large house with heat-pump can escape the high tariffs and remain only in the low tariff.
I will make a public Grafana dashboard next month and launch a local marketing campaign.

That sounds briliant!
May I ask you for your current power and distribution prices in both tarts?

That sounds briliant!
May I ask you for your current power and distribution prices in both tarts?
Edit: Can you please help me with something? I would like to know how unique_id looks like for entities under solarman integration. Do you know where to look?

sry, been away for a few days. you still need help?
official prices in North Macedonia:
https://www.erc.org.mk/page_en.aspx?id=287

Tarriff | Price in Macedonian Denars | Transportation Fees |   |   | Transportation Fees | Total price in Euros | Last Change
-- | -- | -- | -- | -- | -- | -- | --
Домаќинства ДВОТАРИФНО мерење (висока тарифа) ВТ1 | 4.23 | 2.3032 | ден/kWh | 0.0688 | 0.0375 | 0.1253850732 | 01.07.2024
Домаќинства ДВОТАРИФНО мерење (висока тарифа) ВТ2 | 5.34 | 2.3032 | ден/kWh | 0.0868 | 0.0375 | 0.146575187 | 01.07.2024
Домаќинства ДВОТАРИФНО мерење (висока тарифа) ВТ3 | 7.09 | 2.3032 | ден/kWh | 0.1153 | 0.0375 | 0.1802023089 | 01.07.2024
Домаќинства ДВОТАРИФНО мерење (висока тарифа) ВТ4 | 17.69 | 2.3032 | ден/kWh | 0.2877 | 0.0375 | 0.3836746016 | 01.07.2024
Домаќинства ДВОТАРИФНО мерење (ниска тарифа) НТ | 1.78 | 2.3032 | ден/kWh | 0.0289 | 0.0375 | 0.07831362602 | 01.07.2024

You have it tiered by total consumption?!? WTF! BUT it's probably always necessary to look at it from a bigger perspective because the state of the network has the most to say here and maybe it's needed for grid stability (Incentivizes saving, etc.). But then the prices aren't THAT BAD, but not the best either, on the other hand I'm pretty sure the situation in most places in the EU is currently worse on average.


Package request: sourcegraph-scip

Project description

SCIP - a better code indexing format than LSIF
Metadata

homepage URL: https://about.sourcegraph.com/blog/announcing-scip
source URL: https://github.com/sourcegraph/scip
license: apache2.0
platforms:  linux

#233444


loop retry

Describe the bug

axios.interceptors.response.use(
  function (response) {
    if ('statusText' in response) {
      return response.data
    } else {
      return response
    }
  },
  function (error: AxiosError) {

    if (error.response?.status === 401) {
      localStorage.removeItem('token')
      router.navigate('/login')
    }
    return Promise.reject(error)
  }
)

export const useGamesQuery = () =>
  useQuery(
    currentKey,
    () =>
      axios.get('/games/my').then(({ data }) => {
        return data
      }),
    {
      staleTime: Infinity,
    }
  )

export const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      refetchOnWindowFocus: false,
      retry: false,
    },
  },
})

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <QueryClientProvider client={queryClient}>
    <App />
    <ReactQueryDevtools initialIsOpen={false} />
  </QueryClientProvider>
)

Your minimal, reproducible example
i don't know how to reproduce
Steps to reproduce
open the browser
Expected behavior
once if
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
macos chrome
TanStack Query version
^4.19.1
TypeScript version
No response
Additional context
No response

thanks for the feedback! but can you setup an example that reproduces this please? codesandbox or stackblitz

don't let me repeat please

I don't think this is react-query's doing. I can't tell much from a screenshot with partial code and a video ...
it looks like you're calling the query function directly in render and have an infinite render loop or so
cc @TkDodo

Don't let me repeat: We're not looking into bugs without a standalone, minimal, runnable reproduction. Feel free to re-open once you have that.