I port Emulators to Unity and made SNES, GENESIS, AND GBA Core Mods so they play in SBS 3D.

I used to run Libretro Cores in Unity3D but they don't work anymore. (With the same code).
So I started porting C# Emulators to run in Unity, and have working Unity3D code for NES, SNES, GENESIS, & GBA.
I modified 3 Libretro cores to play their games in 3D instead of 2D. (When the original systems were only 2D)
I just recently have been modding the VBAm core to load and run replacement tiles at higher resolutions and it works perfect.
My family just bought me a top end new computer for xmas on the condition I learn Unreal for 4 hours a day, because my brother convinced everyone its better than Unity.
So, I literally just installed Unreal Engine yesterday, and tried to run your code, but it says it was compiled for another engine version, then says to compile it manually. I don't know what to do to fix it.  I would like to help you with this code and I will be studying what you have done to familiarize myself with Unreal Engine.
The VBAm Core I modded to load new graphics at x+ resolution needs a tile editor, so if I can get it running in Unreal, I can have it so you edit the tiles in the game while you play. (I already did this with the NES in Unity)
My Email is edisonzghost / gmail . com
https://www.youtube.com/watch?v=VGHmmGN5YA8
https://www.youtube.com/watch?v=3QdkEx8IJNs
https://www.youtube.com/watch?v=ZmZ__x_D1Dc
https://www.youtube.com/watch?v=HPZGHzET2WQ
https://www.youtube.com/watch?v=Ami-0RjDFeY
https://www.youtube.com/watch?v=3fFJXUX08fY
^^ My Work. :)
I hope we can hang out, I should have the gist of Unreal in the next few weeks.. I'll be studying every day.

Myles Johnston

case RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY: {
    const char** retro_path = (const char**)data;
    if (retro_path != NULL) { // ADDED
        verify(IFileManager::Get().MakeDirectory(ANSI_TO_TCHAR(this->core_save_directory.GetData()), true));
        *retro_path = core_save_directory.GetData();
    } // ADDED
    return true;
}
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY: {

    const char** retro_path = (const char**)data;
    if (retro_path != NULL) { // ADDED
        verify(IFileManager::Get().MakeDirectory(ANSI_TO_TCHAR(this->core_system_directory.GetData()), true));
        *retro_path = core_system_directory.GetData();
    } // ADDED
    return true;
}

https://www.youtube.com/watch?v=TqsmzZjUVoE

Wow that's pretty cool. I sent you an email awhile ago but I think it may have gone to spam since I used a sketchy email address. You can reach me there or on the new Discord

"tried to run your code, but it says it was compiled for another engine version, then says to compile it manually. I don't know what to do to fix it."
I have this same problem. I tried various versions of UE4 to no avail. Do you have any advice on how to fix/rebuild it?
Thanks

Hey!
I want to bring some real arcades to VR with Unity. There's any chance to bring these emulators into it and render as a "Render Texture"?


docs: better explain why mqtt discovery isn't a good choice

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 29.605%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
3680

Relevant Lines:
13073

💛  - Coveralls


[Bug]Arrange ColumnGroups in schema order

While defining Column groups, if group is not defined in schema order than data loading is failing
This fix is to arrange the group in schema order

Build finished.

@gvramana review comment is handled, please check.

Build finished.

LGTM


Remove Darwin Unified Log extension in favor of osquery core

Ref: https://github.com/osquery/osquery/pull/6904
If users still want to use an extension, refer to https://github.com/macadmins/osquery-extension

Closed by #74


feat: use component library's dropdown component in learn

This pr includes

feat: make ui-components share same presets as learn
feat: improve dropdown styles
feat: add hot reloading for component library CSS
feat: add component library to learn

Remaning tasks:
1 - extract types declarations from the component library and import them to learn.
2 - style the toggle button when toggled to look like the hover state using headless ui's internal state.
3 - include the linking scripts in package.json.
4 - build and publish the component library upon approval.
Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #XXXXX

Hey @ahmadabdolsaheb what's the plan re: publishing? Are we going to publish to npm first or rework this to use the local code?

Once the tests pass we could do either of the followings:
1-Split this into two prs (learn and ui-components). Once the ui-components pr is merged, I could publish and then we could merge the learn one.
2-publish the component library from the pr and then merge this pr.
Either way I am happy.

Both seem reasonable to me. Option 2 sounds like it might waste less time, so do you want to go with that?

Package published: https://www.npmjs.com/package/@freecodecamp/ui

Another round of reviews then merge?

@ahmadabdolsaheb it looks like there are a couple of issues.
Firstly pnpm defaults to using the @freecodecamp/ui workspace. This is probably fine, but means we need to build it before linting etc.
Secondly, the types aren't quite working correctly. To fix this we'll need a "types" property in the package.json of ui-components, and point it at the types. Also we're not generating the declaration files any more. I could have sworn we did at one point!

The timeline jest tests need a little work. After that, it should be good to go.

Two tests need to be migrated to e2e:

certification settings.
timeline.

Either a multifile project needs to be added to the certified seed object or cypress needs to submit one so it shows up as the last one on the timeline.

@ojeytonwilliams should be fixed.

I'd like to take a look at this but I'm having trouble getting it to run with pnpm run develop. Getting the errors "Can't resolve '@freecodecamp/ui'" and "Can't resolve<EMAIL_ADDRESS>Is there a trick to this?

Getting the errors "Can't resolve '@freecodecamp/ui'" and "Can't resolve<EMAIL_ADDRESS>
At a guess, your pnpm version is too low. They changed the lockfile format recently and that seems to have broken things. Updating pnpm and pnpm installing again should fix it.
Failing that, try removing node_modules and installing again. That shouldn't be necessary, though.
Failing that @ me again and I'll see if I can figure out what's wrong.

Hmm, have you tried clean-and-develop?

Thank you @ojeytonwilliams, the pnpm upgrade did the trick. I'll try to remember that next time.
I'll put this through its paces and write up any notes soon.

Here are my notes for the Get Help menu in the JS ADS challenges.
Tested with: http://localhost:8000/learn/javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction50465
Should be fixed:

A nice improvement is that now when the Get Help button is activated, focus is placed on the first item in the menu. Unfortunately, this breaks when using either the JAWS or NVDA screen reader. I will figure out why this is happening and let you know.

Get Help -> Get a Hint: We should add sr-only text "opens in new window" to the end of the menu text here (this will be an improvement over current version on production). Should also consider adding the opens in new window icon that we use in the main menu.

Get Help -> Watch a Video: When closing the video either by Esc key or 'x' close button, focus should be placed back on Get Help button (this is current behavior on production)

Get Help -> Ask for Help: When closing the help dialog either by Esc key, 'x' close button, or Cancel button, focus should be placed back on Get Help button (this is current behavior on production)

Nice to have but not required:

Allow the up/down arrow keys to wrap around in the menu (this is current behavior on production)

In addition to the background color changing on focus of menu item, add the blue outline (using :focus-visible) as well for consistency (this is current behavior on production)

Thanks for the meticulous review, @bbsmooth. One thing I'm curious about is this: can we automate this kind of QA? At least now that you've pointed out what needs to be happening.
Some unit tests with react-testing-library's tools would be good, assuming they can catch the issues you described.

More information on the issue with keyboard focus not automatically being placed on the first menu item when using JAWS/NVDA. This menu implementation is using aria-activedescendant to handle the focus management. Using the keyboard without a screen reader works properly. When the Get Help button is activated, the menu div is inserted into the DOM and the aria-activedescendant attribute (on the menu div) is set to the id of the first item in the menu. This is also (surprisingly) working properly when using the Orca screen reader in Linux.
But when using JAWS/NVDA, the aria-activedescendant attribute is NOT being set on the menu div when activating the Get Help button with the keyboard. I'm noticing that if you click on the Get Help button with the mouse that the aria-activedescendant attribute is also not set on the menu div either. So I'm assuming the Get Help button is attempting to determine whether the user used a keyboard to click the button or a pointer device, and only wants to set aria-activedescendant when using a keyboard. Unfortunately, whatever method the button is using to make this distinction isn't working when using JAWS/NVDA.
I'm also finding this bug on the headless ui menu example. So this seems like a bug with the component itself and not something we are doing. I guess I'll need to put together a codepen demo and open an issue in their github.

Thanks for the meticulous review, @bbsmooth. Just have a few questions regarding the dropdown menu implementation:

Allow the up/down arrow keys to wrap around in the menu (this is current behavior on production)

Does this mean to have the icon wrap to the next line on smaller screens?

Get Help -> Get a Hint: We should add sr-only text "opens in new window" to the end of the menu text here (this will be an improvement over current version on production). Should also consider adding the opens in new window icon that we use in the main menu.

I have no idea how to start implementing this, so pointers are appreciated.

Allow the up/down arrow keys to wrap around in the menu (this is current behavior on production)

Does this mean to have the icon wrap to the next line on smaller screens?

Sorry, I might not have been as clear as I could have been. If focus is currently on the top item in the menu, pressing the up arrow key moves focus to the bottom item. Likewise, if focus is currently on the bottom item, pressing the down arrow key moves focus to the top item.
This is not required keyboard functionality, just nice to have, and the menu on production currently has it.

It seems like bootstrap modal finds the last active element before the modal is open and set .focus() to that element when the modal is closed.
Resources: modal, baseModal, activeElements

I was wondering if we could move forward without the followings since they need to be resolved on headlessui's side?

Yes, definitely. I don't think either of these issues are blockers. The arrow wrap is definitely not (just nice to have). The lack of focus on the first menu item when using NVDA/JAWS is slightly more annoying but won't keep these users from using the menu. I plan on creating an issue for this when I have a few minutes to put together a good demo.

Well, I found another "issue" but I don't think there is anything we can do about it (this seems to be a bug in headlessui). When you open the menu with a keyboard and it places focus on the first menu item, if you then hit the Tab key it closes the menu and places the focus on the next focusable item on the page after the "Get Help" button (which is the JS editor in this case). That is the expected behavior. But if you do the same thing but use Shift + Tab then it still places you in the JS editor instead of going backwards and placing the focus on the "Reset this lesson" button, which is the previous focusable element before the "Get Help" button. I guess this is another issue to open with headlessui. Shouldn't stop us from going forward.
And just one very minor nitpick under our control. If you don't think it is worthy of fixing now, that's fine. If it really bugs me I can open my own PR.

As you can see in the above pic, when zoomed in, the left side of the focus outline is cut off so only 1px is showing. I think setting outline-offset: -3px on these menu items for focus-visible/hover will solve that problem. We have this same issue for the Help/Reset/Run buttons at the bottom, but that's perhaps a little out of scope for this PR so I will open a new PR for those (unless you want to deal with them now).
Otherwise, the other fixes look good and this is ready to go.


Feat/tx pages

Nice. Can you can pull in the changes from my PR that contain the updates to use the @blockstach/stacks-blockchain-sidecar-types? There aren't many changes to your code, mostly passing the transaction proper to TransactionDetails and moving it over to the tx route.


Add receipt flag to ctc tx

This PR adds a --receipt flag to the ctc tx CLI command.
If this flag is provided, it outputs the transaction receipt, rather than the transaction object:
$ ctc tx 0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf --json --receipt
{
    "block_hash": "0x31ca8a95a453f99f903e1bce5f0cc2619a790e6c802d94e6495e30b35b44e8d3",
    "block_number": 14677571,
    "contract_address": null,
    "cumulative_gas_used": 14115255,
    "effective_gas_price":<PHONE_NUMBER>1,
    "from": "0x97d567ea6062df0b02b88092f1a5a28a9fb8b984",
    "gas_used": 199142,
    "logs": [
        {
            "address": "0xfd3300a9a74b3250f1b2abc12b47611171910b07",
            "blockHash": "0x31ca8a95a453f99f903e1bce5f0cc2619a790e6c802d94e6495e30b35b44e8d3",
            "blockNumber": "0xdff643",
            "data": "0x000000000000000000000000000000000000000000a69606d83098d8eea7e60800000000000000000000000000000000000000000000000000093f16d65b5b8a0000000000000000000000000000000000000000000000000ecaae6d5916c235000000000000000000000000000000000000000000005c6663dd81bf07a1f2d9",
            "logIndex": "0xe1",
            "removed": false,
            "topics": [
                "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04"
            ],
            "transactionHash": "0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf",
            "transactionIndex": "0xef"
        },
        {
            "address": "0x73f16f0c0cd1a078a54894974c5c054d8dc1a3d7",
            "blockHash": "0x31ca8a95a453f99f903e1bce5f0cc2619a790e6c802d94e6495e30b35b44e8d3",
            "blockNumber": "0xdff643",
            "data": "0x000000000000000000000000000000000000000000000000000000000006ff040000000000000000000000000000000000de2c022f2d4d10de7946e3b1bed459",
            "logIndex": "0xe2",
            "removed": false,
            "topics": [
                "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a",
                "0x000000000000000000000000fd3300a9a74b3250f1b2abc12b47611171910b07",
                "0x00000000000000000000000097d567ea6062df0b02b88092f1a5a28a9fb8b984"
            ],
            "transactionHash": "0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf",
            "transactionIndex": "0xef"
        },
        {
            "address": "0xc7283b66eb1eb5fb86327f08e1b5816b0720212b",
            "blockHash": "0x31ca8a95a453f99f903e1bce5f0cc2619a790e6c802d94e6495e30b35b44e8d3",
            "blockNumber": "0xdff643",
            "data": "0x0000000000000000000000000000000000000000000034f086f3bb1797a131cc",
            "logIndex": "0xe3",
            "removed": false,
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x00000000000000000000000097d567ea6062df0b02b88092f1a5a28a9fb8b984",
                "0x000000000000000000000000fd3300a9a74b3250f1b2abc12b47611171910b07"
            ],
            "transactionHash": "0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf",
            "transactionIndex": "0xef"
        },
        {
            "address": "0xfd3300a9a74b3250f1b2abc12b47611171910b07",
            "blockHash": "0x31ca8a95a453f99f903e1bce5f0cc2619a790e6c802d94e6495e30b35b44e8d3",
            "blockNumber": "0xdff643",
            "data": "0x00000000000000000000000097d567ea6062df0b02b88092f1a5a28a9fb8b9840000000000000000000000000000000000000000000034f086f3bb1797a131cc0000000000000000000000000000000000000000000033be7096837b0b003f33",
            "logIndex": "0xe4",
            "removed": false,
            "topics": [
                "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f"
            ],
            "transactionHash": "0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf",
            "transactionIndex": "0xef"
        },
        {
            "address": "0xfd3300a9a74b3250f1b2abc12b47611171910b07",
            "blockHash": "0x31ca8a95a453f99f903e1bce5f0cc2619a790e6c802d94e6495e30b35b44e8d3",
            "blockNumber": "0xdff643",
            "data": "0x0000000000000000000000000000000000000000000033be7096837b0b003f33",
            "logIndex": "0xe5",
            "removed": false,
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000fd3300a9a74b3250f1b2abc12b47611171910b07",
                "0x00000000000000000000000097d567ea6062df0b02b88092f1a5a28a9fb8b984"
            ],
            "transactionHash": "0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf",
            "transactionIndex": "0xef"
        }
    ],
    "logs_bloom": "0x00000000000000000000000000000000000000000000400000000000000001100000000000000000000000000000000000000000000000000000004000000000000000000000000000000008080000000000000000000004000410000000000000000000000000000000000000000000000000000008000000000010000000000000000000001000000000000000000000000000200020200000004400000080000000040000000000000000000000000000000000000000000000000000000000000002000000000004000000020000000000000000000000000000000020000000000000000200000020000040000000200000000000000000000000000000",
    "status": 1,
    "to": "0xfd3300a9a74b3250f1b2abc12b47611171910b07",
    "transaction_hash": "0xe981fe5c78d11d935a1dc35c579969e65e2dd6bb05ad321ea9670f8b1e203eaf",
    "transaction_index": 239,
    "type": "0x2"
}

Since the plain text output provides this information already, this flag only works when supplied with --json.

looks great!


neonvm: Switch to kernel 6.6.32

As of 2024-06-03, www.kernel.org says this is the most recent version of the 6.6.x LTS branch.
Did the same thing as in #950. Like that PR, this is also in order to explore if it's a potential solution to neondatabase/cloud#10622.

This did not improve the situation with neondatabase/cloud#10622, even though #950 (kernel 6.1.92) did. Closing this PR -- it's easy enough to resurrect at a future date, if we want.


Implement support for  element

It would be nice to have  elements in parsed DOM even if they are not supported by svgren, so their presence can at least be checked after parsing.

The <text> element added to svgdom version 0.3.18, the svgren was also rebuilt because of binary incompatibility, so the actual version is 0.4.50.
For now it only inserts the <text> element to the DOM tree, but it does not parse any specific attributes of the element. But this should be enough to detect that SVG contains <text> elements. It should be pretty easy to create a custom Visitor for that, but if you have questions, please ask.


Bkhezry geojson plugin

Follow up on #38

@tobrun What should I do now? Why branch merging failed?

@bkhezry nothing needs to happen from your end. I will fix up the PR to make CI succeed.
FWIW the CI failed due to some formatting issue. Thanks again for contributing!

@tobrun you're welcome :-)


Merge develop into master

What does this PR do?
Update master with the current contents of the develop branch
How do I test this?
   gulp test

Coverage remained the same at 96.172% when pulling 1472e90dcc93ba920228c1c2742509f00c099642 on develop into 7be595f45f45965c29993b851cd0077c7641dc06 on master.


musl support

Hey there, any chance to get releases also with musl support? Otherwise, this cannot be used in images like alpine.
Thank you!

Thanks for the reporting this problem! The Supercronic binaries we distribute are intended to be static binaries. That is, they shouldn't depend on libc at all, so it shouldn't if your libc is glibc, musl (or whatever else for that matter).
However, it turns that when we introduced Sentry support in #45, we pulled in Go's network support, which by default, causes Go to build a dynamic library that links to libc. This resulted in our binaries no longer being static.
Go can be configured to not link to C code at all, which should provide us with static binaries again. I made this change in #49, and added a regression test in CI to make sure we continue building static binaries going forward.

v0.1.8 was released and fixes this problem. Thanks again for letting us know :)

Cool, thank you!


Removal of duplicate classes also removes inline conditions

What version of prettier-plugin-tailwindcss are you using?
v0.6.0
What version of Tailwind CSS are you using?
v3.3.5
What version of Node.js are you using?
v18.19.0
What package manager are you using?
npm
What operating system are you using?
macOS and Linux
Describe your issue
Since the recent update to version 0.6.0 the formatter in our project is no longer working correctly.
For example we have this class attribute with inline if conditions:
 <button class="{f:if(condition: '{i.isFirst}', then: 'items-baseline', else: '')} {f:if(condition: '{i.isLast}', then: 'items-end', else: '')} {f:if(condition: '!{i.isLast} && !{i.isFirst}', then: 'items-center', else: '')} group group relative flex cursor-default flex-col whitespace-nowrap">
Button text
</button>

After running prettier, the class looks like this:
<button class="{f:if(condition: '{i.isFirst}', then: 'items-baseline', else: '')} '{i.isLast}', 'items-end', '!{i.isLast} && !{i.isFirst}', 'items-center', group relative flex cursor-default flex-col whitespace-nowrap">
 Button text
</button>

As you can see, not only the duplicate 'group' class is removed but also all occurences of {f:if(condition:.
We have conditions like this all over the place in multiple projects. A "prettiere-ignore" comment at all occurences would therefore involve many adjustments.
The syntax is part of the Fluid-templating Language: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fluid/Index.html
For now we had to rollback to a previous version as this change breaks our code.
Is this a bug the plugin can handle or do we have to avoid using this feature in this case?

What language is that parsed as?

Okay, so Fluid takes HTML and adds stuff to it. I'll see if there's something we can do here. But ultimately that means setting the prettier language to HTML is incorrect because the expressions in the class attribute are not valid in HTML by themselves. I'm a little surprised that this plugin hasn't completely broken things for you in the past.
I'll look into it.

Thank you. If you need more information or support you can ask me at any time.


The generated audio is clipping, has a transient for every note?

Seems to be an issue with the individual phase of each note.


unnecessary doubt button in about and notes section

there is an unnecessary doubt button in about and notes section nev-bar which is not even working. wither you should remve it and make it functional.
To Reproduce
go tho the notes or about section and click on doubt button present in the nav-bar
i would like to solve this issue

it is working


Instructions are missing a step for install

Need to cd into the newly created directory and then clone the repo
sudo su -
mkdir -p ~/.ansible/roles
cd  ~/.ansible/roles <-------------------------
git clone https://github.com/alvistack/ansible-role-cri_o.git cri_o
cd ~/.ansible/roles/cri_o
pip3 install --upgrade --ignore-installed --requirement requirements.txt
molecule converge
molecule verify

@kungfu71186 OMG how silly am I... Will create PR for CRI-O

Fixed by https://github.com/cri-o/cri-o/pull/3715


rangePlugin doesn't work properly

Hi, if I use rangePlugin and both the input are input type="date" the first input is converted with type="text but not the second one that remains type"date"
So if I transform the input type="date" in input type="text" it works on desktop, but not on mobile where only the first field works with native datepicker, not the second one.
Moreover, the plugin does not seem to work properly on mobile even on the demo page here: https://flatpickr.js.org/plugins/#rangeplugin-beta.
https://jsfiddle.net/jx8b4g1h/
Your Environment

flatpickr version used: 4.5.2
Browser name and version: Chrome 70.0.3538.102
OS and version: MacOS Sierra

Any help or workaround found for this issue?

@chmln ? :-)

Have you tried setting de config option disableMobile: true? It seems like the plugin does not function correctly with the mobile option. For me setting the second field also functions. Now I only need to worry about #2288


Point Rewards

Hey, this is a Question.
Can I accept or deny a Custom Points Reward?
Maybe through the API?
I tried it but I'm probably not experienced enough to do it.
Would be nice if someone could help me :)

This has nothing to do with tmi.js, please use the Twitch developers Discord or forums.
They recently added endpoints for updating a redemption status. Note this requires the reward to have been created by the app in order to automate it.

This has nothing to do with tmi.js, please use the Twitch developers Discord or forums.
They recently added endpoints for updating a redemption status. Note this requires the reward to have been created by the app in order to automate it.


thanos store dns name not working

Thanos, Prometheus and Golang version used:
bitnami helm chart

Object Storage Provider:
s3
What happened:
I have a thanos sidecar behind a aws load balancer with a DNSrecord with a certificate for https when I use grpcurl I get a response but when I try to connect the sidecar to thanos query dns+thanos.mycompany.org I get an error  caller=endpointset.go:525 component=endpointset msg="update of node failed" err="getting metadata: fallback fetching info from <IP_ADDRESS>:10901: rpc error: code = Unavailable desc = connection closed" address=<IP_ADDRESS>:10901 (I have to IP`s for the load balancer so I get the error twice )
What you expected to happen:
the thanos query can connect to the thanos sidecar using the DNS name
How to reproduce it (as minimally and precisely as possible):
Full logs to relevant components:
level=warn ts=2021-12-11T17:58:57.338545509Z caller=endpointset.go:525 component=endpointset msg="update of node failed" err="getting metadata: fallback fetching info from <IP_ADDRESS>:10901: rpc error: code = Unavailable desc = connection closed" address=<IP_ADDRESS>:10901 level=warn ts=2021-12-11T17:58:57.338947934Z caller=endpointset.go:525 component=endpointset msg="update of node failed" err="getting metadata: fallback fetching info from <IP_ADDRESS>: rpc error: code = Unavailable desc = connection closed" address=<IP_ADDRESS>:10901

Anything else we need to know:

--grpc-client-tls-secure with certificates did the trick


Error running PE example combining models

In this demo: https://pygwb.docs.ligo.org/pygwb/run_pe.html#Combining-models
When I run this cell:
gw_schu = type('gw_schu', (PowerLawModel,SchumannModel), dict(c='c'))
kwargs={"baselines":[HL, HV, LV], "model_name":'PL+Schu', "polarizations":['tensor'],"fref":25}
model = gw_schu(**kwargs)

priors= {'kappa_H': bilby.core.prior.LogUniform(0.01, 10, '$\\kappa_H$'),
            'kappa_L': bilby.core.prior.LogUniform(0.01, 10, '$\\kappa_L$'),
            'kappa_V': bilby.core.prior.LogUniform(0.01, 10, '$\\kappa_V$'),
            'beta_H': bilby.core.prior.Uniform(0.0, 12.0, '$\\beta_H$'),
            'beta_L': bilby.core.prior.Uniform(1.0, 10.0, '$\\beta_L$'),
           'beta_V': bilby.core.prior.Uniform(0.0, 7.0, '$\\beta_V$'),
            'omega_ref': bilby.core.prior.LogUniform(1e-13, 1e-5, '$\\Omega_{\\rm ref}$'),
             'alpha': bilby.core.prior.Gaussian(0, 3.5, '$\\alpha$')}
hlv_gw_schu=bilby.run_sampler(likelihood=model,priors=priors,sampler='dynesty', npoints=1000, walks=10,npool=10,outdir='./pe/',label= 'hlv_gw_schu', resume=False)

I get an error:
07:51 bilby INFO    : Running for label 'hlv_gw_schu', output will be saved to './pe/'
07:52 bilby INFO    : Analysis priors:
07:52 bilby INFO    : kappa_H=LogUniform(minimum=0.01, maximum=10, name='$\\kappa_H$', latex_label='$\\kappa_H$', unit=None, boundary=None)
07:52 bilby INFO    : kappa_L=LogUniform(minimum=0.01, maximum=10, name='$\\kappa_L$', latex_label='$\\kappa_L$', unit=None, boundary=None)
07:52 bilby INFO    : kappa_V=LogUniform(minimum=0.01, maximum=10, name='$\\kappa_V$', latex_label='$\\kappa_V$', unit=None, boundary=None)
07:52 bilby INFO    : beta_H=Uniform(minimum=0.0, maximum=12.0, name='$\\beta_H$', latex_label='$\\beta_H$', unit=None, boundary=None)
07:52 bilby INFO    : beta_L=Uniform(minimum=1.0, maximum=10.0, name='$\\beta_L$', latex_label='$\\beta_L$', unit=None, boundary=None)
07:52 bilby INFO    : beta_V=Uniform(minimum=0.0, maximum=7.0, name='$\\beta_V$', latex_label='$\\beta_V$', unit=None, boundary=None)
07:52 bilby INFO    : omega_ref=LogUniform(minimum=1e-13, maximum=1e-05, name='$\\Omega_{\\rm ref}$', latex_label='$\\Omega_{\\rm ref}$', unit=None, boundary=None)
07:52 bilby INFO    : alpha=Gaussian(mu=0, sigma=3.5, name='$\\alpha$', latex_label='$\\alpha$', unit=None, boundary=None)
07:52 bilby INFO    : Analysis likelihood class: <class '__main__.gw_schu'>
07:52 bilby INFO    : Analysis likelihood noise evidence: 68225.8137823414
07:52 bilby INFO    : Single likelihood evaluation took 5.967e-04 s
07:52 bilby INFO    : Using sampler Dynesty with kwargs {'nlive': 1000, 'bound': 'live', 'sample': 'act-walk', 'periodic': None, 'reflective': None, 'update_interval': 600, 'first_update': None, 'npdim': None, 'rstate': None, 'queue_size': 10, 'pool': None, 'use_pool': None, 'live_points': None, 'logl_args': None, 'logl_kwargs': None, 'ptform_args': None, 'ptform_kwargs': None, 'gradient': None, 'grad_args': None, 'grad_kwargs': None, 'compute_jac': False, 'enlarge': None, 'bootstrap': None, 'walks': 10, 'facc': 0.2, 'slices': None, 'fmove': 0.9, 'max_move': 100, 'update_func': None, 'ncdim': None, 'blob': False, 'save_history': False, 'history_filename': None, 'maxiter': None, 'maxcall': None, 'dlogz': 0.1, 'logl_max': inf, 'n_effective': None, 'add_live': True, 'print_progress': True, 'print_func': <bound method Dynesty._print_func of <bilby.core.sampler.dynesty.Dynesty object at 0x7fae10514730>>, 'save_bounds': False, 'checkpoint_file': None, 'checkpoint_every': 60, 'resume': False}
07:52 bilby INFO    : Checkpoint every check_point_delta_t = 600s
07:52 bilby INFO    : Using dynesty version 2.1.3
07:52 bilby INFO    : Using the bilby-implemented act-walk sampling tracking the autocorrelation function and thinning by 2 with maximum length 10000
07:52 bilby INFO    : Setting up multiproccesing pool with 10 processes
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/cmbiwer/anaconda3/envs/pygwb/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/cmbiwer/anaconda3/envs/pygwb/lib/python3.9/multiprocessing/spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
AttributeError: Can't get attribute 'gw_schu' on <module '__main__' (built-in)>

I ran the code on my end and things seem to work fine for me. It seems like this might be a multiprocessing issues. In the last line of the cell, could you try setting the npool parameter equal to 1, instead of 10 to see if that fixes things? Thank you.

How do you recommend installing jupyter or whatever app to run the notebook? It seems some of these issues stem from me just installing the latest jupyter off conda.

How do you recommend installing jupyter or whatever app to run the notebook? It seems some of these issues stem from me just installing the latest jupyter off conda.

Hi @cmbiwer  - I've now looked into this, and indeed, the issue arises when using a jupyter notebook whereas it runs fine on jupyter lab. I've reproduced your error by running:
conda create -n pygwb_for_joss python=3.9
git clone git@git.ligo.org:pygwb/pygwb.git
cd pygwb
pip install .
conda install jupyter
pip install ipykernel ipython==8.12.0 jupyter
ipython kernel install --name "pygwb_for_joss" --user

and using the pygwb_for_joss environment. Whereas, if I run using jupyter lab as we usually do, I get the same results as on the tutorial in the docs.
I think this is coming from a known bug/issue with multiprocessing on jupyter, see

https://stackoverflow.com/questions/41385708/multiprocessing-example-giving-attributeerror
https://bugs.python.org/issue25053

I have now fixed the issue by just removing the multiprocessing call in the notebook, npool=10. The example runs fast and doesn't actually need multiprocessing. I don't think it's worth having the example break when using notebooks, but we can add a note about it in the tutorials.

Thanks for looking into that. That is what I was doing.

but we can add a note about it in the tutorials.

I think that would be helpful and I'd be happy to close the issue and approve the JOSS submission.


[ISSUE #477]✅Add test case for BrokerAddrInfo and  BrokerStatusChangeInfo 🚀

Which Issue(s) This PR Fixes(Closes)

Fixes #477
Brief Description

How Did You Test This Change?

ping @mxsm


In Material UI v3.6.0 Select Dropdown div flickers / triggers twice

[ ] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
When i am providing less than 100 items to the Select Dropdown its working fine but if i provide more than 100 then the Dropdown flickers/triggers twice. I have checked by putting debug point in the render function but it doesn't reach there after first render. I also put a random no check to see whether its actually re-rendering but even the randomly generated no is same. This is my code:
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';

const styles = theme => ({
  root: {
    display: 'flex',
    flexWrap: 'wrap',
  },
  formControl: {
    margin: theme.spacing.unit,
    minWidth: 120,
  },
  selectEmpty: {
    marginTop: theme.spacing.unit * 2,
  },
});

class SimpleSelect extends React.Component {
  state = {
    age: '',
    name: 'hai',
    labelWidth: 0,
  };

  constructor(props) {
      super(props);
      this.filters = [];
  }

  componentDidMount() {
    this.setState({
      labelWidth: 0,
    });
    for (let i = 0; i < 250; i++) {
      this.filters.push('----select----' + i);
    }
  }

  handleChange = event => {
    this.setState({ [event.target.name]: event.target.value });
  };

  render() {
    const { classes } = this.props;

    return (
      <form className={classes.root} autoComplete="off">
        <FormControl className={classes.formControl}>
          <InputLabel htmlFor="age-simple">Filter</InputLabel>
          <Select
            value={this.state.age}
            onChange={this.handleChange}
            inputProps={{
              name: 'age',
              id: 'age-simple',
            }}
          >
            {this.filters && this.filters.map((filter, index) => (
                        <MenuItem key={'filter-' + index} value={filter}>
                            {filter}
                        </MenuItem>
                    ))}
          </Select>
        </FormControl>
      </form>
    );
  }
}

SimpleSelect.propTypes = {
  classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(SimpleSelect);

Expected Behavior 🤔
It should have launched the Dropdown only for one time.

Steps to Reproduce 🕹

Steps:

Import Select from @material-ui/core/Select
Populate more than 100 items.
Try launching it on browser.
We will notice that the Dropdown is flickering twice. Please have a look at codesandbox.

Context 🔦
It was working fine earlier but when the items are more than 100 then its occuring.
I checked it on code sandbox where i found the issue is in Material UI.

Your Environment 🌎

Tech
Version

Material-UI
3.6.0

React
16.7.0

Browser
78.0.3904.87 (Official Build) (32-bit)

TypeScript
NA

etc.

@oliviertassinari I have not found this issue in the issue list.

See #16277


New Release?

Would it be possible to publish a new release with the comma fix?

Looks like this library hasn't been updated in a while. You might want to checkout Comlink or Greenlet.


Book mappings

BookEditScreen and some associated classes were kinda a mess and missing a lot of stuff, so I mapped them. A couple mappings were straight up wrong as well, but it's understandable given how much time I had to spent figuring out what everything did, so I fixed those too.

FYI: There is a PR that maps book stuff https://github.com/FabricMC/yarn/pull/1941

Imo targetting 1.16.5 isn't too problematic. Does anyone know if books changed a lot during the snapshots?
About #1941, I think this one is more comprehensive.

No there is no change at all, could be merged in the two branches easily (it's better to target latest and then backport than the reverse tho)

Since we are already reviewing here, I guess we can just cherry pick the commit from release to snapshot. Not worth to move the discussion around to a new pr

Oh sorry, I was under the impression that people target stable versions if they can, I'll target snapshots in the future

A side note: This is on 1.16.5 (which is perfectly fine as this maps missing stuff for 1.16.5). Need a cherry pick onto 21w11a after this is merged.

Needs to go into the snapshot first, please.

feel free to keep this one open and still target 1.16.5. it can get merged after it's merged in snapshot

Is this going to be merged?

I think so if this is reopened and targets 1.16.5 branch

You can do one right now imo.


[Merge] CL:0000439 'prolactin secreting cell' and CL:0002311 'mammotroph'

CL:0000439 'prolactin secreting cell':
A peptide hormone cell that secretes prolactin.
adenohypophysis has part some prolactin secreting cell
CL:0002311 'mammotroph' (child of CL:0000439 'prolactin secreting cell'):
An acidophilic cell of the anterior pituitary that produces prolactin.
Subclass of:
prolactin secreting cell
acidophil cell of pars distalis of adenohypophysis
Are there cells that secrete prolactin and are located in the adenohypophysis other than in its pars distalis (and/or don't stain well with acidic dyes)? Would CL:0000439 'prolactin secreting cell' be applicable to a wider range of species than its child? If not, should the two be merged?
The other child of CL:0000439 'prolactin secreting cell', CL:0002310 'mammosomatotroph', is "An acidophil cell of the anterior pitiuatry gland that produces both prolactin and growth hormone." (note typo). Thanks.
(While looking into this, I also noticed that the spelling "basophillic" with 2 ls is used a few times in CL for "basophilic". Unless basophillic is ever used in literature, please consider correcting to basophilic. (I didn't have time to check PubMed for usage, but Google supports the typo hypothesis.)
Paola

Hi CL editors, this ticket was automatically assigned to Nicole when I added the "merge" label, but it may be in scope for human-focused-funding projects. If so, it could also be used to further test @shawntanzk 's merge guidelines if that's still desired (I can't remember the link though!). Either way, thank you.

@bvarner-ebi - would you mind taking a look at this and using https://github.com/OBOAcademy/obook/pull/145 to merge the terms? thanks :)

@bvarner-ebi @shawntanzk thank you both.

@paola-scibite, thank you for this ticket.
Since there are references (1, 2) that describe extrapituitary prolactin-secreting cells, I see an argument for not merging these terms.
Is it true that adenohypophysis has part some 'prolactin secreting cell' does not absolutely infer 'prolactin secreting cell' part of some adenohypophysis?
If so, I propose the following:
[ ] do not merge CL:0000439 'prolactin secreting cell' and CL:0002311 'mammotroph'
[ ] update the label of CL:0000439 to 'prolactin-secreting cell' and add 'prolactin secreting cell' as an exact synonym
[ ] correct the typo in the text definition of CL:0002310 'mammosomatotroph' to "An acidophilic cell... "
[ ] correct the few instances of the typo "basophillic" that appear in CL to "basophilic"

@paola-scibite, thank you again for pointing out the typos.
Kindly note these have been fixed.
If you have any concerns with not merging the terms as originally requested, kindly advise so we can discuss.


chat.fosdem.org (element-web/develop) doesn't redirect to mobile correctly when not logged in

Will there be a link to an associated Matrix room attached to each event in Pentabarf?
If not, what's the correct link format to join a specific room? Linking to https://chat.fosdem.org/#/room/#containers:fosdem.org works, but+ only when I am already logged-in. Also perhaps there's a link that can open an app on mobile if available.

https://matrix.to/#/!lPCpzTqvUEAAXpOVzt:fosdem.org/$6y3skPMV6C65SwVfb3BnZ1mbTwNsU8kYNN0o-ID5OFg?via=fosdem.org&via=matrix.org&via=privacytools.io

moved to https://github.com/vector-im/element-web/issues/16283

moved to https://github.com/vector-im/element-web/issues/16283


Ocean.py:  Dynamic provider endpoints

Blocked by https://github.com/oceanprotocol/provider/issues/36
Right now all endpoints are hardcoded (https://github.com/oceanprotocol/ocean.py/blob/master/ocean_lib/data_provider/data_service_provider.py#L372)
Ocean.py should read the provider root endpoint (/ ) and create the required URLs based on that information.
Also errors are going to be thrown if a service that is not exposed is being accessed.

The branch "issue110" is still in the codebase. I believe it can be deleted? @mariacarmina


NBT Editing screen doesn't display properly

From what I've seen in screenshots, this isn't how the mod is supposed to look:

Above is a netherite sword enchanted with sharpness 5.
It is missing these:

I'm running version 1.5.0 of the mod on 1.18.2, with Java 17, on an M1 Mac.

I'm having trouble replicating the issue.

Are you receiving the sword in an unusual way? How the item ends up in your inventory shouldn't have any affect, but it is possible a plugin does something weird that messes it up.
Also try disabling all your resource packs; it is possible one of them overrides the icons and fonts in a way that causes issues.
If the problem still persists after all that, I'm not really sure how to help, since it works fine for me.

Can you send the log? It should be located in <TheGameDirectory>/logs
There may be an error message there that could help.

Sorry for the delay, I tried it with a brand new instance, with no resource packs on a new world, and it still didn't work, I gave myself the item from the creative inventory and then used an anvil to apply enchantments, so there shouldn't be any problems there. Here is the log, although I can't seem to find an error (aside from the mod generating the config files on first launch).

It appears there is a slight issue when generating the config files. It tries to create the settings file before creating the parent folder, which on the first launch causes the java.nio.file.NoSuchFileException. However, this doesn't end up causing any problems, and doesn't seem to be the source of the issue. It is also fixed for the next launches.
I'm honestly out of ideas on why this would occur. Here are a few more things to try:

Changing the gui scale
Changing the window size for Minecraft itself
Scrolling where it should be
Maybe an issue was introduced in a later version:

Loading Beta 1.0.0
If that works, loading the versions until it stops working

I'm assuming you don't have anything stored in the client chest, but if so I would backup that folder if you try to revert to an earlier version. (<TheGameDirectory>/nbteditor)

I tried everything you said, none of them worked, but I tried clicking underneath the text boxes where the NBT data would be, and I was able to access and edit the data:

I tried with v1.0.0 of the mod and with a variety of different resolutions and GUI scales, but the boxes still didn't render. Maybe there could be a config setting changing the rendering from the boxes to 2 text boxes, one for the path, the other for the value, and an icon to the left of both showing what data type it is)?

That's interesting! I'm guessing the issue is related to this line.
It cuts off the rendering on the edges of the list, so when scrolling the keys don't appear on top of the text fields above.
I'm guessing Minecraft handles the window sizing for Mac slightly differently, so the calculations for what area to cut off is off.
One (or both) of these functions must be returning an unusual value:
client.getWindow().getScaleFactor()
client.getWindow().getHeight()

I'm not sure the best way to fix or test this, but I can send you a file with this line removed.
It will also output the result from the above two functions into the log (there will be a little spam).
Can you confirm whether or not it works, and send what is in the new log? Thanks.
Try both fullscreen and not fullscreen, incase that makes a difference to the functions.
Download link: nbteditor-1.5.999.zip
You will have to extract the mod from the zip, as github doesn't support uploading .jars to comments apparently.

In the 1.19 update (v1.6.0) there is now a config option to enable the temporary fix.

In the 1.19 update (v1.6.0) there is now a config option to enable the temporary fix.

This fix works for me. Without that option enabled it works fine on my Linux machine, but when I moved the exact same MC folder to my MacBook, I encountered this issue. I enabled the option on my MacBook and it displays properly.
I'm using v1.6.1 on Fabric with Minecraft 1.19.

In the v1.9.0 update, I have now renamed the config option to "Mac Border Patch," as it affects more than just the editor's keys.
This config option is now also enabled by default for new Mac users.

I have finally fully fixed this in v2.0.2! (The "Mac Border Patch" config option has now been removed too)


Support HttpRequestWithBody#body(InputStream) method

Is your feature request related to a problem? Please describe.
I'd like to send large files, especially in tests, to check if server is able to large handle incoming data, e.g. with:
RandomAccessFile hugeFile = new RandomAccessFile(new File(temptDirectory, "test.binary"), "rw")
hugeFile.setLength(1024 * 1024 * 1024) // 1GB
new InputStreamEntity(Channels.newInputStream(hugeFile.getChannel())) // :(

Describe the solution you'd like
Just a simple HttpRequestWithBody#body(InputStream) would be great. It was even referenced in the past as a possible feature, but looks like no one finally did this:

https://github.com/Kong/unirest-java/issues/248#issuecomment-441503513

It shouldn't be that hard, as InputStream is already implemented in internals as one of available BodyPart, just not exposed as an public API.
Describe alternatives you've considered
Just using another http client for such a case, as literally every client I know support such an option, e.g. Apache's HttpClient:
def put = new HttpPut(url("/large.binary").toString())
put.setEntity(new InputStreamEntity(Channels.newInputStream(hugeFile.getChannel())))
def response = client.execute(put)

This IS actually supported (sort of) as a named param file https://github.com/Kong/unirest-java/blob/main/unirest/src/test/java/BehaviorTests/MultiPartFormPostingTest.java#L64
It's true there is not a method as a raw body octet stream (not a named file)

Yeah, but parametrized files are a part of forms to upload multiple files, it's slightly different case than just a huge body of the request itself I guess 🤔

this is released in 3.13.0. Try it out and let me know what you think. You can also add a progress monitor to it (though it doesn't know the total size of the stream of course, so you just get the bits written and the total of bytes written on each chunk.

Works like a charm for me now :)

https://github.com/dzikoysk/reposilite/blob/c38cee03571101016342568fe7550c97758825a8/reposilite-backend/src/test/kotlin/com/reposilite/maven/MavenIntegrationTest.kt#L73


cli: add --version flag

Add a --version flag to the top-level popper command.

What shall be the purpose of this flag and how should it differ from the command version  which displays the Popper version and exits?

thanks @WJayesh ! The purpose is similar to the popper version command. We can take this opportunity to have docker version be more informative about other things. For example, this is what docker-compose does:

$ docker-compose version
docker-compose version 1.8.1, build 878cff1
docker-py version: 1.10.3
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013

$ docker-compose --version
docker-compose version 1.8.1, build 878cff1

so we could take this opportunity to add build info (the SHA1 of the repo) to the output of --version, and add more info about dependencies to version.
So, in summary, we can add --version and expand on the info --version and version provide as part of this issue, or we can only work on making them equivalent (and then we can open an issue for the other more informative stuff).
please let me know if you have any question

Thanks!  I like the suggestion of making it a two step process. I'll first replicate the functionality of version to --version and then expand on the info provided by version as the next step


Add Branch name title to Git Widget

Branch name is the only element in Git widget without tooltip.
Fixing it and simplifying some logic in setState method.

Hi @hun1ahpu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

This has been fixed in the new SCM feature, sorry for not merging it in!


TC Meeting on 2024-02-15

The OpenRail Technical Committee is holding a weekly meeting. The agenda is prepared in issues and the protocols are stored in the meetings folder.
Agenda 2024-02-15
From last meeting

Discuss what is needed to define requirements for project governance (https://github.com/OpenRailAssociation/technical-committee/issues/8)
Project badges

New topics

Questions from prospective member
Organize onboarding of OSRD

Please add additional topics or any other comments by commenting on this issue.

Proposed topic: Answer to the questions from the ÖBB regarding interoperability:

In wich style do we answer
How to proceed

Protocol added in https://github.com/OpenRailAssociation/technical-committee/pull/29


Add 'ALLOWS' preamble to generated file

Description
I would suggest to add an option or to directly add this preamble to the generated Rust code:
// Automatically generated by fl2rust
#![allow(unused_variables)]
#![allow(unused_mut)]
#![allow(unused_imports)]
#![allow(clippy::needless_update)]

This removes the necessity to create an intermediate file with that preamble that must include the generated file, which is awkward.
Temporary work-around
As a work-around, here is how I modified the build.rs example to make it work (removing the OUT_DIR which is not defined by the tools and should be modified for each project):
Note: the build.rs file must be in the same directory as Cargo.toml, NOT in the src directory!
use std::fs;
use std::io::{Read, Write};
use std::path::Path;

pub const ALLOWS: &str = "// Automatically generated by fl2rust
#![allow(unused_variables)]
#![allow(unused_mut)]
#![allow(unused_imports)]
#![allow(clippy::needless_update)]";

fn main() {
    println!("cargo:rerun-if-changed=src/myuifile.fl");
    let g = fl2rust::Generator::default();
    let src_filename = Path::new("src").join("myuifile.fl").into_os_string();
    let dst_filename = Path::new("src").join("myuifile.rs").into_os_string();
    g.in_out(&src_filename, &dst_filename).expect("Failed to generate rust from fl file!");

    let mut f = fs::File::open(&dst_filename).expect("Failed to open generated file");
    let mut buf = String::new();
    f.read_to_string(&mut buf).expect("Failed to read generated file");

    let mut f = fs::File::create(&dst_filename).expect("Failed to overwrite generated file");
    write!(f, "{}", ALLOWS).unwrap();
    write!(f, "{}", buf).unwrap();
}

Unfortunately it has to read the whole content and re-write the generated file, but it's fine to store that in a buffer as long as the generated file is not too large.
Version
fl2rust doesn't show a version, but it must correspond to the crate version 0.4.17

Hi
I've added a new option which allows to generate the Rust file with the directives preamble:
fn main() {
    println!("cargo:rerun-if-changed=src/myuifile.fl");
    println!("cargo:rerun-if-changed=src/myuifile.rs");
    let g = fl2rust::Generator::default();
    g.in_out_with_directives_preamble("src/myuifile.fl", "src/myuifile.rs").expect("Failed to generate rust from fl file!");
}

It won't be the default though since the convention with generated files is to include them from OUT_DIR, that's how bindgen does it for example.

It works well, thanks a lot!
Curiously now the OUT_DIR is set when I test it, I have no idea why it wasn't working yesterday. Perhaps a quirk with the IntelliJ plugin, perhaps I did something wrong? It also detects when to run the script correctly, which it wasn't yesterday.


Add format output for role grant and update

Summary
The following PR adds support for setting the output format for commands role grant and role update.
Change Type
Mark the type of change your PR introduces:

[ ] Bug fix (resolves an issue without affecting existing features)
[x] Feature (adds new functionality without breaking changes)
[ ] Breaking change (may impact existing functionalities or require documentation updates)
[ ] Documentation (updates or additions to documentation)
[ ] Refactoring or test improvements (no bug fixes or new functionality)

Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist:

[x] Reviewed my own code for quality and clarity.
[ ] Added comments to complex or tricky code sections.
[ ] Updated any affected documentation.
[ ] Included tests that validate the fix or feature.
[ ] Checked that related changes are merged.

coverage: 54.398% (+0.005%) from 54.393%
when pulling 6ef4bfc5b1067eaf05011c04a472750d32e794c0 on code
into 3518a0c6d79c5e2607a58762e6f4dd3ba6f54de9 on main.


Run Windows tests only for releases

This is an alternative to PR #11153. Instead of removing Windows tests entirely, let's keep them but only run them for the release branch / release tags, so we can still catch permanent Windows problems for those.
Signed-off-by: Julius Volz<EMAIL_ADDRESS>

Oh right, that's a good point!

Removed the check from the required ones for main, merging.


Bug: Recently the HomeBridge plugin (and the Home App) has mismatched status for my curtains

Describe The Bug
Recently the HomeBridge plugin (and the Home App) has mismatched status for my curtains. I can still use Siri to initiate curtain actions. But the status never updates. I can't use the Homebridge or Home app to move the curtains. Since the status doesn't match, it won't move the curtains. Again, this only started recently. My curtains have been working perfectly for months. I changed the bug title because i don't think it really reflected what's happening. I think it's this "Error: No characteristics available" that's more relevant.
To Reproduce
Open or close the curtains from the Siri or the SwitchBot app
Expected behavior
HomeBridge pliugin and Hiome app should reflect curtain status
Relevant log output
First I'm submitying log excerpts with standard logging because some of these messages don't show up with debug logging:

[30/01/2023, 13:47:47] [SwitchBot] Curtain: Living Room Curtain Checking Status ...
[30/01/2023, 13:48:14] [SwitchBot] Living Room Curtain Target Position: 100
[30/01/2023, 13:48:55] [SwitchBot] Curtain: Living Room Curtain Checking Status ...
[30/01/2023, 13:48:56] [SwitchBot] Error: Failed to discover services and characteristics: DISCONNECTED
[30/01/2023, 13:48:56] [SwitchBot] Curtain: Living Room Curtain Retrying
[30/01/2023, 13:48:57] [SwitchBot] Error: No characteristics available.
[30/01/2023, 13:48:57] [SwitchBot] Curtain: Living Room Curtain Retrying
[30/01/2023, 13:48:58] [SwitchBot] Error: No characteristics available.
[30/01/2023, 13:48:58] [SwitchBot] Curtain: Living Room Curtain Retrying
[30/01/2023, 13:48:59] [SwitchBot] Error: No characteristics available.
[30/01/2023, 13:48:59] [SwitchBot] Curtain: Living Room Curtain Retrying
[30/01/2023, 13:49:00] [SwitchBot] Error: No characteristics available.
[30/01/2023, 13:49:00] [SwitchBot] Curtain: Living Room Curtain Retrying
[30/01/2023, 13:49:01] [SwitchBot] Curtain: Living Room Curtain failed BLEpushChanges with BLE/OpenAPI Connection, Error Message: "No characteristics available."
[30/01/2023, 13:49:01] [SwitchBot] Curtain: Living Room Curtain Using OpenAPI Connection to Push Changes

Now log with debug turned on.
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "FD1E6D06B532",
                        "configDeviceName": "Living Room Curtain",
                        "hide_device": false,
                        "configDeviceType": "Curtain",
                        "connectionType": "BLE/OpenAPI",
                        "scanDuration": 5,
                        "curtain": {
                            "set_minStep": 10,
                            "set_min": 5,
                            "set_max": 96,
                            "setOpenMode": "0",
                            "setCloseMode": "0"
                        },
                        "refreshRate": 30,
                        "logging": "standard"
                    },
                    {
                        "deviceId": "98F4AB2F20EE",
                        "configDeviceName": "Bedroom Humidifier",
                        "hide_device": false,
                        "configDeviceType": "Humidifier",
                        "connectionType": "OpenAPI",
                        "humidifier": {
                            "hide_temperature": true,
                            "set_minStep": 33
                        },
                        "logging": "standard"
                    }
                ],
                "refreshRate": 120,
                "logging": "standard"
            },
            "platform": "SwitchBot"
        },
    ]
}

Screenshots
No response
Device & Model
SwitchBot Curtain V2 (Firmware 6.0)
Node.js Version
v18.13.0
NPM Version
v8.19.3
Homebridge Version
v1.6.0
Homebridge Switchbot Plugin Version
v2.5.1
Homebridge Config UI X Plugin Version
v4.50.2
Operating System
Raspbian GNU/Linux Buster (10)

This error appears to be normal and occurs regularly on a Raspberry Pi, you should also see errors using noble directly or gatttool.

What's happening with this issue. It really does seem to be the same symptoms as bug #650. Restarting HomeBridge sets the curtain status correctly whether it's opened or closed. But that's it. The status in HomeBridge and the Home App does not change after that. I can initiate movement ONCE from Homebridge. But the status never updates so no movement initiation from Homebridge works after that. I can open/close the curtains using the SwitchBot app or siri shorcuts. But again, the status within Homebridge never updates.
I tried the latest beta, no change.
Again, this was working fine for me up until several days ago. I have no idea what changed.
Jeff

If you turn on debug logging you can the service data logged from https://github.com/OpenWonderLabs/homebridge-switchbot/blob/6707892/src/device/curtain.ts#L447.
The position value comes from this service data, even without any BLE connection errors the value will not be correct until Homebridge is restarted.
The CurrentPosition curtain characteristic is set from the value defined in https://github.com/OpenWonderLabs/homebridge-switchbot/blob/6707892/src/device/curtain.ts#L246 which is calculated based from the position value defined in https://github.com/OpenWonderLabs/homebridge-switchbot/blob/6707892/src/device/curtain.ts#L445 from the service data.

Thanks for the info. I'm not sure how that helps me. The debug output is posted above in this bug report.
Also, I tried switching to OpenAPI only and got the same results. I'll try that again with debug logging turned on.

When you are experiencing the issue, look at the service data before and after you restart Homebridge, you should see different position values.

As you can see above, the position info in the servicedata doesn't change even after the state of the curtain has physically changed.
Also, tested again with OpenAPI same results. But there is no serviedata logged for OpenAPI. But same result, position status does NOT change.

Unless I'm missing something, you haven't restarted Homebridge.
Here are the log excerpts where the status doesn't update until Homebridge is restarted, you can see the position value changes from 99 to 0 only after Homebridge is restarted. The issue is present without any BLE connection or characteristic errors.
After curtain is opened:
[02/02/2023, 23:59:57] [SwitchBot] [DEBUG] Curtain: Curtain No Changes, Set TargetPosition: 100
[02/02/2023, 23:59:57] [SwitchBot] [DEBUG] Curtain: Curtain value: 100, CurrentPosition: 0
[02/02/2023, 23:59:57] [SwitchBot] [DEBUG] Curtain: Curtain updateRate: 7
[02/02/2023, 23:59:57] [SwitchBot] [DEBUG] Curtain: Curtain BLEpushChanges
[02/02/2023, 23:59:57] [SwitchBot] [DEBUG] Curtain: Curtain BLE Address: xx:xx:xx:xx:xx:xx
[02/02/2023, 23:59:57] [SwitchBot] [DEBUG] Curtain Mode: Default Mode
[02/02/2023, 23:59:57] [SwitchBot] Curtain Target Position: 100
[02/02/2023, 23:59:58] [SwitchBot] [DEBUG] Curtain: Curtain Refresh Status When Moving, PositionState: 1
[02/02/2023, 23:59:58] [SwitchBot] [DEBUG] Curtain: Curtain BLERefreshStatus
[02/02/2023, 23:59:58] [SwitchBot] [DEBUG] Curtain: Curtain BLE Address: xx:xx:xx:xx:xx:xx
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain Done.
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain Config BLE Address: xx:xx:xx:xx:xx:xx, BLE Address Found: xx:xx:xx:xx:xx:xx
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain serviceData: {"model":"c","modelName":"WoCurtain","calibration":true,"battery":15,"inMotion":false,"position":99,"lightLevel":2,"deviceChain":2}
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain calibration: true, position: 99, lightLevel: 2, battery: 15, inMotion: false
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain connected: true
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain BLEparseStatus
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition 0
[02/02/2023, 23:59:59] [SwitchBot] Curtain: Curtain Checking Status ...
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain Standby, CurrentPosition: 0
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain Stopped
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition: 0, TargetPosition: 0, PositionState: 2,
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, Calculation:<PHONE_NUMBER>666666
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain BatteryLevel: 15, StatusLowBattery: 0
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentPosition: 0
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic PositionState: 2
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic TargetPosition: 0
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic BatteryLevel: 15
[02/02/2023, 23:59:59] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic StatusLowBattery: 0
[03/02/2023, 00:00:04] [SwitchBot] [DEBUG] Curtain: Curtain setNewTarget true timeout
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain BLEparseStatus
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition 0
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain Standby, CurrentPosition: 0
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain Stopped
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition: 0, TargetPosition: 0, PositionState: 2,
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, Calculation:<PHONE_NUMBER>666666
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain BatteryLevel: 15, StatusLowBattery: 0
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentPosition: 0
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic PositionState: 2
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic TargetPosition: 0
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic BatteryLevel: 15
[03/02/2023, 00:00:05] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic StatusLowBattery: 0
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain BLERefreshStatus
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain BLE Address: xx:xx:xx:xx:xx:xx
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain Config BLE Address: xx:xx:xx:xx:xx:xx, BLE Address Found: xx:xx:xx:xx:xx:xx
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain serviceData: {"model":"c","modelName":"WoCurtain","calibration":true,"battery":15,"inMotion":false,"position":99,"lightLevel":2,"deviceChain":2}
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain calibration: true, position: 99, lightLevel: 2, battery: 15, inMotion: false
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain connected: true
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain BLEparseStatus
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition 0
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain Standby, CurrentPosition: 0
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain Stopped
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition: 0, TargetPosition: 0, PositionState: 2,
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, Calculation:<PHONE_NUMBER>666666
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain BatteryLevel: 15, StatusLowBattery: 0
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentPosition: 0
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic PositionState: 2
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic TargetPosition: 0
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic BatteryLevel: 15
[03/02/2023, 00:00:12] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic StatusLowBattery: 0

After Homebridge is restarted:
[03/02/2023, 00:00:17] [Homebridge UI] Homebridge restart request received
[03/02/2023, 00:00:17] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process
[03/02/2023, 00:00:17] [Homebridge UI] Sending SIGTERM to Homebridge
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain BLEparseStatus
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition 0
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain Standby, CurrentPosition: 0
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain Stopped
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition: 0, TargetPosition: 0, PositionState: 2,
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, Calculation:<PHONE_NUMBER>666666
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain BatteryLevel: 15, StatusLowBattery: 0
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentPosition: 0
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic PositionState: 2
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic TargetPosition: 0
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic BatteryLevel: 15
[03/02/2023, 00:00:19] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic StatusLowBattery: 0
[03/02/2023, 00:00:22] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[03/02/2023, 00:00:27] [HB Supervisor] Restarting Homebridge...
[03/02/2023, 00:00:27] [HB Supervisor] Starting Homebridge with extra flags: -I
[03/02/2023, 00:00:27] [HB Supervisor] Started Homebridge v1.6.0 with PID: 1278
....
[03/02/2023, 00:00:35] [SwitchBot] Initializing SwitchBot platform...
[03/02/2023, 00:00:35] [SwitchBot] Restoring existing accessory from cache: Curtain DeviceID: XXXXXXXXXXXX
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Using Device Config Logging: debug
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Using Platform Config refreshRate: 120
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Using Default Curtain updateRate: 7
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Using Default scanDuration: 7
[03/02/2023, 00:00:36] [SwitchBot] Curtain: Curtain Config: {"set_min":10,"set_max":90,"hide_lightsensor":false,"set_minlux":1,"set_maxlux":6001,"connectionType":"BLE","logging":"debug"}
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain BLERefreshStatus
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain accessory.context.FirmwareRevision: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain device.firmware: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain this.platform.version: 2.1.1
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain accessory.context.FirmwareRevision: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain device.firmware: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain this.platform.version: 2.1.1
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Add Light Sensor Service
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Add Battery Service
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain BLE Address: xx:xx:xx:xx:xx:xx
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentPosition: 0
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic PositionState: 2
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic TargetPosition: 0
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain CurrentAmbientLightLevel: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain BatteryLevel: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain StatusLowBattery: undefined
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Config BLE Address: xx:xx:xx:xx:xx:xx, BLE Address Found: xx:xx:xx:xx:xx:xx
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain serviceData: {"model":"c","modelName":"WoCurtain","calibration":true,"battery":15,"inMotion":false,"position":0,"lightLevel":2,"deviceChain":2}
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain calibration: true, position: 0, lightLevel: 2, battery: 15, inMotion: false
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain connected: true
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain BLEparseStatus
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition 100
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Standby, CurrentPosition: 100
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain Stopped
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain CurrentPosition: 100, TargetPosition: 100, PositionState: 2,
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, Calculation:<PHONE_NUMBER>666666
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain LightLevel: 2, CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain BatteryLevel: 15, StatusLowBattery: 0
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentPosition: 100
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic PositionState: 2
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic TargetPosition: 100
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic CurrentAmbientLightLevel:<PHONE_NUMBER>666666
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic BatteryLevel: 15
[03/02/2023, 00:00:36] [SwitchBot] [DEBUG] Curtain: Curtain updateCharacteristic StatusLowBattery: 0

I definitely restarted HomeBridge. And I also thought this may a duplicate of 650 and I said so above. But in 650 it seemed to be a new setup. Mine's been up and running for a very long time.
And I didn't notice any updates on 650.

I got a little bit desperate so I completely deleted and uninstalled the Switchbot plugin. I then re-installed it and ended up with the same issue. Something got seriously broken. The only time the plugin status matches the physical status is right after a restart.

I used SirI shortcuts for the convenience. I get the same issue if I use the SwitchBot app. After I restart HomeBridge. when the status is synced up, I can use Homebridge to initiate movement.  The debug logs show status refreshes. But nothing updates.

Have you tried an older version?

An older version of tvOS?

No the this plugin.

Yes. It was one if the first things I tried.
I just tried again. Went back to v2.3.2. No change.
P.S. I tried finding a way to downgrade my HomePod Mini, but so far no luck.

Node.js v18.14.0 just released: no change.
Can I make a general suggestion regarding logging. When debug logging is turned on, it should also include standard logging (like most other implementations of anything I've seen do). It's tough to analyze things when entries you see in the standard log do not appear when debug is turned on.
For example, these seemingly important error messages don't get logged when debug logging is turned on:
[04/02/2023, 09:21:16] [SwitchBot] Error: No characteristics available.
[04/02/2023, 09:21:16] [SwitchBot] Curtain: Living Room Curtain Retrying
[04/02/2023, 09:21:17] [SwitchBot] Error: No characteristics available.
[04/02/2023, 09:21:17] [SwitchBot] Curtain: Living Room Curtain Retrying
[04/02/2023, 09:21:18] [SwitchBot] Error: No characteristics available.
[04/02/2023, 09:21:18] [SwitchBot] Curtain: Living Room Curtain Retrying
[04/02/2023, 09:21:19] [SwitchBot] Curtain: Living Room Curtain failed BLEpushChanges with BLE/OpenAPI Connection, Error Message: "No characteristics available."
[04/02/2023, 09:21:19] [SwitchBot] Curtain: Living Room Curtain Using OpenAPI Connection to Push Changes

It does include both. Just doesn't add [DEBUG] at the beginning.

Any clues as to what else to try here or what's going on with the curtains?

I haven't had time to look

Any update on this issue (and the seemingly related ones)? It's been broken for quite some time now.
Thanks in advance.

Plugin v2.5.2, no change.

Have you tried recalibrating?

Have you tried recalibrating?

I have not. The curtains work fine from the app and from Siri shortcuts. But I'll try re-calibrating.

Re-calibrated. Re-started Homebridge. Still get this:
[11/02/2023, 11:40:20] [SwitchBot] Living Room Curtain Target Position: 0
[11/02/2023, 11:40:21] [Hue] heartbeat 26, drift 723
[11/02/2023, 11:40:21] [SwitchBot] Error: Failed to discover services and characteristics: DISCONNECTED
[11/02/2023, 11:40:21] [SwitchBot] Curtain: Living Room Curtain Retrying
[11/02/2023, 11:40:22] [SwitchBot] Error: No characteristics available.
[11/02/2023, 11:40:22] [SwitchBot] Curtain: Living Room Curtain Retrying
[11/02/2023, 11:40:23] [SwitchBot] Error: No characteristics available.
[11/02/2023, 11:40:23] [SwitchBot] Curtain: Living Room Curtain Retrying
[11/02/2023, 11:40:24] [SwitchBot] Error: No characteristics available.
[11/02/2023, 11:40:24] [SwitchBot] Curtain: Living Room Curtain Retrying
[11/02/2023, 11:40:25] [SwitchBot] Error: No characteristics available.
[11/02/2023, 11:40:25] [SwitchBot] Curtain: Living Room Curtain Retrying
[11/02/2023, 11:40:26] [SwitchBot] Curtain: Living Room Curtain failed BLEpushChanges with BLE/OpenAPI Connection, Error Message: "No characteristics available."
[11/02/2023, 11:40:26] [SwitchBot] Curtain: Living Room Curtain Using OpenAPI Connection to Push Changes

Have you tried removing your config? For your curtains? And then rebuilding it after restart?  For your curtains? And then rebuilding it after restart? I have never seen this:

Yes. In fact I completely deleted and uninstalled the SwitchBot plugin and then reinstalled it to start from scratch. Exact same symptoms.
Also, I see a few other bug reports here that seem to describe the same or similar issues (e.g. 650, 652, 653).

I'm at my wit's end here.
Besides everything else I tried, today:
Split the grouped curtains into individual sides. Cleared the cache and added the curtains back. Same results!
Tried this again, the "default" BLE/OpenAPI, BLE only, OpenAPI only. All fail!
Last ditch effort: Installed HomeBridge on a spare PI4b I had on hand. Only installed the SwitchBot plugin. Incredibly, the exact same failure!

Resolved (sort of)
This is a little crazy. As a next attempt, I deleted the curtains using the SwitchBot app then deleted the curtain from the Homebridge app cache. I re-added the curtains (and the grouping) using the switchbot app. Recyled homebridge. The curtains were added back but still failed.
Lastly, I went in to the config.json and deleted all of settings for the curtain device. Cleared the cache. Restarted and voila!, the curtains are working. Pretty crazy since I haven't changed any of the curtain parameters in months!
Now I started adding back my custom settings one by one. Got everything back to exactly how it was except "connectionType": "OpenAPI"; When I switched that back to "connectionType": "BLE/OpenAPI", the errors were back. But this time going back to OpenAPI worked again.
So It's really unclear what was going on and especially switching to OpenAPI only didn't resolve it in the first.

I spoke too soon!!!!!!!!
It just stopped working again!

The issue of the advertising data not updating is reproducible with just node-switchbot but only on Linux (macOS is not affected). It seems that maybe there is some low-level Napi code that is holding onto a reference until the Node process exits.
Earlier versions of node-switchbot also seem to be affected, but due to the version not being pinned, it's possible that issues are introduced even when the version of homebridge-switchbot is the same. What do you think about pinning the version @donavanbecker?
Here is a crude solution that uses another process to get accurate advertising data:
//switchbot.js
console.log('Scanning...')
const Switchbot = require('node-switchbot');
let switchbot = new Switchbot();

switchbot
  .startScan({id: 'xx:xx:xx:xx:xx:xx'})
    .then(() => {
    switchbot.onadvertisement = (ad) => {
      console.log(ad.serviceData.position)
    };
    return switchbot.wait(3000);
  })
  .then(() => {
    switchbot.stopScan();
  });

//main.js
const { fork } = require('child_process');

const scan = async () => {
    const forked = fork('switchbot.js');
    await new Promise(r => setTimeout(r, 3000));
    scan();
}

scan();

@dnicolson If it is neeeded, I am fine with it.

@donavanbecker, I assume you mean forking a new process and not pinning the version of node-switchbot? Are you at least able to reproduce the issue?

@donavanbecker, I assume you mean forking a new process and not pinning the version of node-switchbot? Are you at least able to reproduce the issue?

I don't have an issue with the status of my curtains, never have.

This issue along with #650, #652, and #653 relates to Raspian, are you also using it?

@dnicolson I use macOS

That is to be expected. As mentioned in https://github.com/OpenWonderLabs/homebridge-switchbot/issues/666#issuecomment-1435055296, macOS is not affected by this issue.

@dnicolson If you open a pull request to pin it, I will accept it.

https://github.com/OpenWonderLabs/homebridge-switchbot/pull/678 pins the node-switchbot dependency.
About the Raspian BLE issue, I'm leaning more toward investigating https://github.com/abandonware/noble than resorting to forking the process.
In the meantime, maybe closing the duplicate issues and highlighting that this is a Raspian issue may help give focus to a future fix.

#678 pins the node-switchbot dependency.

Done

I can confirm that https://github.com/abandonware/noble/pull/297 resolves the issue when manually applying the noble changes to v2.5.2.
v2.5.3.beta.9, which downgrades noble to version 1.9.2-15 also works.

Is it possible to get a v2.5.3 release @donavanbecker?

I think this issue can be closed now.