text:
ZHA: aqara magnetic door sensor aq2 changes zigbee type

After pairing the lumi.sensor_magnet.aq2 with ZHA, it consists of a thermometer (sensor.lumi_lumi_sensor_magnet_aq2_0321adb5_1_1026) and a binary_sensor (binary_sensor.lumi_lumi_sensor_magnet_aq2_0321adb5_1_6). Then after a restart of HA (or after one day without restart, not sure) the thermometer is lost and the binary_sensor became a switch (switch.zha_0321adb5_1_6). But the switch still reflects the state of the binary_sensor.

Are you still running locally modified code? If so, it’s going to make this tough to reproduce. I have a bunch of these and I’m not experiencing this. I’m going to need screen shots of the before and after for the device card in the zha config panel to start and the signature for the device. The temperature sensors were purposefully removed from these because they aren’t accurate and xiaomi’s own hub doesn’t use it.

a screenshot like this? (but it's from 2 different sensors)
and yes I have partially modified code. what USB stick do you use?

HUSBZB-1 for the stick, that should be irrelevant though. Your issue is that the quirk is applied on one and not the other. The real question is why? Get the signature for the one that doesn’t. My guess is that the “bad” one failed to read model and manufacturer during joining based on the entity ids the sensors have (zha_0321...) after you collect the signature:
Remove the device using the zha config panel. Press the button after issuing the command and watch the logs for the message that the device left the network. Wait about 2 minutes and restart HA. Then pair the device again following the pairing instructions for Xiaomi devices (you have to press the button every few seconds until the device joins). I will say that you’re running an outdated version of HA / ZHA and there were some changes added to improve the Xiaomi pairing experience.

They devices pair fine. Then after a restart the binary_sensor becomes a switch. The first screenshot is before the restart, the second screenshot after restart. Same device.
So that means that the device is not stored correctly in the .storage after shutdown.

It’s losing the quirk application. Manufacturer and model come from the zigbee db and have absolutely nothing to do with anything in .storage. All of this happens in Zigpy at startup before the device is even given to HA. The code is here: https://github.com/zigpy/zigpy/blob/e536d03d94bb020c00e726d71fb0d301d6ad9d53/zigpy/application.py#L54
This spits out matching logs when attempting to apply quirks. You should have a section of logs that explain exactly why the quirk isn’t applied.

When I stop HA, sometimes I see an exception in SQL handling (sqlalchemy) telling that the database was opened in a different thread then the one writing to it. But its not showing which HA component is causing this.
These are the endpoints in zigbee.db:

The clusters:

The attributes:

I don’t know what to tell ya. It’s obvious that the quirk isn’t applying. There should be logs that state why. All of this happens outside of HA before the device is handed off to HA. The quirks matching logs are where I would start. As for your db issue... have you modified anything there? Are you sure HA is stopping cleanly before you restart it? That SQL error is concerning but I’ve never seen it and no one else is reporting it.

switch (switch.zha_0321adb5_1_6)

Judging by the new entity id, it lost model and manufacturer, but it is in the zigbee.db check the logs during zha startup, it would tell you why the quirks are not applied.
No other component but zha (zigpy) uses the Zigbee DB. Are you sure it is not because you opened database in SQL browser?

the logs during startup:
2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 5 value: b'lumi.sensor_magnet.aq2' 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 1 value: 3 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 7 value: 3 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 1 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 65281 value: b'\x01!\xd1\x0b\x03(%\x04!\xa8\x13\x05!\xdf\x00\x06$\x01\x00\x00\x00\x00\n!\x858d\x10\x00' 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 1 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 0 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 100 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 7 value: 200 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 1008 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 2504 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 33 value: 160 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 32 value: 29 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 65281 value: b'\x01!\xc7\x0b\x03(#\x04!\xa8\x13\x05!a\x00\x06$\x05\x00\x01\x00\x00\n!\xdcdd\x10\x01' 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 3 value: 11272 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 4 value: 47324 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 4092 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 32 value: 28 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 3886 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 2555 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 33 value: 145 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 0 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 0 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 0 value: 254 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 32 value: 27 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 33 value: 130 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 1291 value: 4 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 3 value: 24939 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 4 value: 24701 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 7 value: 370 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 32 value: 28 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.appdb] Attribute id: 33 value: 200 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.smartthings.SmartthingsMultiPurposeSensor'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2} ... 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.magnet_aq2.MagnetAQ2'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2} 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.motion_aq2.MotionAQ2'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2} 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.motion_aq2b.MotionAQ2'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2} 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.remote_b286acn01.RemoteB286ACN01'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1, 2, 3]) {1, 2} 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.sensor_swit.SwitchAQ3V2'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2} 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.sensor_switch_aq3.SwitchAQ3'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2} 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zhaquirks.xiaomi.aqara.switch_aq2.SwitchAQ2'> 2019-08-04 15:10:34 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1]) {1, 2}

What version are you running? This is not the latest upstream. If you want to report an issue you would need to reproduce it with the upstream version. The easiest way to ensure there's no other "versions" interference is to run HA in docker with official image

Ok I understand.
So I have to close this?

You don’t “have” to do anything... it’s just nearly impossible for us to help you when we’re trying to diagnose issues with a system that isn’t in a known state. so, you have .94 of HA modified, the newest Zigpy and quirks 0.0.19? Are you sure you’ve always had the venv active when installing libs?

Upss...wait...I have one zigpy package from pip3 and one within HA and they are not the same version?

That’s also concerning...
I’m trying to help, but I really don’t want to chase something that may not be an issue... why not create another venv and start it using the dB and config from this one? That should help you determine if the venv you have is messed up or if the issue is localized to your custom setup.

I have no venv, and I uninstalled zhaquirks and zigpy from pip3. They were not used anyway. So I don't have the newest zigpy and quirks. Now I have .94 with bugs in zigpy which are fixed meanwhile, yes?
Is it correct that during startup, zigpy expects 1 endpoint for the aqara device, but it finds 2 from zigbee.db so it does not apply aq2 quirks?

That is a good question. The device only has one endpoint. Your DB screenshot only showed 1 Endpoint... so the log doesn’t correlate to the DB which is odd.

That was the wrong device. The reason is that the model is not matching. The device has model 'lumi.sensor_magnet.aq2', but the signatur is model None. In https://github.com/zigpy/zigpy/blob/dev/zigpy/quirks/xiaomi/init.py, there is no model defined for AqaraOpenCloseSensor.

Huh? The signature is only model none of something screwed up the dB or the device didn’t pair correctly. Your screenshots clearly show the IEEE for the device and that data in the database so I’m not sure what you’re trying to say...

It is this code in zigpy/quirks/init.py getdevice():
       if not all([device[eid].model == sig[eid].get('model', device[eid].model) for eid in sig.keys()]):             _LOGGER.debug("Fail because model mismatch on at least one endpoint")             continue
The loop over device[eid] is wrong, it should be a loop over endpoints. But "eip" is the index into the signatures attributes.
But ok this is old code, in the current zigpy version is it completly different.

If that were true your screenshots (which clearly show a match previously - included again below so you can see the one I mean) would be impossible

and we would have had a ton of reports of this not working in .94 which we didn’t. At this point I don’t think I can help with this “issue” any longer.

The device pairs fine but when restoring from zigbee.db, the model ist lost so the quirks is not applied.
But I see now that the current code is completely different and the model moved from the endpoint to the device. So we cannot do much here.

Your log shows quirks matching for a device with two endpoints. But your DB snapshot clearly shows only a single endpoint. Which one is wrong? DB snapshot also clearly shows manufacturer and model attributes in the database, but it fails to load it?
This is quite severe bug and I'm sure we would have heard from others if that was the case, but ATM everything points it to being specific to your environment.

earlier you mentioned warnings about concurrent access to zigbee db from different threads. This could cause the issue you are seeing if zigpy fails to save manufacturer/model to DB. You would need to figure out that 1st. But on the flip side, your DB screenshot showed that data was saved successfuly, so it is not clear.

Remove the device from HA (to force full discovery) and join it again. Make sure the database is not accessed by anything else, like sql browser etc.
take a note during the discovery the number of endpoints being detected and whether each endpoints reads successfuly model & manufacturer info
Make a copy of  zigbee.db
run sqlite zigbee-db-copy.db .dump | grep 21:ad:d5 and confirm it saved the information for all endpoints

Hello, thank you for your advise. The log output was wrong, it was not from the aqara device, it was some other device. But you cannot see this in the log.
The problem was in appdb.yp this code:
                        if cluster == Basic.cluster_id and attrid == 5:
                            if isinstance(value, bytes):
                                value = value.split(b'\x00')[0]
                                dev.model = value.decode().strip()
                            else:
                                dev.model = value

This is the up to date version and it fixed the problem that sometimes there is a type mismatch or in the name there are hex '0'. I adapted the above code and now it works fine.
(in the old version the condition "if bytes or not" was missing)
Thank you again.

you must have a "soup" of zigpy versions. HA 0.94.x uses zigpy-homeassistant==0.3.3 and that version of zigpy stores model & manufacturer attributes as bytes and https://github.com/zigpy/zigpy/blob/f66500ba612d8193dddb57bf2b2f2fed35739a61/zigpy/appdb.py#L225-L230 splits the bytes by NULL char and decodes it as ASCII. This definitely would be reported by others as that particular sensor is quite popular and used by many. I also have this sensor and did not have any problem with it during 0.94 version development.

I had zigpy-homeassistant 0.7 installed with pip3. I thought installing newer packages with pip3 would fix bugs in older versions. I removed 0.7 now.

authors: Adminiuga dmulcahey martin3000


text:
IKEA Tradfri errors

Home Assistant 0.101.3
My setup produces errors in tinydtls.py.
After a couple of hours running, Home Assistant seems to lose control over Tradfril lights as they no longer react to Lovelace switching on of off. Restarting HA does not solve  this, resetting the trader gateway is necessary.
Error below:
2019-11-21 10:06:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Nov 21 10:06:45 raspberrypi hass[12290]: Traceback (most recent call last):
Nov 21 10:06:45 raspberrypi hass[12290]:   File "/srv/homeassistant/lib/python3.7/site-packages/aiocoap/transports/tinydtls.py", line 157, in _run
Nov 21 10:06:45 raspberrypi hass[12290]:     yield from self._connecting
Nov 21 10:06:45 raspberrypi hass[12290]: concurrent.futures._base.CancelledError
Nov 21 10:06:45 raspberrypi hass[12290]: During handling of the above exception, another exception occurred:
Nov 21 10:06:45 raspberrypi hass[12290]: Traceback (most recent call last):
Nov 21 10:06:45 raspberrypi hass[12290]:   File "/srv/homeassistant/lib/python3.7/site-packages/aiocoap/transports/tinydtls.py", line 169, in _run
Nov 21 10:06:45 raspberrypi hass[12290]:     self.coaptransport.new_error_callback(-1, self)
Nov 21 10:06:45 raspberrypi hass[12290]:   File "/srv/homeassistant/lib/python3.7/site-packages/aiocoap/protocol.py", line 203, in _dispatch_error
Nov 21 10:06:45 raspberrypi hass[12290]:     for key, (monitor, cancellable_timeout) in self._active_exchanges.items():
Nov 21 10:06:45 raspberrypi hass[12290]: AttributeError: 'NoneType' object has no attribute 'items'

Hope someone can resolve this, all help appreciated.
Regards, ahartman

Weirdest effect of all is, that when switching off a light in Lovelace, the light stays on and the Lovelace switch reverts on its own to 'on' after a few seconds.

this behavior with the switches/lights reverting back to the previous known state usually happens if the device is not online. could you look for the switches/lights under states in the developer tools menu and see what it says there?

The behaviour occurred again. Devices are on line and could be controlled reliably in the states page.
It seems that the correspondence between the Lovelace UI buttons and the states got lost.
My iPhone indicates device not available.
Hope this helps you in resolving this.
regards, ahartman

I am also having this issue in HA. Switch turns off the light but the switch bounces back on (light stays off however). This makes the use of flux or circadian lighting nearly impossible as they keep turning lights on on every update cycle because they get "on" status for the light.
From circadian lighting faq I understood that one reason for this behavior is that the gateway does not give status change confirmation fast enough so ha reverts the state to previous state despite action was complete.
From this I can imagine a simple solution: wait for state change confirmation a little longer, assuming the confirmation will come eventually.

I have had enough of this. My conclusion is that the Circadian somehow confuses the Tradfri gateway.  Last night one of my children came to me complaining that his lights kept switching on during the night after he switched them off. I found that the Tradfri gateway - again - needed restarting.
So, I de-installed the Circadian add-on and programmed circadian behaviour myself in Node-RED. We will see what happens; anybody interested in the Node-RED may drop me a line and I will send it. It is not really complex at all if you put some time in understanding.

In my experience, most problems relating to tradfri stopping to work (I´ve been able to reproduce this locally, but normally don´t experience the problem myself) is related to sending to much traffic through to the gateway.

I also had a lot of problems with tradfri crashing while using hass 0.101.x
The only thing that helped for me was going back to hass 0.97.2 I'm now running stable for at least a week again.
There seem to be a lot of problems with tradfri and the newest versions of hass.

I also had a lot of problems with tradfri crashing while using hass 0.101.x
The only thing that helped for me was going back to hass 0.97.2 I'm now running stable for at least a week again.
There seem to be a lot of problems with tradfri and the newest versions of hass.

I have a simple automation that has been working for months, but recently stopped working. It turned my Tradfri bulb off at midnight (on the condition that it is on). Now I have removed that condition, and it seems to work again. But in the Lovelace UI, the light remains off all the time. So state detection seems to be broken.

I took out the Circadian module by programming this functionality myself in Node-RED. That helps but the IKEA gateway still needs resetting about once a week. Whoever programmed that interface seems not even to read this issues thread.
Home Assistant: nice stuff, unfortunately for me useless because of the Tradfri interface.
Bye bye Home Assistant, welcome Homebridge.

source: gharchive/issue

authors: AdighaLogic ahartman evanvruggink ggravlingen mattsches ronkeli

repo: home-assistant/home-assistant

license_type: permissive

license_source: github-api


text:
Better errors from unknown secrets

Description:
Clear up errors from unknown secrets.

During real startup this now raises a single error. During check_config this is also clear if secrets fail
Better --secrets for unknown
Align check_Config config load error with bootstrap

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with lazytox. Your PR cannot be merged unless tests pass

Is it related: https://github.com/home-assistant/home-assistant/issues/12998 ?

Great 👍
Would it be possible to add an option to ignore secret errors. My use-case: I have a config (gitlab) repo with CI pipelines that on every push, first checks the config for errors and then deploys it to my Home Assistant production and staging instances. As a responsible citizen, I of course don't store secrets like db urls in the repo, so I use the !secret directive. The problem with that is that the automatic check_config CI script fails every time I add a new secret because it doesn't know about them. I'm currently solving this with a secrets.check.yaml file with dummy secrets that automatically gets moved to secrets.yaml for CI, but that's kind of cumbersome.
It would be perfect if it were possible to simply ignore missing secrets errors, but I also understand if adding options like this could eventually bloat the check_config script. Thanks!

@OttoWinter something I can look at, I would have to remove some of my conditional secret mocking and it sometimes breaks validators - a bigger problem than what I tried to so here.
Secrets are not always password- like you say full urls and those could be validated later
A bigger PR would be adding some attr to secrets and then handling it as such in print only, not during validation...

Another option might be adding “mute” or “none” to the existing —info cmdline to suppress all config printing - only errors(which are safe)
Not as nice as the first option, but will work for you

I think this issue might be relevant:
https://github.com/home-assistant/home-assistant/issues/12998

@kellerza Yeah I kinda don't want my CI server have all production secrets. I mean it's all a private setup with no outside access. So in the end it wouldn't be that big of a problem to have all secrets in CI scripts, but I'm trying to stick to best practices for learning more about production setups.

@dgomes not quite, but I do have another PR in the works that will (as a side effect) fix that issue. I added a comment there.

source: gharchive/pull-request

authors: OttoWinter dgomes kellerza


text:
Migrate CONF_WEBHOOK_ID to homeassistant.const

Description:
CONF_WEBHOOK_ID = 'webhook_id' is currently defined in the webhook automation as well as the ifttt component. As part of #15376, I was going to add it to the mailgun component as well (and it will likely be needed in other components as well as they migrate to use the new webhooks). I think it makes more sense to be be a part of the homeassistant.const package since it is shared.
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass

@fabaff - I noticed a couple of instances in ifttt where webhook_id is used directly as a string still (example). Okay to swap it over to the constant in this pull request or would a new one be preferred for that?

You can do it in this PR, would be faster than waiting for two round of CI to pass.

Great, should be ready to go then!

I don't think we should change the webhook_id used out of context of configuration to CONF_WEBHOOK_ID e.g., those usage in your last two commits

I don't think we should change the webhook_id used out of context of configuration to CONF_WEBHOOK_ID e.g., those usage in your last two commits

That was one of the things I was also concerned about. Is it acceptable to create a new constant under the ID section and then use that for CONF_WEBHOOK_ID as well as the places that are not actually configuration?
Something like this:
WEBHOOK_ID = 'webhook_id`'
CONF_WEBHOOK_ID = WEBHOOK_ID

No. Just leave the automation as-is. Let's not start aliasing constants.

authors: awarecan balloob fabaff rohankapoorcom


text:
Move components to folders

Description:
Was experimenting with swapping the load order around, and it can fail if components are not in their own folder. So this moves all components into their own folder.

Going to merge this now, as it might cause some PRs to need merge/rebase. Better do it sooner rather than later.


text:
Add each fronius sensor as own template

Breaking Change:
Description:
This update adds the often used templates to the state engine per default and hides the overall components. The reason is that there is almost no use case without the templates and they are tricky yet repetitive to define.
Related issue (if applicable): as an example issue 11 on the libraries page
Pull request with documentation for home-assistant.io:  home-assistant/home-assistant.io#10025
Example entry for configuration.yaml (if applicable):

Checklist:

[x] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[x] The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
[x] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
[x] Untested files have been added to .coveragerc.

Please rebase to solve the merge conflict.

authors: MartinHjelmare nielstron


text:
Add documentation for logger.set_level service

Description:
Add missing description for logger.set_level service in services.yaml
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

tested locally with success.


text:
[IT] Add person HassGetState intent

Add support for person HassGetState for the Italian language

Allright, looks good now. Thanks!

authors: Ingordigia auanasgheps

repo: home-assistant/intents


text:
hassio_audio proper log handling, less spamming

Problem
The hassio_audio container continuously outputs info and debug data, that puts unnecessary load on downstream systems and contribute to reducing the lifespan of SD's / SSD's.
It is not possible (to my knowledge) to set the log level for hassio_audio. It does not seem to support the Home Assistant standard that allows the log level to be set in the Logger Integration in configuration.yaml, as explained in the Logger documentation.
Request

Remove the -vvv PulseAudio run parameter, to make the output less verbose. Or make it configurable.
Add a timestamp to the PulseAudio messages --log-time[=BOOL]
Set the correct level for stdout / stderr messages raised to journald. Currently ALL hassio_audio messages are raised as level 3 (i.e. error), whether "D" (debug), "I" (info), or "E" (error).
Support the Logger directive to allow the user to set the output log level, e.g. critical / error / info / debug.
Maybe this can be achieved using the "--log-level" PulseAudio command parameter?

Additional Information
Home Assistant logger filter setting has no effect on hassio_audio
Current logger settings in configuration.yaml.
logger:
  default: critical
  logs:
    homeassistant.core: fatal

Even with the log settings above, below are typical "D" (debug) and "I" (info) messages output by hassio_audio, retrieved from the Docker logs for the container. The "critical" default setting has no effect on the filtering of messages from hassio_audio. Or is there an (undocumented) setting that actually works to filter only real error messages?
docker logs audio_hassio
...
I: [pulseaudio] client.c: Created 14 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Client authenticated anonymously.
D: [pulseaudio] protocol-native.c: Protocol version: remote 34, local 34
D: [pulseaudio] protocol-native.c: SHM possible: no
D: [pulseaudio] protocol-native.c: Negotiated SHM: no
D: [pulseaudio] protocol-native.c: Disabling srbchannel, reason: No SHM support
I: [pulseaudio] client.c: Freed 14 "supervisor"
I: [pulseaudio] protocol-native.c: Connection died.
...

hassio_audio raises ALL messages as errors, regardless of their real level.
Below are the same hassio_audio log records, this time retrieved using journalctl.
NOTE:

In the journalctl command below only errors were retrieved (parameter -p err).
The messages returned from journalctl are information ("I") and debug ("D") level messages, but with an error log level.

journalctl CONTAINER_NAME=hassio_audio -p err

-- Logs begin at Mon 2021-03-08 22:43:29 CET, end at Sat 2021-03-13 12:44:51 CET. --
...
Mar 10 00:05:12 RPiHome 5941937722e7[584]: I: [pulseaudio] client.c: Created 14 "Native client (UNIX socket client)"
Mar 10 00:05:12 RPiHome 5941937722e7[584]: I: [pulseaudio] protocol-native.c: Client authenticated anonymously.
Mar 10 00:05:12 RPiHome 5941937722e7[584]: D: [pulseaudio] protocol-native.c: Protocol version: remote 34, local 34
Mar 10 00:05:12 RPiHome 5941937722e7[584]: D: [pulseaudio] protocol-native.c: SHM possible: no
Mar 10 00:05:12 RPiHome 5941937722e7[584]: D: [pulseaudio] protocol-native.c: Negotiated SHM: no
Mar 10 00:05:12 RPiHome 5941937722e7[584]: D: [pulseaudio] protocol-native.c: Disabling srbchannel, reason: No SHM support
Mar 10 00:05:12 RPiHome 5941937722e7[584]: I: [pulseaudio] client.c: Freed 14 "supervisor"
Mar 10 00:05:12 RPiHome 5941937722e7[584]: I: [pulseaudio] protocol-native.c: Connection died.
...

And the first record from the above output, now shown verbose to confirm PRIORITY=3:
journalctl CONTAINER_NAME=hassio_audio --since "2021-03-10 00:05:00" --until "2021-03-10 00:06:00" -o verbose

-- Logs begin at Mon 2021-03-08 22:43:29 CET, end at Sat 2021-03-13 12:44:51 CET. --
Wed 2021-03-10 00:05:12.194229 CET [s=e0ae8b76d4cd495caeca4d33ba3702ea;i=2ba;b=285f795042f04f8588bbdd5ce295afd7;m=15418de86b;t=5bd22952310d4;x=37ce5b2c89d83e4]
    _BOOT_ID=285f795042f04f8588bbdd5ce295afd7
    _MACHINE_ID=be042b18af4b495ca4957bfef9e53bfd
    _HOSTNAME=RPiHome
    _UID=0
    _GID=0
    _SYSTEMD_SLICE=system.slice
    _TRANSPORT=journal
    _CAP_EFFECTIVE=1ffffffffff
    PRIORITY=3
    _PID=584
    _COMM=dockerd
    _EXE=/usr/bin/dockerd
    _CMDLINE=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
    _SYSTEMD_CGROUP=/system.slice/docker.service
    _SYSTEMD_UNIT=docker.service
    _SYSTEMD_INVOCATION_ID=02eb6c5d4ad24576bd16a7252e7c8803
    CONTAINER_NAME=hassio_audio
    CONTAINER_TAG=5941937722e7
    IMAGE_NAME=homeassistant/armv7-hassio-audio:2021.02.1
    SYSLOG_IDENTIFIER=5941937722e7
    CONTAINER_ID=5941937722e7
    CONTAINER_ID_FULL=5941937722e730a3f0045de4a539addcca6209c9ef10d227499d2d843bebe0e0
    MESSAGE=I: [pulseaudio] client.c: Created 14 "Native client (UNIX socket client)"
    _SOURCE_REALTIME_TIMESTAMP=1615331112194229
...

Regarding request (3): "Set the correct log level for stdout / stderr messages raised to journald. Currently ALL hassio_audio messages are raised as level 3 (i.e. error), whether "D" (debug), "I" (info), or "E" (error)."
I just want to confirm that Docker does support logging stdout and stderr](https://docs.docker.com/config/containers/logging/) as different log levels in journald.

The stdout stream is logged with priority 6, which is the LINUX level for "information".
The stderr stream is logged with priority 3, which is the LINUX level for "error".

Do the following quick test to verify that Docker will assign different priorities to STDOUT and STDERR messages:

Connect and run a Bash shell in the hassio_audio container.
Output test messages to both stdout and stderr (using the stream of the process running as PID 1).
Confirm the priority of the two messages that were logged in journal, using journalctl.

# Connect as Bash, then send messages to both stderr and stdout.

docker exec -it hassio_audio bash
bash-5.1#
bash-5.1# echo "TESTING STDERR" >> /proc/1/fd/2
bash-5.1# echo "TESTING STDOUT" >> /proc/1/fd/1
bash-5.1#
bash-5.1# exit

---

# Search journalctl for all hassio_audio messages logged in the past hour, containing "TESTING" in the message.

journalctl CONTAINER_NAME=hassio_audio -S -1h | grep "TESTING"

---

# Search journalctl for all hassio_audio messages logged with PRIORITY 6 (i.e. log level "information"):
# (The "TESTING STDOUT" message should be in the output.)

journalctl CONTAINER_NAME=hassio_audio PRIORITY=6

---

# Verify the priority of the two "TESTING.." messages in the log detail.

journalctl CONTAINER_NAME=hassio_audio -S -1h  -o verbose

please, can you do something about it? This thing is logging like crazy and I don't even have audio enabled on pi.

@luka6000  As a workaround you could consider to implement this shell script. Or you can borrow the idea/adjust the shell script and do something yourself.
The key thing that it does is to change the PulseAudio run parameters inside the hassio_pulseaudio container after the container (re)started, then kill PulseAudio. PulseAudio will automatically be restarted, with the new parameters, and now only log error level messages (including a log timestamp).
These are the Docker commands executed from the host OS:
# update the PulseAudio parameters in the run file in the hassio_audio container:
docker exec -i hassio_audio sed -i 's/-vvv/--log-level=0 --log-time=true/' /run/s6/services/pulseaudio/run

# stop PulseAudio in the hassio_audio container:
docker exec -i hassio_audio pkill pulseaudio

I just got a disk space warning that I chased down to 4GB of exactly this. I'm surprised that this issue has been open for so long.

Is there a way to disable this pugin entirely? My Home Assistant is running on a headless machine that does no audio processing.
I don't think I need to label the graph to show the point at which the plugin started to cause issues with log size

Added pull request #85

authors: JJFourie luka6000 tylerszabo

repo: home-assistant/plugin-audio


text:
Cannot block accessory restoring from cache

Describe The Bug
In the dynamic plugin template, when Homebridge starts up, it calls the plugin constructor which in turn calls discoverDevices(). discoverDevices() "loop[s] over the discovered devices and register each one if it has not already been registered" after which it "loop[s] over the cached accessories and unregister each one if it is not in the config".
As my plugin cannot verify the configuration in the event that it is modified by hand in the JSON editor, discoverDevices() is the only time when it can verify that the configuration for each individual accessory is valid. If the configuration is invalid, it logs this fact along with the current configuration and the invalid fields. For example the accessory Test Blinds below:
[12/18/2024, 8:55:32 PM] [Virtual Accessories Platform] Deserialized accessory: {"accessoryID":"7105131","accessoryName":"Test Blinds","accessoryType":"windowcovering","windowCoveringDefaultState":"closed"}
[12/18/2024, 8:55:33 PM] [Virtual Accessories Platform] Skipping accessory. Configuration is invalid: {"accessoryID":"7105131","accessoryName":"Test Blinds","accessoryType":"windowcovering","accessoryIsStateful":false,"accessoryHasResetTimer":false,"accessoryHasCompanionSensor":false,"windowCoveringDefaultState":"closed","errorFields":["transitionDuration"]}
[12/18/2024, 8:55:33 PM] [Virtual Accessories Platform] Invalid fields: transitionDuration

At this point, the plugin has detected that a field has an invalid value and it cannot guarantee that the accessory will not potentially take down the entire Homebridge. Therefore it refuses to continue setting up the accessory and no handlers are created for it. It then moves on to try to load the next accessory.
However, Homebridge still creates the accessory:

And this accessory happily carries on, although it does nothing (as there are no handlers) and it's state is not updated:

Short of deleting the accessory (and all the havoc that causes in HomeKit), the accessory must not be loaded in a seemingly functional condition. Instead the accessory should show a status of Not Responding.
This behavior is provided in the individual accessory handler:
  async getOn(): Promise<CharacteristicValue> {
    ...
    // if you need to return an error to show the device as "Not Responding" in the Home app:
    // throw new this.platform.api.hap.HapStatusError(this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE);
    ...
  }

However, this makes two assumptions:

the (unverified) configuration is valid
the accessory class can be safely instantiated and configured

If either of the assumptions above are incorrect, then there should be a way for a plugin to signal to Homebridge that a particular accessory cannot be safely created.
For example a method could be added to indicate the status:
PlatformAccessory.setAccessoryStatusBad();

At which point a dead tile should then be displayed:

Logs
No response
Config
No response
Homebridge UI Version
5.0.0-beta.22
Homebridge Version
1.8.5
Node.js Version
22.12.0
Operating System
macOS
Environment Info
Using hb-service
Raspberry Pi Model
None

However, this makes two assumptions:

the (unverified) configuration is valid
the accessory class can be safely instantiated and configured

There are two conditions where the above can occur and where there is nothing that the plugin can do to recover gracefully:

The plugin is unable to deserialize the config.devices json into an object tree. This is either an issue with the configuration that Homebridge has not detected, or it's a problem with the plugin code. In this situation, accessory setup should not continue so as not to foul the user's HomeKit setup
The plugin has detected that two plugins have been assigned the same UUID. The plugin keeps track of UUIDs and has determined that an accessory is using a UUID that has already been used by another accessory. In this situation, duplicate UUID will cause unexpected behavior, and accessory setup should not continue so as not to foul the user's HomeKit setup

Working from a worst case scenario where the plugin cannot deserialize the configuration (and therefore has no information about the devices), it does receive in discoverDevices() the list of devices registered with Homebridge:
accessories: PlatformAccessory[]
Drilling down into each PlatformAccessory, the plugin can retrieve:
hapServices Service[] = PlatformAccessory._associatedHAPAccessory.services
and for each hapService the plugin can get the HomeKit UUID for the services:
hapService.UUID
At this point there is no path forward. Although Service.ts in HAP-NodeJS contains all of the services, there is no way to retrieve a service is by its UUID and therefore no way to find out the "type" of the accessory ("switch", "doorbell", etc) so as to construct a "non responsive" accessory which registers handlers that return
throw new this.platform.api.hap.HapStatusError(this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE);
as recommended in the template.
There are two options:

Add a method to Service.ts to get the service (or service string) by UUID and use this in a factory to build the "non responsive" accessory
Harvest the HomeKit UUIDs from Service.ts and use the UUIDs themselves in the factory to build the "non responsive" accessory

repo: homebridge/homebridge-config-ui-x

license: MIT


text:
Added support framework

In Cordova 9, Android will not build correctly without the support services framework added to the plugin. I required this as a dependency and it builds correctly and runs all of the features. This should fixes #145 #148

This works.

authors: Corrodian danpastori

repo: homerours/cordova-music-controls-plugin

license: mit

license_source: bigquery


text:
Unit inverse contraction

Suppose we have an invertible unit. Then you can definitely contract it and its inverse:

Now consider this snake:

This contracts to the picture above, but then if you try to annihilate them it fails with "label inconsistency".

Action dump leading to the buggy contraction:  homotopy_io_actions.txt

Thanks @doctorn for discovering this (or rather a slightly different version of this).

This doesn't seem to happen if you contract the snake first. It seems that pulling the unit through the snake doesn't preserve its label neighbourhood.

Yes, sorry I should've explained that better.

Indeed this does seem to be the case:

(Grey is the result, black is the original)
In fact, this problem can be observed even from this simple contraction:

The label corresponding to 3 is gone entirely, which is a big issue. I took this directly from the output of the tool. I don't think we observed this problem when we were thinking about how collapse should work on the board, so I would conclude that this is an implementation issue rather than a conceptual one.

It looks to me like this is a fundamental problem. If you compute the equivalence classes, the equivalence class for 3 is isolated in the middle so it basically disappears. This is very worrying.

Yes I agree an entire label class disappears. The conclusion in my view is that we should not allow this contraction. This is easy to detect: every equivalence class should "survive" in the contracted diagram.

If there was a weak unit present that would allow the transpose to be constructed correctly.

From the diagrams Nick drew and my very fuzzy intuition it looks like the unit is only rotating a quarter turn and not a half turn. My expectation would be that this takes two moves to contract: the first performs a quarter turn leaving u in a 'cap-like' state where the left-hand input is a unit and the right-hand input is the wire; the second would then complete the yanking and straighten out. In this view 3 would survive the first quarter turn and consequently survive the second.
Is this total nonsense?

@doctorn that's what Jamie means by allowing a weak unit. It makes perfect sense in the theory, but a design choice we made was to not allow for weak units in the tool (at least, so far), because it adds a lot of complexity to the term language.

Oh wow! I'm very pleased I'm not completely lost! What would he involved in supporting weak units like this?

It's analogous to giving up the property that every term is normalized; previously, we relied on this property to implement a sort of type checking, but now we're doing that in a different way and it might not be such an issue anymore. None of the design conflicts with supporting weak units (and arguably any such decision would be kind of wrong, theoretically), but there just hadn't been a compelling reason to do so yet, and if possible we should try to avoid it.

Yes I agree an entire label class disappears. The conclusion in my view is that we should not allow this contraction. This is easy to detect: every equivalence class should "survive" in the contracted diagram.

I think we should just do typechecking, instead of an ad-hoc solution particular to this example. There could be other examples of illtyped contractions that this might not catch.

That could be the case. However I think it is certain that, if a contraction discards a particular label, it will never typecheck. So if we can check this at an earlier stage and reject the contraction early, that will be good.

I really think it's better and probably easier to just implement typechecking. And it would put us in a better place with regards to preventing bugs like this.

And checking that labels don't disappear is a crucial part of typechecking: the simplicial map from the neighbourhood to the canonical neighbourhood needs to be subjective.

I agree with you completely that typechecking would catch this, and that it would be good to implement typechecking. However a significant potential advantage of the labelled approach is that typechecking may ultimately be unnecessary -- that is, we may be able to achieve the property that if the collapse goes through, the resulting diagram is guaranteed to typecheck. Indeed there are good reasons to believe this should be possible. So to the extent that we can preserve this property within the collapse algorithm, and it is easy to do so, I think we should.

Implementing type-checking doesn't preclude switching it off later if/when we're sure collapse doesn't produce ill-typed diagrams. It may also be useful for debugging anyway so I tend to agree with Calin that it's probably worth implementing.

I think that both proposals lead to a theory in which this contraction of this shape doesn't exist:

I have a sketch of what this contraction might look like in the presence of weak units. I had thought that it would only be necessary to introduce a weak unit in the singularity of the contraction, but I think that's not sufficient. I think we would need weak units in the source of the contraction and the target generated by expansion also.

It seems as though the expansion generated from contraction in this instance would not be unique, unless I made a mistake somewhere.

I'm at the airport and I had some time to sketch this down.
Basically, I think the contraction should be allowed and it should go as follows:

This is geometrically motivated and it also typechecks.
Now the question is how do we get this contraction. I don't think this requires any changes to collapse base as the cocone is already computed correctly. The problem is in collapse recursive. The way we compute the target diagram assumes that the forward/backward rewrites of the target cospan are equal to the side flanges (which is clearly not the case in this example).
We observed something similar with the T-shaped DAGs but our solution to that was ad-hoc and doesn't apply here.
Honestly, I have no idea how we could solve this, which really worries me.

I don't think it type checks. Consider the tetrahedron constructed from the bottom left vertex in the source diagram (labelled x), and one of the bottom triangles on the right with boundary labels 1, 3, 5. This tetrahedron also has an edge labelled 2, the one that takes the point on the left to the highest dimensional generator. So we have a tetrahedron with 1, 3, 5, 2 among its edge labels. But no such tetrahedron can type check.
I maintain my earlier proposal: this does not contract, in the absence of the weak unit.

Nick thanks for your nice pictures, maybe you can explain next week in a meeting, I have some questions.

I don't think this contraction would type check. Consider the tetrahedron constructed from the bottom left vertex in the source diagram (labelled x), and one of the bottom triangles on the right with boundary labels 1, 3, 5. This tetrahedron also has an edge labelled 2, the one that takes the point on the left to the highest dimensional generator. So we have a tetrahedron with 1, 3, 5, 2 among its edge labels. But no such tetrahedron can type check.
I maintain my earlier proposal: this does not contract, in the absence of the weak unit.

You're right. In that case, I agree with you that this should not contract.

Yes I agree an entire label class disappears. The conclusion in my view is that we should not allow this contraction. This is easy to detect: every equivalence class should "survive" in the contracted diagram.

I just realised that the contraction of a 1D endomorphism with its inverse does not satisfy this.

Yes I agree an entire label class disappears. The conclusion in my view is that we should not allow this contraction. This is easy to detect: every equivalence class should "survive" in the contracted diagram.

I just realised that the contraction of a 1D endomorphism with its inverse does not satisfy this.

So we should just do typechecking. The example in this issue does not typecheck because it has a simplex which is invalid.

Will be fixed by #703.

Now that we have typechecking, the following is no longer contractible:

We agreed this is the desired result (as there is no way to make this contraction typecheck), so I am closing the issue.

Very good thank you Calin.

authors: NickHu calintat doctorn jamievicary

repo: homotopy-io/homotopy-rs


text:
dll not found exception:mediapipe_c

hello,
i have successfully built the .so file and placed it in SDK/Plugins, i have also downloaded the require tflite files and txt files and placed them under SDK/Models.
I am testing out the handtracking gpu on windows. when i press play i get:
DllNotFoundException: mediapipe_c
Mediapipe.CalculatorGraph..ctor (System.String configText) (at Assets/Mediapipe/SDK/Scripts/CalculatorGraph.cs:13)
DemoGraph.Initialize () (at Assets/Mediapipe/Examples/Scripts/DemoGraph.cs:22)
Director+d__10.MoveNext () (at Assets/Mediapipe/Examples/Scripts/Director.cs:47)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <3dc54541a2574ac7826a004a212a4332>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
and
DllNotFoundException: mediapipe_c
Director.OnEnable () (at Assets/Mediapipe/Examples/Scripts/Director.cs:19)
How to fix this?

DllNotFoundException is thrown in many cases so I'm not sure, but .so file might be broken.
Will you answer these questions?

Where did you build .so file and where is Unity run? (e.g. Ubuntu (WSL 2), Windows 10, etc...)
Please paste the command you run to build.
Can you run the official example?
https://google.github.io/mediapipe/solutions/hands

I built the .so file with ubuntu wsl,windows 10 and unity is run on windows 10 as well
I used
cd to navigate to mediapipeunity folder
bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 //mediapipe_api:mediapipe_c
for building.
I was able to build following this tutorial : https://dev.classmethod.jp/articles/mediapipe-environment-setting-windows/

i am not able to build the official ones because of some errors in android sdk and ndk setup but that shouldn't ever.

windows 10

OK. If you build the library on Linux, you have to run Unity on Linux too.
If you'd like to run Unity on Windows 10, you have to build the library on Windows 10 and in this case .dll file should be generated.
But unfortunately, I don't have time to test on Windows now, and some errors should be occurred.

ok so how do i build a dll?

hello, i changed my OS to ubuntu and i am still getting the error:
DllNotFoundException: mediapipe_c
Director.OnEnable () (at Assets/Mediapipe/Examples/Scripts/Director.cs:19)
DllNotFoundException: mediapipe_c
Mediapipe.CalculatorGraph..ctor (System.String configText) (at Assets/Mediapipe/SDK/Scripts/CalculatorGraph.cs:13)
DemoGraph.Initialize () (at Assets/Mediapipe/Examples/Scripts/DemoGraph.cs:22)
Director+d__10.MoveNext () (at Assets/Mediapipe/Examples/Scripts/Director.cs:47)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /home/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Director:SetWebCamDevice(Nullable`1) (at Assets/Mediapipe/Examples/Scripts/Director.cs:41)
DeviceSelectorController:OnValueChanged(Dropdown) (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:31)
DeviceSelectorController:ResetOptions(WebCamDevice[]) (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:25)
DeviceSelectorController:Start() (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:16)
DllNotFoundException: mediapipe_c
Director.OnDisable () (at Assets/Mediapipe/Examples/Scripts/Director.cs:29)
Unable to set resolution 1920 x 1080 for EasyCamera: EasyCamera (/dev/video0)
UnityEngine.WebCamTexture:Play()
WebCamScreenController:ResetScreen(Nullable1) (at Assets/Mediapipe/Examples/Scripts/WebCamScreenController.cs:29) Director:SetWebCamDevice(Nullable1) (at Assets/Mediapipe/Examples/Scripts/Director.cs:35)
DeviceSelectorController:OnValueChanged(Dropdown) (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:31)
DeviceSelectorController:ResetOptions(WebCamDevice[]) (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:25)
DeviceSelectorController:Start() (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:16)
can you confirm handtracking gpu/cpu works on desktop?

Here is a sample video (running on GPU).
https://twitter.com/eulerdora/status/1302991294919180289
At latest commit (https://github.com/homuler/MediapipeUnityPlugin/commit/dd942dab54a27b597bb2f89f2d5b9ab5c6e8f82a), now it depends on protobuf and it became more difficult to build... but instead I added a Makefile to automate the build process (its code quality is not good but must be better than none).
By the way, can you run the official tutorial (handtracking) on your machine?
I also would like to know if you can run the Hello World example (please be sure to include only pass_through_calculator).

Getting 49 errors as soon as I open the project.
Most of them are :
The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)
Google.Protobuf.IMessage' in explicit interface declaration is not an interface
Assets\Mediapipe\SDK\Scripts\Formats\LocationData.cs(169,26): error CS0115: 'LocationData.Equals(object)': no suitable method found to override
Am I supposed to import some plugin?
Also yes, the official handtracking is working for me.

Am I supposed to import some plugin?

Yes. Please run make before starting UnityEditor or build protocol buffer by yourself.
cf. https://github.com/homuler/MediapipeUnityPlugin#build

i get this when i run make
cd C && bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 //mediapipe_api:mediapipe_c && cd .. && mv -f C/bazel-bin/mediapipe_api/libmediapipe_c.so Assets/Mediapipe/SDK/Plugins
Starting local Bazel server and connecting to it...
INFO: Analyzed target //mediapipe_api:mediapipe_c (131 packages loaded, 5363 targets configured).
INFO: Found 1 target...
Target //mediapipe_api:mediapipe_c up-to-date:
bazel-bin/mediapipe_api/libmediapipe_c.so
INFO: Elapsed time: 8.733s, Critical Path: 0.85s
INFO: 1 process: 1 linux-sandbox.
INFO: Build completed successfully, 2 total actions
cd Submodules/protobuf/csharp && ./buildall.sh && mv src/Google.Protobuf/bin/Release/net45/* ../../../Assets/Mediapipe/SDK/Plugins
/bin/sh: 1: cd: can't cd to Submodules/protobuf/csharp
make: *** [Makefile:20: Assets/Mediapipe/SDK/Plugins/Google.Protobuf.dll] Error 2
the last line says error 2. is that supposed to happen?

Please checkout submodules
https://git-scm.com/book/en/v2/Git-Tools-Submodules

Ok, the errors are gone but now it's back to the old errors
DllNotFoundException: mediapipe_c
Director.OnEnable () (at Assets/Mediapipe/Examples/Scripts/Director.cs:19)
DllNotFoundException: mediapipe_c
Mediapipe.CalculatorGraph..ctor (System.String configText) (at Assets/Mediapipe/SDK/Scripts/CalculatorGraph.cs:13)
DemoGraph.Initialize () (at Assets/Mediapipe/Examples/Scripts/DemoGraph.cs:22)
Director+d__10.MoveNext () (at Assets/Mediapipe/Examples/Scripts/Director.cs:47)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /home/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Director:SetWebCamDevice(Nullable`1) (at Assets/Mediapipe/Examples/Scripts/Director.cs:41)
DeviceSelectorController:OnValueChanged(Dropdown) (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:31)
DeviceSelectorController:ResetOptions(WebCamDevice[]) (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:25)
DeviceSelectorController:Start() (at Assets/Mediapipe/Examples/Scripts/DeviceSelectorController.cs:16)
DllNotFoundException: mediapipe_c
Director.OnDisable () (at Assets/Mediapipe/Examples/Scripts/Director.cs:29)
Also, when I toggle on "Load on start up" in libmediapipe_c.so import settings the console shows:
Plugins: Couldn't open Assets/Mediapipe/SDK/Plugins/libmediapipe_c.so, error: Assets/Mediapipe/SDK/Plugins/libmediapipe_c.so: undefined symbol: _ZN2cv8fastFreeEPv

It looks like that opencv is not statically linked.
Which is your OpenCV version?

pkg-config --modversion opencv returns 3.4.12

OK. The installation path may be different from me.
Currently, this project assumes that OpenCV is installed under /usr/lib/.
https://github.com/homuler/MediapipeUnityPlugin/blob/master/C/third_party/linux_opencv_path.diff#L17
Is your OpenCV installed under /usr/lib/x86_64-linux-gnu/ ?

Yes, OpenCV is installed under /usr/lib/x86_64-linux-gnu/ and all the files exist as well

Will you try to comment out this line?
https://github.com/homuler/MediapipeUnityPlugin/blob/master/C/WORKSPACE#L21

Now im getting:
Plugins: Couldn't open Assets/Mediapipe/SDK/Plugins/libmediapipe_c.so, error: Assets/Mediapipe/SDK/Plugins/libmediapipe_c.so: undefined symbol: ZN2cv23getPerspectiveTransformERKNS_11_InputArrayES2
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Hmm... Does  /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so exist?

yes it does

I don't know why it fails, but will you try installing those packages again?
https://github.com/google/mediapipe/blob/master/third_party/opencv_linux.BUILD#L9
If it continues to fail, please paste the result of below command.
objdump -T /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so | grep getPerspectiveTransform

And please also restart UnityEditor after building the library.

the error is gone. the issue was with the opencv installation folder. well there was a usr/lib/86_64-linux-gnu but the files were actually installed in usr/local/lib. This issue is in ubuntu 20.04 only
"Ubuntu 20.04 may install the OpenCV and FFmpeg packages in /usr/local" - from https://google.github.io/mediapipe/getting_started/install.html
After changing the workspace paths to /usr/local the dll exception was gone!
There are two more errors actually. relating to the camera.
Error mapping buffer (4147200): Invalid argument
UnityEngine.WebCamTexture:Play()
Unable to queue capture buffers!
UnityEngine.WebCamTexture:Play()
My webcam is working properly

There are two more errors actually. relating to the camera.

The resolution settings might be invalid (e.g your camera may not support FHD (30FPS)).
https://github.com/homuler/MediapipeUnityPlugin/blob/master/Assets/Mediapipe/Examples/Scripts/WebCamScreenController.cs#L26
Will you try changing those values (DefaultHeight, DefaultWidth, FPS) from inspector window?

The camera is running after changing resolution.
Now im getting log errors:
Failed to fetch an output packet, rendering the input image
UnityEngine.Debug:LogWarning(Object)
DefaultGraphOnGPU:RenderOutput(Texture2D, Color32[]) (at Assets/Mediapipe/Examples/Scripts/DefaultGraphOnGPU.cs:19)
d__10:MoveNext() (at Assets/Mediapipe/Examples/Scripts/Director.cs:67)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

When you run a scene, some log files are created under Logs/Mediapipe and if you are lucky, mediapipe outputs some useful logs to them.
Are there any warning or error logs?

Do you mean MedipipeUnityPlugin/Logs? if not where can I find Logs/Mediapipe?
MedipipeUnityPlugin/Logs has only one log called packages update.log
which has
=== Wed Sep  9 13:34:44 2020
Packages were changed.
Update Mode: updateDependencies
The following packages were updated:
com.unity.2d.animation from version 3.2.1 to 3.2.2
com.unity.2d.psdimporter from version 2.1.3 to 2.1.4
com.unity.2d.spriteshape from version 3.0.10 to 3.0.12
com.unity.ide.vscode from version 1.2.0 to 1.2.1
com.unity.test-framework from version 1.1.13 to 1.1.16

I'm sorry, I thought I checked in Logs/Mediapipe/.gitkeep, but this file is ignored.
Will you pull the latest commit (https://github.com/homuler/MediapipeUnityPlugin/commit/2a383badf2502d897ad507241c3fc94dd0903956) and rerun the scene again?

I'm not sure but it is possibly a bug. Will you create another issue, please?
I'd like to investigate more closely.

Yes sure thank you very much for resolving the previous errors. Closing this issue now.

Thank you too for reporting the issue.
I'll update the document.

repo: homuler/MediapipeUnityPlugin


text:
APIKey Restriction

Hi, first of, great work that you're doing. The API is very simple to use.
The Issue: your api uses Google WebApi and not iOS SDK, the key restriction will not work as they are only supported in SDK version. It would be great if you can add such a feature.

@efsolInc  Hey! Thanks for your feedbacks!
This lib was created before the Google Maps' iOS SDK, so it uses Web APIs. For key restrictions, will it be possible to just use the iOS SDK directly?
I haven't checked what's the latest features in the iOS SDK. Feel free to make a PR! Thanks!

Close as there's no action item for key restriction fix.

authors: efsolInc honghaoz

repo: honghaoz/Swift-Google-Maps-API


text:
Add rolling pin

This PR adds a simulation environment rolling_env.py.
The main feature is that the robot (rolling pin) is not an "articulation" (robot with revolute/prismatic joint under PD control), but a free-floating single rigid body. We apply a wrench on this rolling pin directly.
Currently the dough seems quite stiff. It doesn't deform much under the pressure of the rolling pin. This could be because that the rolling pin controller is not stiff enough.
In the next PR I will try one-way coupling, that the rolling pin just follows a prescribed trajectory.

This change is

I am following the anzu repo convention. In anzu we often write code as quickly as possible, with partial test coverage.

Currently I am using yapf to reformat the code, would you recommend some other tools?
I haven't used google's python coding style, but that looks great. Let's enforce it here.
Anzu only has partial test coverage. How about we add tests if the new code is a "library", meaning it will be used as a utility function by several other code. For other code that are "application", we don't require tests. Does this sound good to you?


text:
android-apt:1.4' case databing error

In project's build.gradle,  android-apt:1.4' case databing error.
when id updata android-apt:1.8' ,it works OK.

I find android-apt:1.8 and butterknife's apt conflict,
then I change
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
to
apt 'com.jakewharton:butterknife-compiler:8.4.0'
,it works OK.

repo: hongyangAndroid/MPermissions


text:
Doesn't replace notification with xfce4-notifyd

It seems like xfce4-notifyd ignores toastify's --id option:
toastify send --debug --id 2 q
toastify send --debug --id 2 w

will show two notifications.
toastify-git v0.3.0.r14.gb81b6a0-1
xfce4-notifyd v0.6.1

that is sometimes up to the desktop environment how it handles this. I think I've seen this before.
there are two ways of "updating" a notification:

reuse the handle (like toastify does)
actually holding open the dbus connection and sending on the same connection again

I can't take any guarantees that xfce4-notifyd does what you want, but you could try out if it does when you update the notification using option 2. like in this example:
https://github.com/hoodie/notify-rust/blob/master/examples/update.rs#L71

On the other hand, it works well with notify-desktop and xfce4-notifyd
#!/bin/bash

notify() {
    file=/tmp/notify-id
    id=$(cat $file 2>/dev/null)

    notify-desktop -r "$id" -t 3000 "$@" | tee "$file"
}

notify "$(date)"
sleep 1
notify "$(date)"
sleep 1
notify "$(date)"
sleep 1
notify "$(date)"

(notification will be replaced)

🤔 interesting
thanks for the reproducer - can you tell if dbus-monitor "interface=org.freedesktop.Notifications" shows any difference?

I can't say there are some real differences like some flags are different, but notify-desktop outputs a new id if current id can't be replaced. But toastify doesn't output a new id.
I've tried reusing notify-desktop's id and pass id to toastify but it leads to an interesting result — toastify freezes completely.
Reproducer:
#!/bin/bash

notify() {
    file=/tmp/notify-id
    id=$(cat $file 2>/dev/null)

    notify-desktop -r "$id" -t 3000 "$@" | tee "$file"
}

toastify() {
    toastify send -t 3000 --debug --id "$(cat /tmp/notify-id)" "$@"
}

notify "$(date)"
sleep 1
toastify "$(date)"

authors: hoodie kovetskiy

repo: hoodie/toastify


text:
🛑 FWAw is down

In 8054d4d, FWAw ($FWA_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FWAw is back up in bcfc448 after 12 minutes.

repo: hoopybe/uptime


text:
🛑 FWAw is down

In b2088a5, FWAw ($FWA_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FWAw is back up in 2651877 after 13 minutes.


text:
Erasure coding: Failover of the ErasureCodingManager

The failover of the ErasureCodingManager needs to be properly implemented and tested. Right now, the leading NameNode will automatically takeover and execute the ErasureCodingManager in case a previously existing manager failed. However, running encoding or repair jobs are currently neither recovered nor aborted. This should be fixed by storing information about running jobs so that their state can be recovered.

It should be possible to recover the running encoding job by persisting their JobID. A newly started MapReduceEncodingManager then has to recreate the respective RunningJobs and report their state to the ErasureCodingManager. The Report should be extended to include the information necessary to delete this log entry after success or failure of the job. The ErasureCodingManager then needs to delete these log entries in the same transaction as it is using to update the state.

repo: hopshadoop/hops


text:
SHC is not working on Spark 1.6.2 and later

While trying to save Dataframe to HBase I'm getting an error
Caused by: java.lang.IncompatibleClassChangeError: Found class org.apache.spark.sql.catalyst.expressions.MutableRow, but interface was expected
    at org.apache.spark.sql.execution.datasources.hbase.Utils$.setRowCol(Utils.scala:61)
    at org.apache.spark.sql.execution.datasources.hbase.HBaseTableScanRDD$$anonfun$buildRow$1.apply(HBaseTableScan.scala:120)
    at org.apache.spark.sql.execution.datasources.hbase.HBaseTableScanRDD$$anonfun$buildRow$1.apply(HBaseTableScan.scala:101)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.mutable.ArraySeq.foreach(ArraySeq.scala:73)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at org.apache.spark.sql.execution.datasources.hbase.HBaseTableScanRDD.buildRow(HBaseTableScan.scala:101)
    at org.apache.spark.sql.execution.datasources.hbase.HBaseTableScanRDD$$anon$3.next(HBaseTableScan.scala:190)
    at org.apache.spark.sql.execution.datasources.hbase.HBaseTableScanRDD$$anon$3.next(HBaseTableScan.scala:180)
    at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
    at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
    at org.apache.spark.sql.execution.columnar.InMemoryRelation$$anonfun$3$$anon$1.next(InMemoryColumnarTableScan.scala:140)
    at org.apache.spark.sql.execution.columnar.InMemoryRelation$$anonfun$3$$anon$1.next(InMemoryColumnarTableScan.scala:130)
    at org.apache.spark.storage.MemoryStore.unrollSafely(MemoryStore.scala:285)
    at org.apache.spark.CacheManager.putInBlockManager(CacheManager.scala:171)
    at org.apache.spark.CacheManager.getOrCompute(CacheManager.scala:78)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:268)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:270)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:270)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:270)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    at org.apache.spark.scheduler.Task.run(Task.scala:89)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

It seems like SHC does not support new versions of Catalyst API
Is there any quick fix or workaround for that issue?
Especially it is interesting for current version of Spark 1.6.2 in HDP 2.5.

Could you share your code? For Spark2.0.*, please refer to this branch: https://github.com/hortonworks-spark/shc/tree/branch-2.0 (but we donot support it right now).

When will it be supported on Spark 2.x? What's the release date?

Branch-2.1 of SHC, which is for Spark 2.1.x, will may be released in February.

@weiqingy I am seeing that branch-2.1 is still actively developed. When is the release planned?

Hi, @gmermoud  We'll make the release after finishing the ongoing feature of supporting multiple secure HBase clusters, so it'll be released in one month around.

Hi @weiqingy ,
i want to use spark 1.6 version and java 7,  because of cluster environment setup so what version of shc should use for operation on hbase.

@AtulKumVerma
You can use v1.1.1-1.6 (https://github.com/hortonworks-spark/shc/releases/tag/v1.1.1-1.6). This release has already been in Hortonoworks repo, so you can use it directly by adding the following in the command line:
--packages com.hortonworks:shc-core:1.1.1-1.6-s_2.10 --repositories http://repo.hortonworks.com/content/groups/public/

The corresponding branch is: https://github.com/hortonworks-spark/shc/tree/branch-1.6

authors: AtulKumVerma gmermoud mkanchwala weiqingy zroslaw

repo: hortonworks-spark/shc


text:
CDPSDX-3120: Added Profiler Manager Service into a new medium duty sd…

…x blueprint and when CDP_DATA_LAKE_MEDIUM_DUTY_WITH_PROFILER Entitlement is enabled only then the sdx medium duty with profiler would be installed.
See detailed description in the commit message.

created this PR based on @subrat-mishra 's PR, he will test it and then we can merge it if everything is OK

repo: hortonworks/cloudbreak


text:
Disable Scheduler Configuration Mutation Api

Disable Scheduler Configuration Mutation Api. YARN Queue Manager is Technical Preview in CDP-7.0.2. This config is by default disabled and will be enabled when Queue Manager is installed by CM.
Have tested with launching a CM cluster using CloudBreak and the config is added properly in Safety Valve.

We've create rc-2.15 to deploy to dev, can you please change the base version to that one.

authors: PrabhuJoseph keyki


text:
CB-5908 - Fix datamart instance types on Azure

Fix instance types in datamart template on Azure:
Master:  D16_v3 -> E8_v3
Impala coordinator and executors:  D8_v3 -> E16_v3
Use less expensive instance type for master (but same memory size)
Increase size of coordinator and executor instances to match sizes used by Datamart on AWS and DWX

@drorke  we just deleted 711 can you please rebase your PR? I will merge it after that

authors: doktoric drorke


text:
Update Coverage Behaviour

Problem
Now for uploading coverage, campaign need to be assign coverage insight function and upload it in campaign detail in insights function coverage tab.
I think it is not quite right.
Solution
Move coverage insight function to be a single function like upload boundary, and editing is done in create/update like boundary.

@meomancer, I wonder whether we shouldn't have more coverage functions before making this call? Or at least let's look at how we are treating remote mapping.

@meomancer, I've come around to your initial suggestion, let's update it.

need to update wokflow for this method
cc @smit1678 @MariaSolovyeva

Let's bring this in line with https://camo.githubusercontent.com/059be333ead222a9cf9c36a41759c9fc703d1d97/687474703a2f2f6d6173686173747564696f2e6e65742f332d576f726b466c6f772d757064617465414f492e706e67

I missed this task detail, because it was assigned to meomancer before. Can you guys give me the detail again? @cchristelis @meomancer

Added in #223

authors: cchristelis dimasciput meomancer

repo: hotosm/field-campaigner


text:
Recreate time in tray images

closes #1478

The update is somewhat an improvement, but still not very legible and definitely not pretty.
I am currently looking into improving that based on that PR myself if that is okay for you?
I will concentrate on a monochrome aesthetic for now, I hope to have something to show soon.
A question that already came up for me:

How/where are the SVG base files transformed to the base PNG files?
Having that within the script might give additional possibilities and reduce the places icons are created from.

How/where are the SVG base files transformed to the base PNG files?

I believe I created them manually based on specifics for different OSes / trial error

A very first draft looks like this:

I have adapted the code (locally and not cleaned up yet), for the icons to look like this:

@hovancik should I prepare a complete change using this approach or do you dislike it?
I made some other improvements on the way:

limiting the width of the text
really (vertically) centering the text based on its actual dimensions

I add least put some of the change suggestions already into a branch (based on this branch): https://github.com/Wikiwix/stretchly/commit/b3927e1ebbcb48429cbea7cd1d95bd81c6ed073f

Looks nice! Please go ahead :)

Looks nice! Please go ahead :)

Alright, I will try to prepare the PR within this week :)
Should I just make a PR targeting trunk or should I make a PR targeting this PR's feature branch?

feel free going for trunk

Created a new PR: #1502

authors: Wikiwix hovancik

repo: hovancik/stretchly


text:
user not available within 'send' middleware when within a dialog (convo) and using botbuilder-adapter-web

When a bot sends a message to a user from within a dialog (convo), the user value appears to be missing from the message (at least when using the botbuilder-adapter-web).
In fact, in printing out the message out for debugging purposes, this is what shows up:
   { type: 'message',
     inputHint: 'acceptingInput',
     suggestedActions: { actions: [ [Object], [Object] ] },
     text: 'Should we resume the previous chat or start a new one?',
     channelData: { quick_replies: [ [Object], [Object] ] } }

As you can see, neither the 'user' nor the 'recipient' fields are available (each of them would give us useful user information).
Needless to say, send middleware is unable to do anything useful with this information, so I believe this is actually a bug. I noticed that there are a couple of prior, related issues created by @cbouvard : #2030 and #2043.   I'm hoping that #2043 can actually resolve this issue, as it stores the 'user' value in convo vars, but it is awaiting a review since September. It would be great if  somebody could please verify that this is actually a bug, and also review the submitted PR in #2043 in order to fix it . Better still, it would be best to have a solution that does not depend on the bot asking the user for their name during the interaction (so that it can be stored in the convo vars), as access to the 'user' value should be a given within send middleware.

Hey @pgoldweic 👋
Patricia, for your information, the code of the PR #2043 is operational. My bots have been working well in production since months 👌
I hope the PR will be merged soon to avoid managing a fork!

Thanks for commenting on this @cbouvard !  Does this work also when the first question is being asked by the bot within the convo,, before a user's response? (that is, is the user/userid already there?). And also, have you managed to get access to this info. from within the convo.before() method?

Yes, the user info is available at the very beginning of a conversation.
In the tiny project created for testing the PR (👉 here), you can check the
behavior by adding a simple console.log in the file features/pizza.js:
convo.before('default', (convo, bot) => {
    console.log('Here are the vars in convo:', convo.vars);
});

And I tested it with the Bot Framework emulator, it seems to be OK:
✅ Message received "Give me some pizza, Patricia 😉" with user c3dcc333-ee7b-4518-aa08-8b93bed06e32
Here are the vars in convo: { user: 'c3dcc333-ee7b-4518-aa08-8b93bed06e32',
  channel: 'f02c36a0-7dc9-11eb-9ffe-b53a872a3e35|livechat' }

Hope this helps!

Glad to hear this! Thanks again @cbouvard . Yes, I definitely hope that this gets merged soon!

authors: cbouvard pgoldweic

repo: howdyai/botkit


text:
feature request: support part time of day when crossing days

Sometimes we need the event across several days but are only available part-time during each day.
For example:
 {
    id: '1',
    title: 'presale',
    startDay: '2022-12-22',
    endDay: '2022-12-25',
    startTime: '09:00:00',
    endTime: '12:00:00'
  },

then the event draws as:

I haven't done this feature yet. Temporarily, you can use rrule to generate repeat events
Example:
import {rrulestr} from 'rrule';

const recurrenceEvents = [
  {
    id: '1',
    title: 'presale',
    color: 'red',
    start: '2022-12-24T06:00:00Z',
    end: '2022-12-24T08:00:00Z',
    recurrenceRule:
      'DTSTART:20221224T060000Z\nRRULE:FREQ=DAILY;UNTIL=20221226T000000Z;INTERVAL=1',
  },
];
let bookings = [];
recurrenceEvents.forEach(event => {
  const recurrenceRule = event.recurrenceRule;
  const rRule = rrulestr(recurrenceRule);
  const dates = rRule.all();
  // const dates = rRule.between(new Date(/**start*/), new Date(/**end*/)); //Get between start and end
  dates.forEach(date => {
    const customEvent = {...event}; //Custom event by date
    bookings.push(customEvent);
  });
});
console.log(bookings);

@howljs
fantastic！
thanks, man.

authors: howljs sapjax

repo: howljs/react-native-calendar-kit


text:
기존 코드 코틀린으로 변경

코틀린 공부하고 기존 코드를 코틀린으로 변경했습니다!
코틀린을 사용하는 코드에서 어색한 점이나 생각 해볼점 알려주시면 고쳐보겠습니다!
고민한 점
1. 코틀린에서 When 문법
자바에서 switch 문은 가독성 때문에 안티패턴이라고 알려져있습니다.
자바의 switch를 개선 시킨 것이 코틀린의 when 이라고 공부했습니다.
when 문을 공부하다보니 enum 을 사용할 때나 여러가지 측면에서 좋아진 것을 느꼈고 어떤 경우에는 "이게 더 가독성이 좋은데?" 라고 생각했습니다. 실제로 when을 많이 사용하는지 궁금합니당
2. if-else
if - else 문법은 클린코드에서 위배된다고 합니다.
그 이유는 else 부분을 해석하기 까지 시간이 걸리기 때문이죠.
public int max(int a, int b){
	if(a > b)return a;
	return b;
}

보통 이런식으로 자바에서 if-else를 사용합니다.
하지만 코틀린에서 if-else 는 expression이다.
fun max(a:Int, b:Int) : Int{
	if(a > b) return a
	return b
}

이렇게 쓸 수 도 있지만
fun max(a:Int, b:Int) : Int{
	return if(a > b) {
		a
	}else{
		b
	}
}

이렇게 쓸 수도 있습니다.
물론 else 의 가독성이 안좋은 건 비슷한 것 같지만 코틀린의 기능이 이를 expression으로 바꿔줬으니 쓰이나 궁금합니다.
3. Entity id 생성

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val id: Long = 0

이렇게 생성을 했는데요. 기본 값을 0으로 넣어야 하는 부분이 조금 찝찝해서 이렇게 해도 되는지,,
이렇게 id 를 넣고 db에 넣어도 auto-increment에 문제가 없는지 궁금합니다.
4. jpa 기본 생성자
jpa 의 리플랙션 때문에 기본생성자를 만들어야 했는데요!
protected constructor() : this(
    title = "",
    location = "",
    startAt = LocalDate.now(),
    endAt = LocalDate.now(),
    tag = Tag.JAZZ
)

이렇게 코드를 작성했습니다. 이것 또한 기본값 때문에 이게 맞나..라는 생각이 듭니다..

코틀린에서 When 문법
if문이 여러개로 길어지면 보통 when을 사용해서 처리해. 특히 enum 같은 경우는 when 사용을 권장하는데, enum을 추가 할 때 컴파일 레벨에서 로직에 빈틈을 잡아주는 역할도 할 수 있어.

if-else
이걸 어떻게 쓰냐에 따라 클린 코드에 위배 된다는 건 나는 좀 오버인 것 같아. 그냥 본인 편한대로 쓰면 되는 것 같아

Entity id 생성
0이나 null을 넣어주면 auto increment가 채워줄거야

jpa 기본 생성자
kotlin에서 spring, jpa을 쓸 때 기본 생성자가 필요해서, 보통 all-open이 포함된 plugin을 사용해서 직접 구현해야하는 수고로움을 덜 수 있어

if문이 여러개로 길어지면 보통 when을 사용해서 처리해. 특히 enum 같은 경우는 when 사용을 권장하는데, enum을 추가 할 때 컴파일 레벨에서 로직에 빈틈을 잡아주는 역할도 할 수 있어.

when 을 사용하며 여러 분기처리를 쉽게 바꿀 수 있는 것 같습니다. 이 떄문에 가독성이나 간결성을 잡으며 여러 분기 처리를 할 수 있는 것 같아요.
한가지 우려되는 점은 분기 처리가 많아 지는 시점이 객체 분리의 신호탄일 수 있다고 저는 생각하고 있습니다. 분기 자체를 객체로 뺼 수도 있을 것 같구요. when 으로 편하게 분기 처리하다보면 이런 것을 놓칠 수 있을 것 같다? 라는 생각이 듭니다. 이에 대한 생각도 궁금합니다!

kotlin에서 spring, jpa을 쓸 때 기본 생성자가 필요해서, 보통 all-open이 포함된 plugin을 사용해서 직접 구현해야하는 수고로움을 덜 수 있어

현재 build.gradle 에 kotlin("plugin.jpa") version "1.9.25" 을 포함하고 있는데요! 그럼 저 기본 생성자를 써주지 않아도 자동으로 해주는 걸까요??

when 을 사용하며 여러 분기처리를 쉽게 바꿀 수 있는 것 같습니다. 이 떄문에 가독성이나 간결성을 잡으며 여러 분기 처리를 할 수 있는 것 같아요.
한가지 우려되는 점은 분기 처리가 많아 지는 시점이 객체 분리의 신호탄일 수 있다고 저는 생각하고 있습니다. 분기 자체를 객체로 뺼 수도 있을 것 같구요. when 으로 편하게 분기 처리하다보면 이런 것을 놓칠 수 있을 것 같다? 라는 생각이 듭니다. 이에 대한 생각도 궁금합니다!

너무 맞는 말인데 ㅋㅋㅋㅋ

현재 build.gradle 에 kotlin("plugin.jpa") version "1.9.25" 을 포함하고 있는데요! 그럼 저 기본 생성자를 써주지 않아도 자동으로 해주는 걸까요??

그럴거야

authors: Joddev hoyeonyy

repo: hoyeonyy/prac-tech


text:
[shardformer] support disabling tensor parallelism

Tensor parallelism is not suitable for cases, e.g. small model training. We can set it to be optional.

Closed by #4144

repo: hpcaitech/ColossalAI


text:
Can it be installed under windows?

When I got to the last step of the installation, I got an error message saying that WSL is required.

I think Colossal-AI currently only supports Linux environment, i you are using Windows and you do not have a server, maybe you can try to use Colab or something. Or just to fix this bug, try to use WSL

I think Colossal-AI currently only supports Linux environment, i you are using Windows and you do not have a server, maybe you can try to use Colab or something. Or just to fix this bug, try to use WSL

Thank you very much. I'll try installing it in WSL.
Is there any plan to make it compatible with Windows in the future? Many users are only familiar with Windows systems.

This error message suggests that the package you're trying to install requires the Windows Subsystem for Linux (WSL) and is not supported directly on Windows. To resolve this, you'll need to install WSL on your Windows machine and run the installation within the WSL environment.
Additionally, if you're looking to contribute to the project or report this issue, you can do so on its GitHub repository. Providing details about your environment and the error message you encountered will help the developers address the issue more effectively.

Switch to #205 for discussion.

repo: hpcaitech/Open-Sora


text:
Numeric input as confirmation of account suggestion

I still haven't got rid of this intuition after a year+ of using hledger-iadd so it might be worth considering.
Currently it's required to enter both the account and the amount as 2 separate steps.
I keep doing the following thing while entering a transaction:

I accept the date
I enter the description
I type the amount and press enter
Then I have the amount suggested as a new account and have to back up and enter the data properly.

Would it make sense to interpret input that stars with a digit on an account question as "yes, I like the suggested account name, here's the amount"? Note: if yes - a flag might be a good idea since it's perfectly possible for someone to have accounts that begin with a number

I also do this from time to time, so there certainly is a bit of a UX problem. However, I'm not entirely sold on the suggested workaround.
I think the the current UI in general isn't great at communicating the current state of your q&a session. For example, I also sometimes try to type a description into the date prompt or an account name into the description field. In general, you either have to have perfect muscle memory or interpret a few spread-out clues and read text to know where you are.
A better way of presenting the current state, e.g in a WYSIWYG fashion like an HTML form or similar, would probably(hopefully) go along way to eliminate these sort of errors. However, that's of course a lot of work and might create new problems.

authors: allgreed hpdeifel

repo: hpdeifel/hledger-iadd


text:
disable complete word with space

FAQ

[X] I have checked the FAQ and it didn't resolve my problem.

Announcement

[X] I have checked Breaking change announcement.

Minimal reproducible full config
      vim.o.pumheight = 10

      local cmp = require("cmp")
      local cmp_autopairs = require("nvim-autopairs.completion.cmp")
      cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())

      cmp.setup({
        snippet = {
          -- REQUIRED - you must specify a snippet engine
          expand = function(args)
            -- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
            require("luasnip").lsp_expand(args.body) -- For `luasnip` users.
            -- require('snippy').expand_snippet(args.body) -- For `snippy` users.
            --vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
          end,
        },
        window = {
          -- completion = cmp.config.window.bordered(),
          -- documentation = cmp.config.window.bordered(),
        },
        mapping = cmp.mapping.preset.insert({
          ["<C-p>"] = cmp.mapping.select_prev_item(),
          ["<C-n>"] = cmp.mapping.select_next_item(),
          -- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
          -- ['<C-f>'] = cmp.mapping.scroll_docs(4),
          -- ['<C-Space>'] = cmp.mapping.complete(),
          ["<tab>"] = cmp.mapping.confirm({
            behavior = cmp.ConfirmBehavior.Replace,
            select = true,
          }),
          -- ['<C-e>'] = cmp.mapping.abort(),
          ["<Del>"] = cmp.mapping.abort(),
          -- ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
        }),
        sources = cmp.config.sources({
          -- { name = "vsnip" }, -- For vsnip users.
          { name = "nvim_lsp", group_index = 1 },
          { name = "nvim_lsp_signature_help", group_index = 1 },
          { name = "luasnip" }, -- For luasnip users.
          -- { name = 'ultisnips' }, -- For ultisnips users.
          -- { name = 'snippy' }, -- For snippy users.
          -- { name = "buffer" },
          -- { name = "rg", keyword_length = 3, option = { debounce = 500, additional_arguments = "--max-depth 4" } },
          { name = "path", group_index = 2 },
          { name = "IM" },
          -- {
          --     name = 'spell',
          --     option = {
          --         keep_all_entries = false,
          --         enable_in_context = function()
          --             return true
          --         end,
          --     },
          -- },
        }),
      })

Description

why wirte a hou will compele  ho u
Steps to reproduce
see lua config
Expected behavior
I want disable complete word with space
Actual behavior
complete word with space
Additional context
No response

I don't debug your partial config.

You need to upload the minimal config to test.

@WingDust I have this exact problem and I'm at work and too lazy to figure it out. Did you find the solution?

authors: Shougo WingDust erietz hrsh7th


text:
How to disable cmp completion for a specific programming language?

I don't want to use cmp completion for python language because I'm using Kite engine for autocompletion. So I don't want the LSP complete, but if using cmp it will not display the Kite complete menu. I read your repo but cannot found something like this so I create a new issue. Sorry for my bad english.

Try the following.
au FileType python lua require("cmp").setup.buffer({completion={autocomplete=false}})

@BlueDruddigon
Please try it https://github.com/hrsh7th/nvim-cmp/wiki/Disable-cmp-by-filetype

authors: BlueDruddigon hrsh7th uga-rosa


text:
Setting local window options does not trigger the "OptionSet" event

This PR solves #1413
I found a better way then using the :noautocmd ex-command. Temporarily setting eventignore solves the issue

LGTM. Thank you!


text:
Update readme: add a link to a list of cmp sources

Closes #837

Very good contribution!!! Thank you~!


text:
If you enable the LSP snippet support without actually having a snippet plugin installed, compe will duplicate every completion entry in the menu.

Checkhealth
Put result of :checkhealth compe.
health#compe#check
========================================================================
## compe:snippet
  - INFO: snippet engine is not detected.

## compe:mapping
  - INFO: `compe#complete` is not mapped
  - OK: `compe#confirm` is mapped: (`i  <CR>          compe#confirm("<CR>")`)
  - INFO: `compe#close` is not mapped
  - INFO: `compe#scroll` is not mapped

Describe the bug
If you enable the LSP snippet support without actually having a snippet plugin installed, compe will duplicate every completion entry in the menu.
To Reproduce
Set the following to true:
capabilities.textDocument.completion.completionItem.snippetSupport = true
and then disable or remove whatever plugin you have for snippets.
and make sure that there aren't any snippet plugins enabled in your compe source.
Actual behavior
Compe duplicates every entry in the completion menu.
Expected behavior
Only one suggestion should be shown instead of two of the same.
Screenshots (optional)

Additional context (optional)
I don't use a snippet engine so it was kind of weird at first, it took me a while to realize this was the issue.

I obviously fixed it by removing the 'capabilities' altogether from my init config file since I'm not using it.


text:
All in one

Update dependencies for:

scala 2.12.x
akka
avro4s
avsystem-commons
jsoniter-scala
upickle

Add support of Scala 2.13 for:

avro4s
upickle

Drop support of Scala 2.11 for avro4s
Optimize dependencies for jsoniter-scala
Add missed sub-module for avsystem-commons

Very nice, thanks!

authors: hseeberger plokhotnyuk

repo: hseeberger/akka-http-json


text:
Resnet training procedure

@hszhao, Did you train ResNet models on Imagenet dataset with dilated convolutions or use the kernels of original resnet model in PSPNet as dilated kernels?
I have used your pretrained resnet weights for initialising PSPNet and it's achieving published accuracy on validation dataset. I have trained Resnet model with changed architecture (3 kernels of (3,3) shape instead of 1 (7,7) kernel) without dilated convolutions and used it for training PSPNet, but there is a lot of deviation in accuracy. Could you please let me know the training protocol of Resnet models.

Hi, I trained ResNet models with all dilation set to 1, so no dilated convolutions are used when training classification models. What is your classification model's accuracy? Have you loaded the right weights when training the segmentation model?

repo: hszhao/semseg


text:
Upgrade rand version in v2.12.0 to avoid security issue.

Hi, please update rand version in v2.12.0 to avoid security issue. I've created a patch but don't know which brach should I create PR against.

Hi @liurenjie1024, can you please share how you made the patch? I am facing the same problem

I didn't solve it.

repo: http-rs/http-types


text:
Custom ChannelOptions in BlazeBuilder

Hey,
Related to https://github.com/http4s/blaze/issues/172, would it be possible to configure some ChannelOptions to be passed on the NIO[12]SocketServerGroup in the BlazeBuilder ? (example: if I want to add KeepAlive)
Thanks!

This seems reasonable to me.

authors: chtefi rossabaker


text:
Http4s blaze should provide better feedback when rejecting a bad request (400)

I'll start explaining myself with an example. Let's say we deploy an http4s blaze server with info level logging. We then hit the server with a request for http://127.0.0.1:8080/foo?bar={} and get 400 in response. The response body is empty - no feedback there. The logs? No info there too. (for now, let's not discuss why this is a valid URL according to Firefox and Chrome and an invalid according to parboiled)
Switching logger level to debug, would give us the precious error message. But IMO using debug logs on production is not the way to go. I would like the problem to be diagnosable "by default", and the IMO info level is the "default" for production. So what can we do about it?

This log could be an info level log.
The response message could contain error information.

I can make a PR for one or both of these, but I would like to first hear your (maintainers'/community) opinion on that. Especially I would like to know which solution you would prefer.

I'm sorry for the overdue reply, and thank you for reporting.
I'm reluctant to log full stack traces on client errors, because logging stack traces at high volume can really gum up a server, and it becomes an attack vector.  I prefer Option 2.
I like what Jetty does.  In response to this request,
GET foo/bar HTTP/1.0

We get:
HTTP/1.1 400 Bad URI
Content-Type: text/html;charset=iso-8859-1
Content-Length: 50
Connection: close
Server: Jetty(9.4.39.v20210325)

Bad Message 400

reason: Bad URI

It tells us the broad category of what's wrong, without putting anything into the body that could be used in an XSS attack.

authors: RafalSumislawski rossabaker


text:
Update vault to 2.0.0-RC1

Updates io.chrisdavenport:vault from 2.0.0-M2 to 2.0.0-RC1.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention @scala-steward in the comments below.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [{ groupId = "io.chrisdavenport", artifactId = "vault" }]

labels: semver-pre-release

This needs cats-effect 2.0-RC1

authors: aeons scala-steward