Lutris + Wine broken LoL

Describe the bug
ntlm_auth: symbol lookup error: /nix/store/qjxas7v6m2hlvnmpaiy10jz6swdzwa4l-krb5-1.18/lib/libcom_err.so.3: undefined symbol: k5_os_mutex_destroy, version krb5support_0_MIT
terminate called after throwing an instance of 'dxvk::DxvkError'

// with debug on, there's an extra line in there
0042:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.

To Reproduce

install lutris
install LoL (first option, uncheck the Launch Now checkbox at the end and start from Lutris itself)
sudo sh -c 'sysctl -w abi.vsyscall32=0'
start lutris, start LoL from lutris
crash, look in terminal

(steps taken from here)
Expected behavior
Not crashing
Additional context
I'm on the unstable channel, here's a normal log from the terminal, with debug off:
2020-03-28 23:59:15,966: Replacing /home/asthma/Games/league-of-legends/drive_c/windows/system32/dxgi with DXVK version
2020-03-28 23:59:15,966: Replacing /home/asthma/Games/league-of-legends/drive_c/windows/system32/d3d11 with DXVK version
2020-03-28 23:59:15,966: Replacing /home/asthma/Games/league-of-legends/drive_c/windows/system32/d3d10core with DXVK version
2020-03-28 23:59:15,967: Replacing /home/asthma/Games/league-of-legends/drive_c/windows/system32/d3d10_1 with DXVK version
2020-03-28 23:59:15,967: Replacing /home/asthma/Games/league-of-legends/drive_c/windows/system32/d3d10 with DXVK version
2020-03-28 23:59:15,967: Replacing /home/asthma/Games/league-of-legends/drive_c/windows/system32/d3d9 with DXVK version
INTEL-MESA: warning: Haswell Vulkan support is incomplete
2020-03-28 23:59:16,167: Running /home/asthma/Games/league-of-legends/syscall_check.sh in the background
Running /home/asthma/Games/league-of-legends/syscall_check.sh
Waiting on children
Exit with returncode 0
Running /home/asthma/.local/share/lutris/runners/wine/lutris-lol-4.20-x86_64/bin/wine /home/asthma/Games/league-of-legends/drive_c/Riot Games/League of Legends/LeagueClient.exe
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
ntlm_auth: symbol lookup error: /nix/store/qjxas7v6m2hlvnmpaiy10jz6swdzwa4l-krb5-1.18/lib/libcom_err.so.3: undefined symbol: k5_os_mutex_destroy, version krb5support_0_MIT
terminate called after throwing an instance of 'dxvk::DxvkError'
LeagueClient.exe(00000009): ALWAYS| Application Version:9.20.292.351 - CL:2920351 - Build Date:Oct 04 2019 - Build Time:13:46:43
LeagueClient.exe(00000009): ALWAYS| Direct Launch not configured for league_of_legends.live in environment '' for app path 'C:\Riot Games\League of Legends\LeagueClient.exe' and install dir 'C:\Riot Games\League of Legends'
LeagueClient.exe(0000002E): ALWAYS| Tracing worker thread running.
LeagueClient.exe(00000009): ALWAYS| Running LeagueClient version 9.20.292.351
LeagueClient.exe(0000002E): ALWAYS| Keeping up to 10 tracing logs.
LeagueClient.exe(0000002E): ALWAYS| Tracing CompactJsonWriter at C:/Riot Games/League of Legends/Logs/LeagueClient Logs/2020-03-28T23-59-17_8_LeagueClient-tracing.json
LeagueClient.exe(00000009): ALWAYS| Phase Begin - Init
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Loaded plugin manifest file plugin-manifest.json.
LeagueClient.exe(00000009): ALWAYS| Begin Launch Ux Process
LeagueClient.exe(00000009): ALWAYS| End Launch Ux Process
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Mounted all WadFiles in 5.260 milliseconds.
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Loaded all plugins in 58.584 milliseconds. All warming in 0.000 milliseconds. All loading in 32.941 milliseconds.
LeagueClient.exe(00000009): ALWAYS| Phase Begin - Initializing plugins
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-client-config: 1.6.1
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-lol-rso-auth: 1.8.24
LeagueClient.exe(0000003C): ALWAYS|        rcp-be-lol-rso-auth| RSOClient::SetRSOConfig url: https://auth.riotgames.com/token, clientId: lol, scopes: openid offline_access lol ban profile email phone
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-lol-patch: 1.5.96
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-patcher: 1.20.35
LeagueClient.exe(00000009): ALWAYS| The following message is prepared to be sent to dradis:
Event Name: riot__rclient__rads__patcher_operation
common.os_platform: Windows
common.application_name: LeagueClient
common.application_version: 9.20.292.351
common.cef_version: 3.2623.1397.gaf139d7
common.installation_id: E7Fr7w==
common.locale: en_US
common.machine_id: iTGmJSCNOkqiGEDNaIkWqA==
common.os_version_major: 7
common.os_edition: Ultimate N, x86
common.os_version_minor: Service Pack 1
common.region: EUNE
common.session_id: f6136f60-9182-bd4a-83ad-845a097ffe8c
initial_check: true
cdn: cloudflare
last_host_ip: <IP_ADDRESS>
success: success
operation_type: check
patchline: live-eune-win
patcher: chunking
published_at: 2020-03-25T01:01:41.685000
version: 95
url: https://lol.secure.dyn.riotcdn.net/channels/public/live-eune-win.json
LeagueClient.exe(00000009): ALWAYS| Queued Dradis event to be sent.
LeagueClient.exe(0000003B): ALWAYS|       rcp-be-client-config| Updated public config for LeagueClient with 124 entries
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-riot-messaging-service: 1.3.10
LeagueClient.exe(0000003C): ALWAYS|        rcp-be-lol-rso-auth| rso-auth: OpenID configuration fetch succeeded after 1 tries
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-entitlements: 0.0.28
LeagueClient.exe(00000009): ALWAYS|             Plugin Manager| Initializing plugin rcp-be-lol-bootstrap: 1.0.20
LeagueClient.exe(00000009): ALWAYS| Phase End - Initializing plugins - duration was 520.23ms
LeagueClient.exe(0000003F): ALWAYS|        rcp-be-lol-rso-auth| Client is configured. RSO Proxy: true
LeagueClient.exe(00000009): ALWAYS| Foundation is now running.
LeagueClient.exe(00000009): ALWAYS| Phase End - Init - duration was 755.38ms
LeagueClient.exe(00000009): ALWAYS| Phase Begin - MainLoop
Waiting on children
All children gone
Exit with returncode 3
2020-03-28 23:59:20,204: Game still running (state: running)
2020-03-28 23:59:20,205: Stopping League of Legends (wine)
TypeError: refresh() takes 1 positional argument but 3 were given

Metadata
these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
  /nix/store/m8czkhz4abcz367scm8a429agyyp1f06-bash-interactive-4.4-p23-dev
copying path '/nix/store/m8czkhz4abcz367scm8a429agyyp1f06-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.28, NixOS, 20.09pre218482.3320a06049f (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.3`
 - channels(root): `"nixos-20.09pre218482.3320a06049f, home-manager"`
 - channels(asthma): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: lutris, wine
# a list of nixos modules affected by the problem
module:

@abbradar ping

I've updated the runner for the game to use 5.0 instead of 4.2 and I get a different variation on the same error:
ntlm_auth: /home/asthma/.local/share/lutris/runtime/lib64/libp11-kit.so.0: no version information available (required by /usr/lib/libgnutls.so.30)
ntlm_auth: symbol lookup error: /nix/store/qjxas7v6m2hlvnmpaiy10jz6swdzwa4l-krb5-1.18/lib/libcom_err.so.3: undefined symbol: k5_os_mutex_destroy, version krb5support_0_MIT
2020-03-29 14:40:10,073: Game still running (state: running)
2020-03-29 14:40:10,074: Stopping League of Legends (wine)
TypeError: refresh() takes 1 positional argument but 3 were given

should be fixed by #83645.

Thanks, I'll give it a shot and report back.

@Emantor I'm getting errors from gtk.
/usr/bin/zenity: symbol lookup error: /lib64/libgtk-3.so.0: undefined symbol: pango_font_description_set_variations
/usr/bin/zenity: symbol lookup error: /lib64/libgtk-3.so.0: undefined symbol: pango_font_description_set_variations

Just a warning. AFAIK the game will soon start using a windows kernel module as a form of anti-cheat. At which point it will stop working on wine.


Parameterization of "Restrict where this project can be run"

We have some jobs than can be merged into one "multi branch" job. The only reason is that they need to run on another slave if it is branch "A" or branch "B". As this cannot be evaluated if the job started it needs to be "hardcoded" to the job configuration.
Idea:
Write in "global" job in "Restrict where this project can be run" field for example "Windows7_$SUBJOB_BRANCH" and it will be "Windows7_stable" and "Windows7_master" in the sub projects.

Historically, I don't think that field has ever accepted parameters.  I don't see why you'd want to have the same exact configuration for multiple branches of a project but still tie the branch to a single slave.
It's better practice to have multiple slaves under one label and have your slaves configured in a way that they are able to run builds for all your branches.

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


Multimesh.set_instance_color() don't seems to work

Operating system or device - Godot version:
Godot 2.1 alpha, 628b0a9375814bc811820f073df5f102bdb049fc commit
Issue description (what happened, and what was expected):
Apparently Multimesh.set_instance_color()  don't seems to work. I looked at c++ code and I found place where it's used in rasterizer_gles2.cpp: https://github.com/godotengine/godot/blob/master/drivers/gles2/rasterizer_gles2.cpp#L2997 it seems in this line multimesh is added to _multimesh_dirty_list which is later resolved at: https://github.com/godotengine/godot/blob/master/drivers/gles2/rasterizer_gles2.cpp#L4278
I'm not sure but it looks like the color information is not used at the place where he is resolving _multimesh_dirty_list.
Steps to reproduce:

Setup our own multimesh instance and use set_instance_color method
OR
Download sample project
Open MeshParticles.tscn
Run

Link to minimal example project (optional but very welcome):
MultimeshTest.zip

Is this still valid in master? (given it was tagged for 3.0)

i tested this recently and it seems to work fine, in fact particles now use instancing and it works there


goog.dom.htmlToDocumentFragment doesn't render table elements properly

This issue was imported from Closure Library's previous home at http://closure-library.googlecode.com
The link to the original issue is:
https://code.google.com/p/closure-library/issues/detail?id=210

At the very least, we should document this behavior. I'll add something.


[5.7][Parser] Allow parsing any in structural position within enum associated value types.

Cherry-pick of https://github.com/apple/swift/pull/58950

Explanation: any does not parse in structural types within enum associated value types. This change allows the following code to compile:

protocol P {}

enum E {
  case hello((any P) -> Void)
}

Scope: This change simply calls into Parser::startsParameterName, which already supports looking for contextual any and some, instead of repeating the code without checking for contextual keywords in Parser::canParseTypeTupleBody.
Risk: Low.
Testing: Added new unit tests.
Reviewer: @DougGregor

Resolves: rdar://93382182

@swift-ci please test

@swift-ci please test macOS platform


connecting Refoss EM06 via local MQTT

Hi,
I have a Refoss Smart Energy Monitor EM06 to monitor the power usage of some of my appliances. It seems that Refoss and Meross are somehow connected/the same company therefore I tried this integration but only with limited success. Following is my writeup of what I did and what works.
When using the Refoss app I can pair the device with the Refoss cloud and see the collected data.
On my HA setup I strive to not have any dependencies to external cloud services. Therefore I wanted to pair this device locally to my local mosquitto MQTT server.
As my mosquitto Server normally does not allow anonymous connections I added another listener with the following config:
listener 8884
allow_anonymous true
require_certificate false
use_username_as_clientid true
acl_file /etc/mosquitto/meross.acl
certfile /etc/mosquitto/certs/tls.crt
cafile /etc/mosquitto/certs/tls.crt
keyfile /etc/mosquitto/certs/tls.key

The DHCP server is configured to give the EM06 a fixed IP and the firewall is configured to only allow that IP to connect to that port.
/etc/mosquitto/meross.acl reads as follows:
user 48:e1:e9:e9:2d:1d
topic readwrite /appliance/#

Next I did a hardware-reset on the EM06 by pressing the button for around 5 seconds. The device confirmed that by a red LED and after restarting blinking green.
Thereafter I installed Version v5.3.0 of the meross_lan Integration from via HACS and restarted Home Assistant.
I then installed the MerossBLE app onto my phone. The device was found and correctly reported in the Discovered Device secion as followed.

I entered the hostname of my MQTT Server (redacted as mqtt.my.local) in the "Server" field and 8884 in the "Port" field. I kept 0 the UserId field and entered a short passphrase as "Key". Then I selected "Write".
In the "Time Configuration" section I selected "Europe/Berlin" as my "Timezone" and also selected "Write".
As a last step in the app I selecte "Scan" in the "WIFI Configuration" section. Then selecting my wifi and entering the password before also confirming with "Write".
The LED of the device then turns to solid green.
In the mosquitto log I see the device connecting with username 48:e1:e9:e9:2d:1d. It subscribes to /appliance/2401066372070174070148e1e9e92d1d/subscribe and the following three messages are exchanged:
/appliance/2401066372070174070148e1e9e92d1d/publish {"header":{"messageId":"39fb7d784b361cdca356b4c184962afc","namespace":"Appliance.Control.Bind","triggerSrc":"DevBoot","method":"SET","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/subscribe","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721545595,"timestampMs":371,"sign":"33b22ff8d7889391f54b5dc12de28a6a"},"payload":{"bind":{"bindTime":1721545595,"time":{"timestamp":1721545595,"timezone":"Europe/Berlin","timeRule":[[1729990800,3600,0],[1743296400,7200,1],[1761440400,3600,0],[1774746000,7200,1],[1792890000,3600,0],[1806195600,7200,1],[1824944400,3600,0],[1837645200,7200,1],[1856394000,3600,0],[1869094800,7200,1],[1887843600,3600,0],[1901149200,7200,1],[1919293200,3600,0],[1932598800,7200,1],[1950742800,3600,0],[1964048400,7200,1],[1982797200,3600,0],[1995498000,7200,1],[2014246800,3600,0],[2026947600,7200,1]]},"hardware":{"type":"em06","subType":"eu","version":"2.0.0","chipType":"esp32-c3","uuid":"2401066372070174070148e1e9e92d1d","macAddress":"48:e1:e9:e9:2d:1d"},"firmware":{"version":"2.3.8","compileTime":"May 14 2024 -- 15:59:34","encrypt":1,"wifiMac":"48:e1:e9:e9:2d:1d","innerIp":"<IP_ADDRESS>","server":"mqtt.my.local","port":8884,"userId":0}}}}
/appliance/2401066372070174070148e1e9e92d1d/subscribe {"header":{"messageId":"39fb7d784b361cdca356b4c184962afc","namespace":"Appliance.Control.Bind","method":"SETACK","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","triggerSrc":"CloudControl","timestamp":1721545596,"timestampMs":0,"sign":"be70c34a6db56609e2e9d3ade91d335e"},"payload":{}}
/appliance/2401066372070174070148e1e9e92d1d/publish {"header":{"messageId":"39fb7d784b361cdca356b4c184962afc","namespace":"Appliance.Control.Bind","triggerSrc":"CloudControl","method":"ERROR","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721545595,"timestampMs":431,"sign":"33b22ff8d7889391f54b5dc12de28a6a"},"payload":{"error":{"code":5001,"detail":"sign error"}}}

This seems to repeat every few seconds.
Next I go to Home Assistant and it discovers the Meros Lan Integration (my HA is in german so some labels might be not correct here). I select "Configure" and enter the same passphrase as device key. It discovers the em06 device immediately and I can configure it.
While doing that the following MQTT messages are exchanged:
/appliance/2401066372070174070148e1e9e92d1d/publish {"header":{"messageId":"447d01e1e2ac841a327279a4598fe69a","namespace":"Appliance.Control.Bind","triggerSrc":"DevBoot","method":"SET","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/subscribe","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721545846,"timestampMs":141,"sign":"6bb4b4c076b21ee8e9133a3758b2fc0b"},"payload":{"bind":{"bindTime":1721545846,"time":{"timestamp":1721545846,"timezone":"Europe/Berlin","timeRule":[[1729990800,3600,0],[1743296400,7200,1],[1761440400,3600,0],[1774746000,7200,1],[1792890000,3600,0],[1806195600,7200,1],[1824944400,3600,0],[1837645200,7200,1],[1856394000,3600,0],[1869094800,7200,1],[1887843600,3600,0],[1901149200,7200,1],[1919293200,3600,0],[1932598800,7200,1],[1950742800,3600,0],[1964048400,7200,1],[1982797200,3600,0],[1995498000,7200,1],[2014246800,3600,0],[2026947600,7200,1]]},"hardware":{"type":"em06","subType":"eu","version":"2.0.0","chipType":"esp32-c3","uuid":"2401066372070174070148e1e9e92d1d","macAddress":"48:e1:e9:e9:2d:1d"},"firmware":{"version":"2.3.8","compileTime":"May 14 2024 -- 15:59:34","encrypt":1,"wifiMac":"48:e1:e9:e9:2d:1d","innerIp":"<IP_ADDRESS>","server":"mqtt.my.local","port":8884,"userId":0}}}}
/appliance/2401066372070174070148e1e9e92d1d/subscribe {"header":{"messageId":"447d01e1e2ac841a327279a4598fe69a","namespace":"Appliance.Control.Bind","method":"SETACK","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","triggerSrc":"CloudControl","timestamp":1721545847,"timestampMs":0,"sign":"28666f3c265c452074c5a4bd2c21e336"},"payload":{}}
/appliance/2401066372070174070148e1e9e92d1d/subscribe {"header":{"messageId":"19441976e37c4caaa63059a7eb6b21c3","namespace":"Appliance.System.Ability","method":"GET","payloadVersion":1,"from":"/appliance/meross_lan/publish","timestamp":1721545847,"timestampMs":0,"sign":"479ed97aec5452e9ce30c07275989254"},"payload":{"ability":{}}}
/appliance/meross_lan/publish {"header":{"messageId":"19441976e37c4caaa63059a7eb6b21c3","namespace":"Appliance.System.Ability","method":"GETACK","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721545846,"timestampMs":400,"sign":"4aa92852c5194199113c1372a04813bc"},"payload":{"payloadVersion":1,"ability":{"Appliance.Config.Key":{},"Appliance.Config.WifiList":{},"Appliance.Config.Wifi":{},"Appliance.Config.WifiX":{},"Appliance.Config.Trace":{},"Appliance.Config.Info":{},"Appliance.System.All":{},"Appliance.System.Hardware":{},"Appliance.System.Firmware":{},"Appliance.System.Debug":{},"Appliance.System.Online":{},"Appliance.System.Time":{},"Appliance.System.Clock":{},"Appliance.System.Ability":{},"Appliance.System.Runtime":{},"Appliance.System.Report":{},"Appliance.System.Position":{},"Appliance.Control.Multiple":{"maxCmdNum":3},"Appliance.Control.Bind":{},"Appliance.Control.Unbind":{},"Appliance.Control.Upgrade":{},"Appliance.Control.ConsumptionH":{},"Appliance.Control.ElectricityX":{},"Appliance.Control.CircuitFactor":{},"Appliance.Control.AlertConfig":{},"Appliance.Control.AlertReport":{},"Appliance.Control.Sensor.History":{}}}}
/appliance/2401066372070174070148e1e9e92d1d/subscribe {"header":{"messageId":"35dccd8783194427aa69603494c5f5f9","namespace":"Appliance.System.All","method":"GET","payloadVersion":1,"from":"/appliance/meross_lan/publish","timestamp":1721545847,"timestampMs":0,"sign":"ff4ab4c8313bbd3dd0d5e649fc7c6e3e"},"payload":{"all":{}}}
/appliance/meross_lan/publish {"header":{"messageId":"35dccd8783194427aa69603494c5f5f9","namespace":"Appliance.System.All","method":"GETACK","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721545846,"timestampMs":467,"sign":"e51325069980776e64bac3ac1981020c"},"payload":{"all":{"system":{"hardware":{"type":"em06","subType":"eu","version":"2.0.0","chipType":"esp32-c3","uuid":"2401066372070174070148e1e9e92d1d","macAddress":"48:e1:e9:e9:2d:1d"},"firmware":{"version":"2.3.8","compileTime":"May 14 2024 -- 15:59:34","encrypt":1,"wifiMac":"48:e1:e9:e9:2d:1d","innerIp":"<IP_ADDRESS>","server":"mqtt.my.local","port":8884,"userId":0},"time":{"timestamp":1721545846,"timezone":"Europe/Berlin","timeRule":[[1729990800,3600,0],[1743296400,7200,1],[1761440400,3600,0],[1774746000,7200,1],[1792890000,3600,0],[1806195600,7200,1],[1824944400,3600,0],[1837645200,7200,1],[1856394000,3600,0],[1869094800,7200,1],[1887843600,3600,0],[1901149200,7200,1],[1919293200,3600,0],[1932598800,7200,1],[1950742800,3600,0],[1964048400,7200,1],[1982797200,3600,0],[1995498000,7200,1],[2014246800,3600,0],[2026947600,7200,1]]},"online":{"status":1,"bindId":"0sImwZY8DdGukrQh","who":1}},"digest":{}}}}
/appliance/2401066372070174070148e1e9e92d1d/publish {"header":{"messageId":"3a769bcad0bd0ef3525f3ffaee380da4","namespace":"Appliance.System.Report","method":"PUSH","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721545849,"timestampMs":261,"sign":"0e3f0ddbba1b6abfdc58a5929e3f03fc"},"payload":{"report":[{"type":"1","value":"1","timestamp":1721545849}]}}

The device is added to Home Assistant with two entities. A disabled one for the sensor protocol and one for the signal strenght which reports 100%.
This is it. After that I don't get any more information in Home Assistant.
While testing this I also got the following messages but I was not able to reproduce them. They are not sent frequently. Maybe the are only sent after a certain power usage but I don't know that.
/appliance/2401066372070174070148e1e9e92d1d/publish {"header":{"messageId":"6ec51bc49cedfced2fcc4c923bc30f4d","namespace":"Appliance.Control.Sensor.History","triggerSrc":"energy task","method":"PUSH","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721547256,"timestampMs":93,"sign":"23d1775268e1045f0a0f0b387657b1cd"},"payload":{"history":[{"channel":1,"capacity":16,"value":[{"timestamp":1721545532,"power":0},{"timestamp":1721545590,"power":0},{"timestamp":1721545647,"power":0},{"timestamp":1721545704,"power":0},{"timestamp":1721545762,"power":0},{"timestamp":1721545820,"power":0},{"timestamp":1721545878,"power":0},{"timestamp":1721545938,"power":0},{"timestamp":1721545998,"power":0},{"timestamp":1721546058,"power":0},{"timestamp":1721546118,"power":0},{"timestamp":1721546178,"power":0},{"timestamp":1721546238,"power":0},{"timestamp":1721546297,"power":0},{"timestamp":1721546357,"power":0},{"timestamp":1721546417,"power":0},{"timestamp":1721546477,"power":0},{"timestamp":1721546537,"power":0},{"timestamp":1721546597,"power":0},{"timestamp":1721546657,"power":0},{"timestamp":1721546717,"power":0},{"timestamp":1721546777,"power":0},{"timestamp":1721546836,"power":0},{"timestamp":1721546896,"power":0},{"timestamp":1721546956,"power":0},{"timestamp":1721547016,"power":0},{"timestamp":1721547076,"power":0},{"timestamp":1721547136,"power":0},{"timestamp":1721547196,"power":0},{"timestamp":1721547255,"power":0}]},{"channel":2,"capacity":16,"value":[{"timestamp":1721545532,"power":3365},{"timestamp":1721545590,"power":4616},{"timestamp":1721545647,"power":0},{"timestamp":1721545704,"power":81946},{"timestamp":1721545762,"power":125777},{"timestamp":1721545820,"power":125795},{"timestamp":1721545878,"power":126069},{"timestamp":1721545938,"power":126385},{"timestamp":1721545998,"power":126401},{"timestamp":1721546058,"power":126568},{"timestamp":1721546118,"power":126500},{"timestamp":1721546178,"power":126094},{"timestamp":1721546238,"power":125653},{"timestamp":1721546297,"power":125380},{"timestamp":1721546357,"power":125057},{"timestamp":1721546417,"power":124911},{"timestamp":1721546477,"power":124677},{"timestamp":1721546537,"power":124380},{"timestamp":1721546597,"power":124207},{"timestamp":1721546657,"power":124025},{"timestamp":1721546717,"power":123784},{"timestamp":1721546777,"power":123628},{"timestamp":1721546836,"power":123340},{"timestamp":1721546896,"power":123313},{"timestamp":1721546956,"power":123143},{"timestamp":1721547016,"power":122988},{"timestamp":1721547076,"power":122788},{"timestamp":1721547136,"power":122736},{"timestamp":1721547196,"power":122936},{"timestamp":1721547255,"power":122888}]},{"channel":3,"capacity":16,"value":[{"timestamp":1721545532,"power":0},{"timestamp":1721545590,"power":0},{"timestamp":1721545647,"power":0},{"timestamp":1721545704,"power":0},{"timestamp":1721545762,"power":0},{"timestamp":1721545820,"power":0},{"timestamp":1721545878,"power":0},{"timestamp":1721545938,"power":0},{"timestamp":1721545998,"power":0},{"timestamp":1721546058,"power":0},{"timestamp":1721546118,"power":0},{"timestamp":1721546178,"power":0},{"timestamp":1721546238,"power":0},{"timestamp":1721546297,"power":0},{"timestamp":1721546357,"power":0},{"timestamp":1721546417,"power":0},{"timestamp":1721546477,"power":0},{"timestamp":1721546537,"power":0},{"timestamp":1721546597,"power":0},{"timestamp":1721546657,"power":0},{"timestamp":1721546717,"power":0},{"timestamp":1721546777,"power":0},{"timestamp":1721546836,"power":0},{"timestamp":1721546896,"power":0},{"timestamp":1721546956,"power":0},{"timestamp":1721547016,"power":0},{"timestamp":1721547076,"power":0},{"timestamp":1721547136,"power":0},{"timestamp":1721547196,"power":0},{"timestamp":1721547255,"power":0}]}]}}
/appliance/2401066372070174070148e1e9e92d1d/publish {"header":{"messageId":"566f8d482bada1f8323337d1919833d1","namespace":"Appliance.Control.Sensor.History","triggerSrc":"energy task","method":"PUSH","payloadVersion":1,"from":"/appliance/2401066372070174070148e1e9e92d1d/publish","uuid":"2401066372070174070148e1e9e92d1d","timestamp":1721547260,"timestampMs":829,"sign":"4222a56ad388c4b33effbd3fa02c7762"},"payload":{"history":[{"channel":4,"capacity":16,"value":[{"timestamp":1721545532,"power":-108},{"timestamp":1721545590,"power":-115},{"timestamp":1721545647,"power":-107},{"timestamp":1721545704,"power":-95},{"timestamp":1721545762,"power":-112},{"timestamp":1721545820,"power":-102},{"timestamp":1721545878,"power":-105},{"timestamp":1721545938,"power":-98},{"timestamp":1721545998,"power":-100},{"timestamp":1721546058,"power":-110},{"timestamp":1721546118,"power":-105},{"timestamp":1721546178,"power":-110},{"timestamp":1721546238,"power":-106},{"timestamp":1721546297,"power":-105},{"timestamp":1721546357,"power":-91},{"timestamp":1721546417,"power":-82},{"timestamp":1721546477,"power":-119},{"timestamp":1721546537,"power":-109},{"timestamp":1721546597,"power":-102},{"timestamp":1721546657,"power":-97},{"timestamp":1721546717,"power":-105},{"timestamp":1721546777,"power":-119},{"timestamp":1721546836,"power":-108},{"timestamp":1721546896,"power":-105},{"timestamp":1721546956,"power":-99},{"timestamp":1721547016,"power":-113},{"timestamp":1721547076,"power":-117},{"timestamp":1721547136,"power":-107},{"timestamp":1721547196,"power":-105},{"timestamp":1721547255,"power":-81}]},{"channel":5,"capacity":16,"value":[{"timestamp":1721545532,"power":0},{"timestamp":1721545590,"power":0},{"timestamp":1721545647,"power":0},{"timestamp":1721545704,"power":0},{"timestamp":1721545762,"power":0},{"timestamp":1721545820,"power":0},{"timestamp":1721545878,"power":0},{"timestamp":1721545938,"power":0},{"timestamp":1721545998,"power":0},{"timestamp":1721546058,"power":0},{"timestamp":1721546118,"power":0},{"timestamp":1721546178,"power":0},{"timestamp":1721546238,"power":0},{"timestamp":1721546297,"power":0},{"timestamp":1721546357,"power":0},{"timestamp":1721546417,"power":0},{"timestamp":1721546477,"power":0},{"timestamp":1721546537,"power":0},{"timestamp":1721546597,"power":0},{"timestamp":1721546657,"power":0},{"timestamp":1721546717,"power":0},{"timestamp":1721546777,"power":0},{"timestamp":1721546836,"power":0},{"timestamp":1721546896,"power":0},{"timestamp":1721546956,"power":0},{"timestamp":1721547016,"power":0},{"timestamp":1721547076,"power":0},{"timestamp":1721547136,"power":0},{"timestamp":1721547196,"power":0},{"timestamp":1721547255,"power":0}]},{"channel":6,"capacity":16,"value":[{"timestamp":1721545532,"power":-426},{"timestamp":1721545590,"power":-438},{"timestamp":1721545647,"power":-443},{"timestamp":1721545704,"power":-502},{"timestamp":1721545762,"power":-497},{"timestamp":1721545820,"power":-493},{"timestamp":1721545878,"power":-498},{"timestamp":1721545938,"power":-498},{"timestamp":1721545998,"power":-490},{"timestamp":1721546058,"power":-506},{"timestamp":1721546118,"power":-506},{"timestamp":1721546178,"power":-501},{"timestamp":1721546238,"power":-492},{"timestamp":1721546297,"power":-490},{"timestamp":1721546357,"power":-503},{"timestamp":1721546417,"power":-497},{"timestamp":1721546477,"power":-514},{"timestamp":1721546537,"power":-513},{"timestamp":1721546597,"power":-495},{"timestamp":1721546657,"power":-506},{"timestamp":1721546717,"power":-509},{"timestamp":1721546777,"power":-497},{"timestamp":1721546836,"power":-498},{"timestamp":1721546896,"power":-505},{"timestamp":1721546956,"power":-500},{"timestamp":1721547016,"power":-499},{"timestamp":1721547076,"power":-506},{"timestamp":1721547136,"power":-502},{"timestamp":1721547196,"power":-494},{"timestamp":1721547255,"power":-517}]}]}}

It seems that these contain the correct power consumtions of the devices in mW. The negative numbers seem to be related to the accuracy of the sensor.
I don't know if this is the correct integration or if I should try something different. If this seems interessting for this integration I am more then happy to provied more information or test a new version. I am sufficentily fluent in python to also write a PR if youre are able to give me a hint where to start.
with kind regards
Clemens

Hello @cbergmann,
We're almost there I guess...
The problem is this device exposes features (through its 'Abilities') which are not currently supported/understood by meross_lan so we'd need some reverse engineering of these features in order to implement these.
As a starter (and hopefully finisher) we'd need at least a 'Download diagnostics' from teh device so that these features (called 'namespaces' in Meross jargon) are euristically queried and dumped. After that, if everything works as usual, we should be able to infer the meaning of the different data and add decoding/encoding capabilities to meross_lan in order to map these to useful entities.
Another option (in parallel), would be to enable the 'Create diagnostic entities' in meross_lan -> Configuration -> Diagnostic.
This would try to decode the data exposed by these namespaces and mapped every single value to a plain sensor entity so that you 'd just have some sensors reporting the raw device state.
The final (more powerful) option would be to use the 'Start diagnostic trace' (always in meross_lan-> Conf -> Diagnostics) to grab the full protocol exchange over a longer period of time so that you could physically operate the device (if anything is 'operable' from that) and meross_lan would dump every single message occuring.
I don't know the device but it looks like being just an energy sensor with maybe some configuration options. I think we could get it to work at least in a basic scenario, maybe more...

Hi, Attach is the downloaded diagnostics information.
I also activated diagnostic entities and now have around 20 entities with more or less usefull information. For each of the 6 sensors I get a total consumption (in Wh it seems), A capacity which is 16 (A I think) in all cases and "circuitfactor_factor" of 1.
The one missing information that I can see in the original app that is not here up until now is the current usage in W.
I also started the diagnostic trace. How can I download that trace information?

Awesome! The trace is saved under <HA config>custom_components/meross_lan/traces

The History message looks like reporting the (instant?) power every 60 seconds over the last few minutes. At least, the timestamps of the reported values are spaced by 60 seconds ...
The ConsumptionH reminds me of the similar ConsumptionX usually reported by Meross metering plugs and is likely reporting the energy over last few hours together with total energy x channel (that should be easily implemented).
I think the last missing value (i.e. the actual power reading) is being reported by ElectricityX message which isn't correctly queried by standard euristics..I'll better check what else might be done to correctly query this. At any rate, it could also be PUSHED (asynchronously) by the device itself from time to time so, if we're in luck, the trace could report the layout of the message.

Hi,
attached are traces from yesterday and today. Unfortunately they stop after a few minutes. Is there something I am doing wrong?
traces.tar.gz

I've released a preview with some (small) improvements on entities mapping for EM06.
It is still unknown how to decode current power/current readings but I have patched a bit of the 'discovery/diagnostics' code hoping this new preview could better trace these messages (the candidate for this feature is Appliance.Control.ElectricityX namespace)
You could try install the preview and see if anything improves (the consumption readings should be there though).
We'd then need to grab the 'Download diagnostics' again and see if we can extract better info with this new release.

Hi, I installed the preview version and got a new diagnostics file. At the first glance this has not helped but maybe you can see something in the file.
When this does not help, maybe looking a little deeper into the vendors app might give some insight.

Hello,
I've searched a bit the internet and found that Refoss has its own integration for HA. Nevertheless, it doesn't look very 'complete' and I don't really know how and if it works so I'm reverse engineering their python code to implement support for EM06 in meross_lan.
I have 1 question though, if you're up to help with a bit of 'manual querying' before proceeding:
In HA -> Developer Tools -> Services look for service named meross_lan.request and setup the parameters as follows:

set the Device identifier or the Host address (whichever is easier to type)
set the Method to GET
set the Namespace to Appliance.Control.Electricity (more on this later)
set the Payload to {"electricity": {}} (more on this later)

Now switch to YAML mode and correct the Namespace field to Appliance.Control.ElectricityX (this is needed because this namespace is not provided by the UI list...)
Now to the (verbose) details: I've found in the original Refoss code that the query payload should be {"electricity": {"channel":65535}} but this is actually 'hard' to implement in meross_lan because of a lot of euristics which (actually) don't expect this query format so, in order to implement this, I would need to introduce new euristics/rules but I don't want to do that if they're not necessary.
So, if the {"electricity": {}} payload works then we're all happy and I'd quickly proceed to a 'simple' coding to add the namespace feature, else, if we really need to send {"electricity": {"channel":65535}} no problem, it will just take some more time (and add complexity to the code which I always try to avoid)
Having said that, you should try and see if any of these queries work and then post the service reply (I'm confident at least 1 should work) so that I have the correct payload response to inspect.
Thank you! (by the way, just curious: did you try to use the Refoss integration? if so did it work or not?)

Hi this is the result for "{\"electricity\": {}}":
request:
  header:
    messageId: fca51ded841b4746aeaa38435b74f56f
    namespace: Appliance.Control.ElectricityX
    method: GET
    payloadVersion: 1
    from: /appliance/meross_lan/publish
    timestamp:<PHONE_NUMBER>
    timestampMs: 0
    sign: 726fb500e6620bb07acf8c4f4ca50e6a
  payload:
    electricity: {}
response:
  header:
    messageId: fca51ded841b4746aeaa38435b74f56f
    namespace: Appliance.Control.ElectricityX
    method: GETACK
    payloadVersion: 1
    from: /appliance/2401066372070174070148e1e9e92d1d/publish
    uuid:<PHONE_NUMBER>070174070148e1e9e92d1d
    timestamp:<PHONE_NUMBER>
    timestampMs: 384
    sign: 726fb500e6620bb07acf8c4f4ca50e6a
  payload:
    electricity:
      - channel: 1
        current: 0
        voltage: 233546
        power: 0
        mConsume: 1967
        factor: 0
      - channel: 2
        current: 576
        voltage: 232037
        power: 115523
        mConsume: 4878
        factor: 0.8636192083358765
      - channel: 3
        current: 0
        voltage: 232124
        power: 0
        mConsume: 59
        factor: 0
      - channel: 4
        current: 308
        voltage: 233777
        power: 770
        mConsume: 0
        factor: 0.010665059089660645
      - channel: 5
        current: 0
        voltage: 232290
        power: 0
        mConsume: 0
        factor: 0
      - channel: 6
        current: 335
        voltage: 232328
        power: -750
        mConsume: 0
        factor: -0.009644150733947754

and this is the result for "{\"electricity\": {\"channel\":65535}}"
request:
  header:
    messageId: f235da9ebe8d4a52bc8288465e5cdd31
    namespace: Appliance.Control.ElectricityX
    method: GET
    payloadVersion: 1
    from: /appliance/meross_lan/publish
    timestamp:<PHONE_NUMBER>
    timestampMs: 0
    sign: 535cd26ec302c66ec9c27faaf190e5ad
  payload:
    electricity:
      channel: 65535
response:
  header:
    messageId: f235da9ebe8d4a52bc8288465e5cdd31
    namespace: Appliance.Control.ElectricityX
    method: GETACK
    payloadVersion: 1
    from: /appliance/2401066372070174070148e1e9e92d1d/publish
    uuid:<PHONE_NUMBER>070174070148e1e9e92d1d
    timestamp:<PHONE_NUMBER>
    timestampMs: 87
    sign: 535cd26ec302c66ec9c27faaf190e5ad
  payload:
    electricity:
      - channel: 1
        current: 0
        voltage: 233680
        power: 0
        mConsume: 1967
        factor: 0
      - channel: 2
        current: 574
        voltage: 233184
        power: 115185
        mConsume: 4881
        factor: 0.8602570295333862
      - channel: 3
        current: 0
        voltage: 232021
        power: 0
        mConsume: 59
        factor: 0
      - channel: 4
        current: 311
        voltage: 233748
        power: 324
        mConsume: 0
        factor: 0.004454255104064941
      - channel: 5
        current: 0
        voltage: 233313
        power: 0
        mConsume: 0
        factor: 0
      - channel: 6
        current: 339
        voltage: 232127
        power: -10
        mConsume: 0
        factor: -0.0001285076141357422

That looks good.
On your question about the Refoss integration: I looked into this but at that time i did not figure out a way to join the device to the WIFI without using the official app and therefore also using the refoss cloud. That was not an option for me. Now that You mentioned that I tried adding it and after fiddeling a little bit with my firewall I got it working. The only problem was that my HA and the device are on differnt networks. The Integration has no option to specify the IP and relies on sending a broadcast to port 9988. That would not reach the device and therefore setup would fail. When configuring iptables to rewrite the broadcast adress to the device adress before sending the udp datagram out the setup completes and everything works.
It seems that the Refoss integration communicates via UDP directly. It queries for the information every 15 seconds and gets a reply with the information. This seems to remove the need for a local MQTT Server. If you are interested in implementing this protocol I have captured a pacap file containing the initial setup and the first minutes of updates.
As this contains internal IP adresses and potentialy other sensetive information I am more than happy to send it to you via a secure channel.

I didn't dig too much in the refoss-ha library supporting this but the traffic over UDP could just be the discovery part since I've found parts of code using 'standard' http traffic to query the device.
At any rate, I would not go too far (at the moment) since the http stack should work correctly without many issues.
But the trace could become useful in the future...I've sent you a PM

I looked into the pcap files and it seems that your are right. The UDP datagrams are always the same and seem to only contain basic information. The main data seems to be transmitted via http.

Updated pre-release. Beside the naive naming of some sensors it should work. I've removed the decoding of consumption hourly history since the statistics should be better available through HA.
The only 'open question', provided everything else works as expected, is the interpretation of the energy reading.
HA has different configurations in order to manage the possible scenarios and these are more or less based off when (and if) the accumulated values resets from time to time (daily-monthly-yearly....) but I don't have a clear understanding of when the EM06 eventually resets these energy readings.
The refoss-ha library uses the label/name "Monthly energy" so I would expect these energy values to reset every month but, even if this is a correct assumption, the reset could actually happen anytime: likely the start of the month but not surely.
We have to see what will happen on these.
At the moment I've just used state_class == total for the entity since the energy might flow in any direction if I'm correct and the meter (and HA statistics too) could then track energy import/export. Just, the code never tells HA if the value has been reset (start of new cycle)

Hi thanks again for the fast reply. I will monitor this information and give feedback what happens. Unfortunately I will be on vacation next week and might not have time to see if the reading changes.
Regarding energy flow it might be interesting that the original integration also adds a sensorsensor.em06_xx_this_month_energy_returned entity. I would think that this one would count if energy is flowing back to the provider but I can not see this because I currently don't have that in my setup.
If it helps I here is a screenshot of all the entities for one of the sensors of the original integration. This is the same for all 6 sensors (a1,b1,c1,a2,b2,c2).

Also I would suggest naming the entities with a1,b1,c1,a2,b2,c3 because the sensors on the device are labeld like this. This would make it more easy to identify which reading is from wich sensor.

Hello, I'd like to read data from my em06 to publish it on EmonCMS.
I've installed the integration on Home Assistant (temporary on a VM) and it works like a charm, so I tried inspecting the Python code, but I'm not so expert in this and after 3h of attempts decided to write here.
Would it be possible to have a simple sample code to gather infos via API?
I've tried this:
import requests
import json

request_data = {
    "header": {
        "messageId": "fca51ded841b4746aeaa38435b74f56f",
        "namespace": "Appliance.Control.ElectricityX",
        "method": "GET",
        "payloadVersion": 1,
        "from": "/appliance/meross_lan/publish",
        "timestamp":<PHONE_NUMBER>,
        "timestampMs": 0,
        "sign": "726fb500e6620bb07acf8c4f4ca50e6a"
    },
    "payload": {
        "electricity": {}
    }
}

url = 'http://<IP_ADDRESS>'

try:
    # Sends the request
    response = requests.post(url, json=request_data)

    # Checks the answer
    if response.status_code == 200:
        print("Reply from the device:", response.json())
    else:
        print("Error in the request:", response.status_code, response.text)

except requests.exceptions.RequestException as e:
    print("Connection error:", e)

but the device replies this:
404 Nothing matches the given URI
I guess that in  /appliance/meross_lan/publish I should probably replace meross_lan with the specific UUID which I don't know yet.
I've just installed merossBLE but not yet tested on my device.
Could someone please help me?
Thanks in advance!

Hello @gponzo,
in meross_lan, the low level interface to the device(s) is almost completely isolated inside the (sub)module custom_components/meross_lan/merossclient.
This python module is totally 'isolated' from any HA api and so it could (or should) easily work as a standalone library to access the device. Specifically, the httpclient.py module contains the class responsible for managing the HTTP access.
There you'll find all the helpers to build messages, sign, send, get replies and so.
Going back to your code, the first thing to check by the way is the url: devices respond to the http://hostaddress/config endpoint so you're missing a bit of the path in your example.
As for the 'from' field in the message header it should not be relevant when using the HTTP endpoint. Some devices just complain if it's empty or not set at all but, generally, they don't care (over HTTP) since it's purpose is to tell the device which MQTT topic to use when replying to the request.

Grazie @krahabb, I've just analyzed the code you suggested me, but unfortunately my knowledge on Python is not so deep. Anyway I'll try this evening to do some test.
Consider that I did git clone of the whole meross_lan repo. How should I invoke it?
something like
Python3.8 custom_components/meross_lan/merossclient(<IP_ADDRESS>) ?
Please forgive my ignorance and, considering that this stuff could be boring for many here, feel free to contact me privately if you wish and prefer it (even in Italian ;--)

Hey @gponzo,
I'm also not very expert with python running modules and stuff..I've just started learning python while developing meross_lan and, in the beginning, I was just copying over samples for HA components development so I'm a bit lost too when trying to use the code outside of HA. Anyway...
I suggest you a few steps (just tried and confirmed working):

Run the code with python 3.12 (I'm not sure about compatibility with previous versions..it might work but...)
Use vscode + docker desktop (if not yet) to set a friendly development environment (I'm using that on Windows)
Clone the repo (already done that!)
put a file named __main__.py in custom_components folder and start with

import asyncio

from meross_lan.merossclient.httpclient import MerossHttpClient

async def async_main():
    client = MerossHttpClient("<IP_ADDRESS>", key="")

    response = await client.async_request("Appliance.System.All", "GET", {})
    print(response)

    response = await client.async_request("Appliance.Control.Electricity", "GET", {"electricity": {}})
    print(response)

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(async_main())

Once the file is in place you can either run it from vscode ('Run python file' from the top-right corner of the editor window) or, from the command line by just typing python custom_components
When initializing the MerossHttpClient, beside the host address, you have to provide the 'device key' (long story here if you don't know what I mean...but if you have installed and running in HA you can copy the device key from the configuration there)
The first request ("Appliance.System.All") works on every device and replies a general device status/config while the second one ("Appliance.Control.Electricity") is very specific for metering plugs (like mss310) and will not work on every device. For EM06 you should be good using "Appliance.Control.ElectricityX" instead (every other param is the same).
The client.async_request call will automatically create the 'header' part of the message based on 'namespace' and 'method' (will then use the current time and the configured key to fill all of the other header fields.
The 3rd parameter (dict) is the 'payload' part of the request
This could be a start for some experiments, feel free to ask more if any. As for the call we could arrange that on skype when you want.

Thank you so much!
I've just tried creating main.py with the code you wrote, but when I run it I receive this error:
File "meross_lan/custom_components/meross_lan/__init__.py", line 337
    match ConfigEntryType.get_type_and_id(config_entry.unique_id):
          ^
SyntaxError: invalid syntax

I'm afraid that the previous line contains a referral to HomeAssistant:
336         for config_entry in hass.config_entries.async_entries(mlc.DOMAIN):
337             match ConfigEntryType.get_type_and_id(config_entry.unique_id):`

I didn't fill the key value: where can I find the device key in Home Assistant?

I'm afraid that the previous line contains a referral to HomeAssistant:

Yep...I was scared of that since the package itself as a whole is an HA custom component so it has to have all of the dependencies installed (using pip install -r requirements_test.txt should automatically install all of these..but in the end it would be better to let vscode create the docker container for the environment..everything is then automatically configured)
In order to 'break' these dependencies you'd have to either copy the merossclient folder to a different path and use it as if it were a standalone module/package.
It might also work (didn't try) if you just put that __main__.py file in the merossclient folder (instead of custom_components) and run the python code from that folder..this way the python import system will not traverse (and try init/loading) all of the modules it finds when starting loading from custom_components. You'll have to fix the import (in the new __main__.py) then with
from httpclient import MerossHttpClient

or something in the likes. Running from the command line inside the merossclient folder should work now.

I didn't fill the key value: where can I find the device key in Home Assistant?
If you succesfully configured your EM06 in HA (so that's working) then you're done: enter the meross_lan integrations page and hit 'CONFIGURE' for the device entry. On the menu choose 'Configure' and you should see the device key there. This value was likely automatically retrieved from your Meross cloud account when you configured that in HA too - if you did it)

No way :(
I've done what you wrote but I stil get an error:
File "merossclient/namespaces.py", line 97
    match name.split("."):
          ^

About the key, I've been able to configure and I'm using the em06 in Home Assistant, but via Refoss integration.
Trying with Meross_lan it asks me a Meross account, which I don't have (I ahave a Refoss one but it doesn't accept it) or the UUID of the device which I don't have too (yet?).
I've also attempted to find the key in the Refoss integration but with no luck.
I'm so frustrated about not being able to simply ask the info to this device... I've been inspecting Refoss integration code too, but I didn't find anywhere an http request...

I don't understand the error tbh...what's the complete output (when you run the python -m .. script it should be verbose enough) ?
My guess is the name value is empty or more likely None so the parser throws an error there. Maybe the namespaces.py file was 'corrupted' ?
I'm pretty sure my suggested approach is working (i'm testing it on the 'dev' branch but the 'master' one should be safer in this regard)
regarding the key, I've digged a bit into the refoss_ha repo and it is using an empty key (i.e. a void string: "") so that my example should work as is. Only, the ...Electricity namespace is likely not supported for the device and you should just plainly use ...ElectricityX instead.
As for the uuid it is normally not needed to communicate over http by Meross device and I guess it is not needed too for Refoss ones.
I'm curious about what happens when you try to configure the device in meross_lan.
Which procedure are you following? the Meross account is only 'needed' to retrieve the device key in case you don't know it but in my understanding (so far...) you should be able to make it work by just providing the device ip/address and the key (empty as supposed by looking at the refoss_ha repo)

Hi, sorry for being silent for so long...
That's the complete output:
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/gabriele/dev/refoss_lan/test.py", line 3, in <module>
    from merossclient.httpclient import MerossHttpClient
  File "/home/gabriele/dev/refoss_lan/merossclient/__init__.py", line 14, in <module>
    from . import const as mc, namespaces as mn
  File "/home/gabriele/dev/Python/refoss_lan/merossclient/namespaces.py", line 97
    match name.split("."):
          ^
SyntaxError: invalid syntax

It tells about syntax... just like if the name object is not recognized...
About the code in namespace.py

My guess is the name value is empty or more likely None

I'd say that it enters that if block explicitly because the payload_get is None...

so the parser throws an error there

So the parser shouldn't rise an error, as if it is None it is expected, am I wrong?
     96         if payload_get is None:
     97             match name.split("."):
     98                 case (_, "Hub", *_):
     99                     self.payload_get_inner = _LIST
    100                     self.payload_type = list
    101                     self.need_channel = False
    102                 case (_, "RollerShutter", *_):
    103                     self.payload_get_inner = _LIST
    104                     self.payload_type = list
    105                     self.need_channel = False
    106                 case (
    107                     (_, "Control", "Thermostat", *_)
    108                     | (_, "Control", "Screen", *_)
    109                     | (_, "Control", "Sensor", *_)
    110                 ):
    111                     self.payload_get_inner = [{mc.KEY_CHANNEL: 0}]
    112                     self.payload_type = list
    113                     self.need_channel = True
    114                 case _:
    115                     self.payload_get_inner = _DICT
    116                     self.payload_type = dict
    117                     self.need_channel = False
    118         else:
    119             self.payload_get_inner = payload_get
    120             self.payload_type = type(payload_get)
    121             self.need_channel = bool(payload_get)
    122
    123         self.key_channel = key_channel or (mc.KEY_ID if self.is_hub else mc.KEY_CHANNEL)
    124         self.has_get = has_get
    125         self.has_push = has_push
    126         NAMESPACES[name] = self

Anyway I solved!!!
The solution is in this file:
https://github.com/Refoss/refoss-homeassistant/blob/main/custom_components/refoss_lan/refoss_ha/device.py
In particular in these lines:
        if self.device_type == "r10":
            path = f"http://{self.inner_ip}/config"
        else:
            path = f"http://{self.inner_ip}/public"

So, my final code is:
import requests
import json

# Dati della richiesta
request_data = {
    "header": {
        "messageId": "fca51ded841b4746aeaa38435b74f56f",
        "namespace": "Appliance.Control.ElectricityX",
        "method": "GET",
        "payloadVersion": 1,
        "from": "",
        "timestamp":<PHONE_NUMBER>,
        "timestampMs": 0,
        "sign": "726fb500e6620bb07acf8c4f4ca50e6a"
    },
    "payload": {
        "electricity": {}
    }
}

# Indirizzo del tuo dispositivo
url = 'http://<IP_ADDRESS>/public'

try:
    # Invia la richiesta
    response = requests.post(url, json=request_data)

    # Controlla la risposta
    if response.status_code == 200:
        print("Risposta dal dispositivo:", response.json())
    else:
        print("Errore nella richiesta:", response.status_code, response.text)

except requests.exceptions.RequestException as e:
    print("Errore nella connessione:", e)

Awesome!
I didn't spotted that url 'patching' in the refoss-ha library...I wonder if current meross_lan code is working or not for those using the EM06. In fact, after initial issue raising I didn't have any more confirmation or reply...


[SUPPORT] After upgrading hudi 0.14.1, use Spark SQL merge into to update the matched_action, the case of the column name and the expression name does not match, resulting in an exception.

**Tips before filing an issue

Have you gone through our FAQs?
Join the mailing list to engage in conversations and get faster support at<EMAIL_ADDRESS>If you have triaged this as a bug, then file an issue directly.

Describe the problem you faced
Hello team, after upgrading from hudi0.13.1 to hudi0.14.1, I found that a large number of merge into tasks failed. After a simple test, it is concluded that the case of column name and expression name is inconsistent in the merge into ... WHEN MATCHED THEN UPDATE SET  operation.
Not sure if it has anything to do with this new feature
To Reproduce
Steps to reproduce the behavior:

Create test tables and datacreate table merge_source (
    id int, name string, price double
) using hudi
tblproperties
(primaryKey = 'id');
insert into merge_source values (1, "old_a1", 22.22), (2, "new_a2", 33.33), (3, "new_a3", 44.44);

create table hudi_cow_tbl_v14 (
  id INT,
  name STRING,
  price DOUBLE
) USING hudi
 tblproperties
(primaryKey = 'id');
insert into hudi_cow_tbl_v14 values (1, "oldid1", 100.00), (2, "oldid2", 200.00);

Execute a merge statementmerge into hudi_cow_tbl_v14 as target
using merge_source as source
on target.id = source.id
when matched then update set ID=source.ID, name=source.name

Results of using arthars debug watch methodsmethod=org.apache.spark.sql.hudi.analysis.HoodieSpark32PlusResolveReferences.resolveMergeExprOrFail location=AtExceptionExit
ts=2024-01-24 15:06:18; [cost=1.207048ms] result=@ArrayList[
    @Object[][
        @UnresolvedAttribute['ID],
        @Project[Project
+- SubqueryAlias target
   +- SubqueryAlias spark_catalog.test.hudi_cow_tbl_v14
      +- Relation test.hudi_cow_tbl_v14[
        _hoodie_commit_time#608,_hoodie_commit_seqno#609,
        _hoodie_record_key#610,_hoodie_partition_path#611,
        _hoodie_file_name#612,id#613,name#614,price#615]
      BaseFileOnlyRelation(org.apache.spark.sql.SQLContext@22decfa2,HoodieTableMetaClient
      {basePath='hdfs://xx/user/hive/warehouse/test.db/hudi_cow_tbl_v14',
      metaPath='hdfs://xx/user/hive/warehouse/test.db/hudi_cow_tbl_v14/.hoodie',
      tableType=COPY_ON_WRITE},
      Map(hoodie.embed.timeline.server -> true,
        hoodie.datasource.hive_sync.mode -> hms,
        hoodie.insert.shuffle.parallelism -> 20,
        hoodie.datasource.hive_sync.support_timestamp -> true,
        hoodie.schema.on.read.enable -> true,
        path -> hdfs://xxx/user/hive/warehouse/test.db/hudi_cow_tbl_v14,
        hoodie.filesystem.view.type -> EMBEDDED_KV_STORE,
        hoodie.datasource.hive_sync.metastore.uris -> thrift://xxx,
        hoodie.delete.shuffle.parallelism -> 20,
        hoodie.datasource.query.type -> snapshot,
        hoodie.datasource.write.schema.allow.auto.evolution.column.drop -> true,
        hoodie.compact.inline -> false,
        hoodie.datasource.write.reconcile.schema -> true,
        hoodie.upsert.shuffle.parallelism -> 20,
        hoodie.query.as.ro.table -> false,
        hoodie.bulkinsert.shuffle.parallelism -> 20)
        ,None,List(),None)
],
    ],
    @HoodieSpark32PlusResolveReferences[
        MatchMergeIntoTable$module=@MatchMergeIntoTable$[org.apache.spark.sql.hudi.analysis.HoodieSpark32PlusResolveReferences$MatchMergeIntoTable$@41623694],
        spark=@SparkSession[org.apache.spark.sql.SparkSession@b1e63b5],
        sparkAdapter=@Spark3_3Adapter[org.apache.spark.sql.adapter.Spark3_3Adapter@46d83ec4],
        bitmap$0=@Boolean[true],
        ruleId=null,
<EMAIL_ADDRESS>        org$apache$spark$internal$Logging$$log_=null,
        bitmap$0=@Boolean[false],
    ],
    null,
]

Expected behavior
A clear and concise description of what you expected to happen.
Environment Description

Hudi version : 0.14.1
Spark version : 3.3.2
Hive version : 3.1.2
Hadoop version : 3.3.3
Storage (HDFS/S3/GCS..) : HDFS
Running on Docker? (yes/no) : no

Additional context
Add any other context about the problem here.
Stacktrace
Add the stacktrace of the error.

@yihao-tcf Thank you for bringing this to our attention. You are absolutely right; it appears to be a regression in the 0.14 release.
Created tracking JIRA for the same - https://issues.apache.org/jira/browse/HUDI-7330

@yihao-tcf Actually this was already known and another jira was already there -
https://issues.apache.org/jira/browse/HUDI-6472

@yihao-tcf Actually this was already known and another jira was already there - https://issues.apache.org/jira/browse/HUDI-6472

OK, I know, thank you for your answer

@yihao-tcf @jonvex hi, any plan fix it? If not, I can try to fix it

@KnightChess that would be really helpful. Thanks

@yihao-tcf @jonvex hi, any plan fix it? If not, I can try to fix it

@KnightChess I don't have any plans here. Thank you for fixing this issue

@yihao-tcf @jonvex hi, any plan fix it? If not, I can try to fix it

That would be great, thanks for the valuable help.

Here is another fix from @jonvex : https://github.com/apache/hudi/pull/10826


Please update the Primer on Bezier entry to be by "Pomax" rather than using my legal name

Hiya,
The Primer on Bezier curves is currently attributed to my legal name, rather than my real name - could that please be changed to say "Pomax"? Virtually no one knows me by my legal name, and I like to keep it that way =)
(It's only in the footer signature for legal reasons)

Fixed.
I cleaned git history, so from now on your name will not appear in it.  However, you should ask other persons to delete their respective forks. If you want, I could do it for you.
When you read this message, feel free to close this issue and I will delete it, for extra protection. If there is a need, we can continue the conversation over mail.
Sorry for the caused inconvenience.

no need to delete, it's not "secret" information, more a matter of correct attribution. I have asked the only fork that has click-throughs to the primer to update their file as well, so with the master updated and their fork (hopefully) updated as well, things should be fine.


--bmc-depth conflicts with setUp function

I got a runtime exception when generating an APRBMCProof for a contract with a setup function. I believe that we try to read the APRBMCProof as an APRProof here:
https://github.com/runtimeverification/evm-semantics/blob/5cda4c794acc592943f2c6322f11e0744884acc5/kevm-pyk/src/kevm_pyk/foundry.py#L964
The problem is that the APRProof parser expects the JSON to contain a property named terminal_nodes, but the APRBMCProof serializer does not generate such a field.
Steps to reproduce:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;
contract MinimalSetup  {

    function setUp() external {
    }

    function doSomething() external {
    }

}

forge build
kevm foundry-compile --with-llvm-library
kevm foundry-prove --test MinimalSetup.doSomething --use-booster --bmc-depth 1

Traceback (most recent call last):
  File ".kevm-pyk-wrapped", line 9, in <module>
    sys.exit(main())
  File "kevm_pyk/__main__.py", line 87, in main
    execute(**vars(args))
  File "kevm_pyk/__main__.py", line 545, in exec_foundry_prove
    results = foundry_prove(
  File "kevm_pyk/foundry.py", line 602, in foundry_prove
    results = run_cfg_group(tests)
  File "kevm_pyk/foundry.py", line 590, in run_cfg_group
    _apr_proofs.append(_init_and_run_proof(init_problem))
  File "kevm_pyk/foundry.py", line 550, in _init_and_run_proof
    proof = _method_to_apr_proof(
  File "kevm_pyk/foundry.py", line 906, in _method_to_apr_proof
    kcfg, init_node_id, target_node_id = _method_to_cfg(
  File "kevm_pyk/foundry.py", line 947, in _method_to_cfg
    init_cterm = _init_cterm(
  File "kevm_pyk/foundry.py", line 1039, in _init_cterm
    accts, constraints = get_final_accounts_cell(init_state, kcfgs_dir)
  File "kevm_pyk/foundry.py", line 962, in get_final_accounts_cell
    apr_proof = APRProof.read_proof_data(proof_dir, proof_digest)
  File "pyk/proof/reachability.py", line 295, in read_proof_data
    terminal_nodes = proof_dict['terminal_nodes']
KeyError: 'terminal_nodes

I believe this is no longer an issue with the following:
forge build
kontrol build --with-llvm-library
kontrol prove --test MinimalSetup.doSomething --use-booster --bmc-depth 1

and that it was fixed by pyk#601

Confirmed that the issue has been fixed.


Strings aren't escaped in file names

For example, I have a mixin called Property that takes 3 string arguments, and ddox produces this error:
 Failed to open file 'path\to\file\Component.Property!("GameObject", "owner", "public").html'.

This is happening on Windows.

This is now output as just "test.html".


Move imports in braviatv component

Breaking Change:
None
Description:
Moved import from function to top-level as requested in #27284
Checklist:

[ ] 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

Note: imports sorted using isort

Please rebase on latest dev branch to let the build pass.


UI text wrapping

Some gen ins/outs have long names. until we have a smarter Op layout function, we should wrap the text generated in ./Op/meshes.js using something like this

completed


move version.org.eap to test

We need to make it very clear that the eap-maven-plugin does not have a compile dependencies on any version of EAP.
afaik, this version is only used by the tests. We should move it to the tests/pom.xml to avoid any confusion (and maybe at some point, we will be able to remove it and configure it directly in the CI tests)
https://github.com/jfdenise/eap-maven-plugin/blob/0a8cff133815749164b2f40b5d2f5c174aef579d/pom.xml#L47

Thanks, fixed.


{Documentation}Command guideline for private endpoint connection and private link resource

Documentation for onboarding Private Endpoint Connection and Private Link Resource.
Fix #11667
History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)
[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

add to S166.


Feature request: Event parser envelope (for Kinesis) with sequence number

Use case
We want to handle Kinesis streaming events and use Pydantic models with event_parser, AND be able to do partial failures.
If use KinesisDataStreamEnvelope you just get list of model so you can't do partial failures.
Solution/User Experience
Envelope that would return for example List[Tuple[str, Optional[Model]]] which would allow similar easy handling of the actual model data but also make it possible to easily implement partial batch failures. Similar would probably be useful for other similar envelopes for services that support partial batch failures.
Alternative solutions
Make Powertools batch processing able to work with batches, not single items, in custom code side. And support for failing instantly when first processing fails instead of processing all regardless of errors.
Acknowledgment

[X] This feature request meets Powertools for AWS Lambda (Python) Tenets
[ ] Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET

hey @jarikujansuu thank you for taking the time on filling this feature request - could you expand on how you'd like to use Batch processing with an entire batch?
If you could expand more on the processing experience for Kinesis with any code snippets it'd be super helpful.
While we could fail fast like we do with SqsFifoPartialProcessor, Kinesis can only guarantee ordering within the shard, which means this can create side effects in your processing.
This info will give us a better picture of what you're trying to do, the authoring experience you desire, and how partial failure support would work if your function would receive the entire batch in a single call.
Thanks a lot!

I perhaps had two separate issues in here. My squad is producing data to Kinesis stream and I am checking how we could help our customers to simplify their code, and why they are not using event_parser. And then we ourself mainly consume data from DynamoDb Streams and batch processing from Powertools didn't work for us. Also for our use we only care about ordering within single partition key.
But lets start...
Why event parser should return also sequence number?

Lambda listening on Kinesis stream will take in batch which contains only events from single shard
On failure you can return batchItemFailures with lowest failed sequence number. If error contains multiple sequence numbers only lowest of them is used

So any processing done after first failure are wasted and will result in duplicates in downstream. I think only possible benefit for processing all even after failing first time is if you are not going to retry anymore (or don't use partial batch failures at all)
But to be able to use partial batch failures at all you can't use event_parser as it removes the required information. Unless you implement custom envelope like I described. I was originally planning to implement such envelope in our own libraries but to me it sounds like something that could be useful for many, and of course would be simpler for us too 😇
Similar issue with at least DynamoDBStreamEnvelope, any processing done after first failed sequence number is wasted
Why batch processing should be able to pass (smaller) batches to custom code?
So now in batch processing there is record_handler which takes single record at time, so if your lambda takes in batch of 100 events you process them without knowing anything about other events.
We have use case where we take data from DynamoDb Stream and send to EventBus. So if we process events one by one we can send only single event per put_events but if we would process them 10 at time we could send 10 in single call.
But I see it as valid design decision to keep batch processing simple so just process things one event at time and more complex cases could be implemented with help of event_parser
Why batch processing should fail fast with DynamoDb Streams and Kinesis
Because Lambda will take first failed sequence number and retry everything after that, there is no possibility of only failing events 2, 7 and 10 because returning those ids would fail 2 and everything after that.
There is of course some caveats. Like if that is your last retry attempt, should you try to save at least some events? We bisect the batch so much and then dlq handling takes care of the rest.

quick note to say I haven't forgotten and will respond today

Thank you so much for clarifying and sharing more details @jarikujansuu - it's clear now.
Splitting into work streams to make it easier to have actions on them, please let me know if I missed or misinterpreted any area.
Fail fast for Streams in Batch Processing
That is something we want to do, it's a valid concern. It's something I wanted to do for a while but haven't prioritized, so having a customer driven need makes this easier -- welcome a PR and to guide you to make this faster, otherwise we can look into after we complete other major work items in early September.
SqsFifoPartialProcessor works that way with one caveat, it reports all unprocessed items as failure to prevent them from being deleted (not the case with Kinesis and DynamoDB due to checkpoint).
[Action] We should create a specialized Batch Processor for Kinesis and one for DynamoDB that stops on first failure by default. We should update documentation to recommend the new one, explain why under Legacy section, and inform customers about Report Batch Item Failure along with Bisect on Error configuration's benefit.
Receive entire batch
As of now, I'm not inclined as it's a trade-off. I concur with the need to optimize networking calls like in your case, but the average person will now have to incur additional boilerplate to handle processing, unless I'm missed something? My reservation with this model is that there is not much a value add, and that's where things go off the rails too quickly as we've seen it first hand (reason why we created this model).
Async Batch Processor wouldn't work here either (all items at once!) because your need is to efficiently call downstream service when you already buffered enough info.
[Action] Feel free to create a RFC. We then wait for customer demand (10+) to validate need and shape the direction. For now, extending batch processor is an alternative solution for savvy customers.
Keeping sequence number in Kinesis Envelope
As of now, I'm not inclined due to existing customers feedback that led us to create the Envelope mechanism. Customers use Envelope to get rid of all metadata and directly map to the DTO or Model they have codified - regardless if they use event_parser or simply parse standalone function.
For Batch, you can access the sequence number in the current model hence why we didn't use an envelope. However, I'm aware it doesn't work for you as you'd want the entire Batch.
[Action] No action needed.

I think fail fast for Streams in Batch Processing would simplify our current client squads code nicely. If I have understood correctly that same SqsFifoPartialProcessor logic could be used for Kinesis and DynamoDb as for them you can include all failed, it just takes the lowest. Of course _short_circuit_processing can easily be changed to return just first failed. 👍
For our own service ability to use both sequence number and multiple events at same time is kind of must, so probably I just implement such envelope myself as it seems like trivial thing. And if only we need it then sharing code isn't an issue 😄
Or it might be actually quite simple to extend batch processor to pass for example list of 10 events as Pydantic models, and if that fails send partial failure with all their ids.

Yeah (return first failed immediately) — let’s do the new Kinesis and
DynamoDB classes first like FIFO, and then we regroup on a call as I’d like
to see what you’ve got. I’ve got the feeling I might be missing something
here ;-)
On Thu, 3 Aug 2023 at 15:54, Jari Kujansuu @.***> wrote:

I think fail fast for Streams in Batch Processing would simplify our
current client squads code nicely. If I have understood correctly that same
SqsFifoPartialProcessor logic could be used for Kinesis and DynamoDb as
for them you can include all failed, it just takes the lowest. Of course
_short_circuit_processing can easily be changed to return just first
failed. 👍
For our own service ability to use both sequence number and multiple
events at same time is kind of must, so probably I just implement such
envelope myself as it seems like trivial thing. And if only we need it then
sharing code isn't an issue 😄
Or it might be actually quite simple to extend batch processor to pass for
example list of 10 events as Pydantic models, and if that fails send
partial failure with all their ids.
—
Reply to this email directly, view it on GitHub
https://github.com/aws-powertools/powertools-lambda-python/issues/2850#issuecomment-1664027499,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZPQBCEDAX4GTKCMUKG3ITXTOUQJANCNFSM6AAAAAA2YJCIOA
.
You are receiving this because you commented.Message ID:
@.***
com>

We're adding this in V3, as we were unable to prioritize. If anyone would like to help creating a new class for DynamoDB and one for Kinesis to fail fast like FIFO, please go ahead and we can help out.


Proposal: ImageLoadingBuilder should use null for the loadingProgress in the initial state

Use case
Hypothesis: many users will want to do the same 4 things with the Image.network widget:

Render a generic loading state
show a spinner for images that are quick to load, or that haven't started loading yet
Render a progress loading state
show a progress bar for large images that may take time
Render the image
Render an error

Using an ImageLoadingBuilder there's no clear way to differentiate between an image that hasn't started loading (1), and an image that has been fully loaded (3). From the ImageLoadingBuilder docs:

The loadingProgress argument contains the current progress towards loading the image. This argument will be non-null while the image is loading, but it will be null in the following cases:

When the widget is first rendered before any bytes have been loaded.
When an image has been fully loaded and is available to be painted.

An alternative approach is to use the ImageFrameBuilder to render the generic loading state (1), but not the progress(2):
Image.network(
  imageUrl,
  frameBuilder: (
    BuildContext context,
    Widget child,
    int? frame,
    bool wasSynchronouslyLoaded,
  ) {
    if (frame != null) {
      return child;
    }
    return Center(
      child: CircularProgressIndicator(),
    );
  },
);

Proposal
Modify the ImageLoadingBuilder so that the loadingProgress is not-null in the initial state, ie:
ImageChunkEvent(
  cumulativeBytesLoaded: 0,
  expectedTotalBytes: null,
);

that way users can render a spinner, or 0% progress state for this.

Agree, it is very annoying

Can we get this moving?


Puppeteer failed with visual studio 2022

Description
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe
Complete minimal example reproducing the issue

Install visual studio 2022 with web development workload
Start the test with default puppeteersharp stuff
Browse to the xxx\bin\Debug\net6.0.local-chromium\Win64-884014\chrome-win
Click to run chrome.exe
Verify chrome.exe fail to run

To keep the repo organized let's leave Github issues for Feature Requests, bugs and issues.
I kindly ask you to create a question on Stack Overflow. I follow the tag puppeteer-sharp. This will help us get more eyes on those questions and leave answers easily available to the community.
Feel free to paste the Stack Overflow link here.


[Usa1974P2] add proof

To get the file to be picked up by lake build and lake exe buildWebpage, I needed to add it to Compfiles.lean: https://github.com/dwrensha/compfiles/commit/fd24d027e4d02738a392dd874d7d33df7da64e43


Creating-a-Package.md: fixed list of required properties

@michha,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/Create-Packages/Creating-a-Package.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@michha thank you for catching that!


HTTP agent examples (JavaScript) code correction

const http = require('http'); const httpAgent = new http.Agent(); httpAgent.maxSockets = 200;                                                   //options.agent = httpAgent; this line has undefined object 'options' const options = { agent: httpAgent }; http.request(options, onResponseCallback);

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

ID: cb8d85a7-1ca3-71f4-85fb-7fb02850b60e
Version Independent ID: 3d7daee4-fd6d-0e96-299a-90b3637e6150
Content: Manage connections in Azure Functions
Content Source: articles/azure-functions/manage-connections.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

Hello @dcorns,
Thank you for your feedback! We will review and update as appropriate.

Hello @dcorns, Thank you for the feedback I have made a PR to make the suggested change. I will now proceed to close this issue out, please tag me in your response if there are any additional concerns. Thank you!


fix(validation-group): clean up of path observer subscriptions on validation group destroy

I've improved the destroy() function on ValidationGroup.
Now calling destroy() will clean up the subscription of the PathObserver for each ValidationResultProperty (now PathObserver has an unsubscribe() method).
I was having issues with a form with a dynamic array of values, recreating the validation group was creating new observers each time and some fields ended up triggering multiple validations (also on other fields of the form when adding and removing element of an array).
Calling destroy() on the ValidationGroup and recreating it solves the issue with this patch, since all observables get unsubscribed correctly.

Thank you for contribution!!!
I'm shaping up the validation library this weekend and will gladly merge your changes :-)
-- CLA confirmed

You're welcome, looking forward to see these changes merged!
I think this would also help developing the foreach functionality, since dynamic forms will be able to subscribe/unsubscribe observers correctly when the number of fields change.
If you need help on the foreach support I can give you a working example that works well enough with these changes (not very elegant but can be a good place to start).

@bfil I would love that! Even if it's "imperfect" we can still use it as our base to start development! :)

Great! I'll put that into the other issue than.


cider + company autocomplete doesn't activate properly

What did you expect to happen?
I expect autocomplete to start working already in the following code snippet, with cursor at | and give me suggestions for functions like api/dataset
(ns qubole-cost-check
  (:require [tablecloth.api :as api]))

(api/|)

...
What actually happened?

So it seems I first need to "activate" suggestions by the first letter of one of the functions in the api namespace.
...
config.clj:
(add-hook 'cider-repl-mode-hook #'evil-normalize-keymaps) didn't solve it for me
https://github.com/hlissner/doom-emacs/issues/1335#issuecomment-619022468 also didn't solve it for me.

;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-

;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!

;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "Kees ter Brugge"
      user-mail-address<EMAIL_ADDRESS>
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;;   presentations or streaming.
 You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;;       doom-variable-pitch-font (font-spec :family "sans" :size 13))

;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)

;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")

;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)

;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;;   this file. Emacs searches the `load-path' when you load packages with
;;   `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.

;; startup emacs with fullscreen
(add-to-list 'initial-frame-alist '(fullscreen . maximized))

;; pipe operator for ess (=r)
(defun tide-insert-pipe ()
  "Insert a %>% and newline"
  (interactive)
  (insert " %>% "))

(use-package! ess
  :config
  (map!
   :localleader
   :map ess-mode-map
   :desc "ansert pipe op" "m" 'tide-insert-pipe
   :map inferior-ess-r-mode-map
   :desc "insert pipe op" "m" 'tide-insert-pipe
   ))

;; use xwidget webkit as default browser st view webpages
;; is done inside buffer. Especially usefull during plotting with oz/plotly
;; or inspecting dataset with datatable or some web based REBL
(setq browse-url-browser-function 'xwidget-webkit-browse-url) ; emacs browser

;; for some reason autocomplete doesn't work well in clojure.
;; (api/| ) doesn't autocomplete,
;; however after pressing "d" it does (api/d| )
;; (add-hook 'cider-repl-mode-hook #'evil-normalize-keymaps)
;;
;;
(after! cider
  (add-hook 'company-completion-started-hook 'custom/set-company-maps)
  (add-hook 'company-completion-finished-hook 'custom/unset-company-maps)
  (add-hook 'company-completion-cancelled-hook 'custom/unset-company-maps))

(defun custom/unset-company-maps (&rest unused)
  "Set default mappings (outside of company).
    Arguments (UNUSED) are ignored."
  (general-def
    :states 'insert
    :keymaps 'override
    "<down>" nil
    "<up>"   nil
    "RET"    nil
    [return] nil
    "C-n"    nil
    "C-p"    nil
    "C-j"    nil
    "C-k"    nil
    "C-h"    nil
    "C-u"    nil
    "C-d"    nil
    "C-s"    nil
    "C-S-s"   (cond ((featurep! :completion helm) nil)
                    ((featurep! :completion ivy)  nil))
    "C-SPC"   nil
    "TAB"     nil
    [tab]     nil
    [backtab] nil))

(defun custom/set-company-maps (&rest unused)
  "Set maps for when you're inside company completion.
    Arguments (UNUSED) are ignored."
  (general-def
    :states 'insert
    :keymaps 'override
    "<down>" #'company-select-next
    "<up>" #'company-select-previous
    "RET" #'company-complete
    [return] #'company-complete
    "C-w"     nil  ; don't interfere with `evil-delete-backward-word'
    "C-n"     #'company-select-next
    "C-p"     #'company-select-previous
    "C-j"     #'company-select-next
    "C-k"     #'company-select-previous
    "C-h"     #'company-show-doc-buffer
    "C-u"     #'company-previous-page
    "C-d"     #'company-next-page
    "C-s"     #'company-filter-candidates
    "C-S-s"   (cond ((featurep! :completion helm) #'helm-company)
                    ((featurep! :completion ivy)  #'counsel-company))
    "C-SPC"   #'company-complete-common
    "TAB"     #'company-complete-common-or-cycle
    [tab]     #'company-complete-common-or-cycle
    [backtab] #'company-select-previous    ))

System information:

emacs   version    27.0.91
        features   RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS XWIDGETS PDUMPER LCMS2 GMP
        build      Aug 06, 2020
        buildopts  (--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp<EMAIL_ADDRESS><EMAIL_ADDRESS>--with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-modules --with-rsvg --with-xwidgets --with-ns --disable-ns-self-contained)
        windowsys  ns
        daemonp    server-running
doom    version    2.0.9
        build      HEAD -> develop, origin/develop, origin/HEAD c7bfbafdc 2020-08-04 14:03:06 -0400
        dir        ~/.doom.d/
system  type       darwin
        config     x86_64-apple-darwin19.5.0
        shell      /bin/zsh
        uname      Darwin 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
        path       (~/.emacs.d/bin /usr/local/sbin ”/Users/keesterbrugge/.emacs.d/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin”<EMAIL_ADDRESS>config  envfile    envvar-file
        elc-files  0
        modules    (:completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline ophints (popup +defaults) vc-gutter vi-tilde-fringe workspaces :editor (evil +everywhere) file-templates fold format snippets :emacs dired electric undo vc :checkers syntax :tools (eval +overlay) lookup lsp magit pdf :lang clojure emacs-lisp (ess +lsp) markdown org sh :config (default +bindings +smartparens))
        packages   (n/a)
        unpin      (n/a)
        elpa       (n/a)

Hope you can help me out. Apologies for the pace gif, the conversion seems to have slowed it down

Does this fix the issue?
(after! company
  (setq company-auto-complete-chars '(?/)))

(api/|) still doesn't autocomplete automatically. Tab also doesn't trigger autocomplete.
C-SPC does work.

Judging from your config, you don't have :completion (company +tng) enabled, so I don't understand why you expect TAB to trigger auto-completion. Have you configured this manually in your config? In that case I can't be of much help without seeing the code. Otherwise, you'll need to enable it for TAB to work that way.
As for automatic completion, try this:
(after! company
  (setq company-auto-complete t
        company-auto-complete-chars '(?_)))

or
(after! company
  (setq company-auto-complete t
        company-auto-complete-chars "/"))

I was mistakenly under the impressions that TAB would trigger auto-completion. Adding +tng fixed it for me. Thanks! 🙏


Install prefix support

Use XDG_DATA_DIRS (or the hardcoded default if not set) as a "search path" for the en_US.json and main.glade data files. this allows installation to a prefix other than /usr (as long as XDG_DATA_DIRS is set accordingly). Includes primitive support in the Makefile for passing in an installation prefix. Addresses issue #52

Yes, I should have remembered about it. Thank you.


Inconsistent exception getAccount vs getAccountById

Recently we've been facing a lot of failures on our Production env. due to a sudden inconsistency in the Exceptions that are thrown between Instagram::getAccount() and Instagram::getAccountById().
Behaviour
Previously using v0.9.2 we used to get a consistent InstagramScraper\Exception\InstagramNotFoundException exception all the following cases:

Wrong username.
Wrong id.
Disabled account.

Now we get InstagramScraper\Exception\InstagramException when:

Wrong id.
Disabled account.

With message (just a snippet):
Response code is 200. Body: <!DOCTYPE html>\n
      <html lang="en" class="no-js not-logged-in client-root touch">\n
          <head>\n
              <meta charset="utf-8">\n
              <meta http-equiv="X-UA-Compatible" content="IE=edge">\n
      \n
              <title>\n
      Instagram\n
      </title>\n

But we still get InstagramScraper\Exception\InstagramNotFoundException when the username is wrong.
Updated to latest release v0.9.11 facing the same behaviour still.
Expectations
Have a consistent Exception in all cases.
Additional Context
I am not sure if this discrepancy was introduced to the package or is due to recent deprecations/changes on Instagram's side. I am hesitant though to consider the later unless we are sure it is not the former.
I see that some changes were introduced here specifically to Instagram::getAccountById() not long ago. Although this fix was only released in v0.9.11.
Debugging
Instagram::getAccountById() internally calls Instagram::getUsernameById() which given a wrong ID or the ID of a disabled account now returns null.
Proposed Solution
Throw InstagramScraper\Exception\InstagramNotFoundException in case the username is null.
Specifically abide to Instagram::getAccountPrivateInfo() docs to throw said exception in this case.
Thoughts?
Thank you.
FYI @raiym

I think there have been changes on Instagram again. Almost out of work


[1.10.2][5.24] Crash involving RFTools Endergenic Generator and Integrated Dynamics

Steps to reproduce:

Connect an Integrated Dynamics (ID) Machine Reader to an RFTools Energenic Generator
Connect ID Logic Cable, followed by ID Display Panel
Right click ID Machine Reader to open GUI. Click scroll bar or attempt to scroll.

Game should crash at this point.
I successfully connected ID to the following machines:
RFTools Crafter Tier 1
RFTools Matter Beamer
Mekanism Crusher
Mekanism Energy Cube
EnderIO SAG Mill
EnderIO Capacitor Bank
Immersive Engineering Fluid Pump
Immersive Engineering Capacitor
Versions of mods used:
Minecraft 1.10.2
Forge 2093
RFTools 5.24
Mekanism <IP_ADDRESS>2
EnderIO <IP_ADDRESS>_beta
Immersive Engineering 0.10-42
Integrated Dynamics 1.9.4-0.5.1
Crash report:
https://gist.github.com/Aedda/8d5b81ac6d8d06c4383ddb0b928fd805

I think the bug is in integrated dynamics. It may have a wrong version of the CoFH API or something. Did you report to them?

Not yet, I will do so now.

My (author of ID) bad, I was doing a wrong cast, this can be closed.


Fixes error on example. Closes #6

https://github.com/facebook/react-native/issues/7719#issuecomment-221293127

Thanks Mark. I'll create a minor npm release with this.


added a method to return the compression count

The Result returns a header containing the current compression-count, rather than doing a separate cURL request to get this in your code, you can simply extract this header. As the properties are all protected they cannot be accessed outside without this local method.

Thanks for your pull request!
However, you might have missed the fact that the plugin already offers this functionality:
\Tinify\getCompressionCount();

Hi Jippe, We most definitely did not miss this, so would appreciate if you would close it before jumping to conclusions.
Currently, you offer either, Compress or getCompressionCount.
However after integrating this into a live system we found it created a bottle neck,
Lets say you have a method that calls the compression system then outputs the image.
You have to wait 5 seconds, it then has to do another curl request (which might fail, or timeout etc) even though the actual compression is already completed, just to update any internal counters.
So if the 2nd api call fails, your potentially crapping out a completely valid optimisation call, just because you're forcing users to make another call, instead of implementing this extension
The method extension if you look is only adjusting the Result class, so it allows you to find out how many compressions used with the response, without making an additional api lookup with the data that is already accessible, making it much faster and responsive for the end user.
By enforcing this additional load time for the user its creating a lesser experience for them, where as implementing this wouldn't hurt anybody and would solve issues for potentially many people down the line.
What reasoning do you have for rejecting it?

Hi Owen,
For each response the PHP client receives from the API, the compression count on the Tinify class is updated. There is no need to make an additional curl request just to get the compression count, because the Tinify class always has the correct information.

Hi Jippe, in that case this is perfect! Thank you very much!

Good to hear! If there is anything else, let us know. We're happy to help.
On Sat, Mar 12, 2016 at 2:15 AM -0800, "Owen Melbourne"<EMAIL_ADDRESS>wrote:
Hi Jippe, in that case this is perfect! Thank you very much!
—
Reply to this email directly or view it on GitHub.


Property iconCreateFunction not passed on to Leaflet Element?

Hi @YUzhva,
nice work, thanks a lot!
I am passing a  custom iconCreateFunction to the MarkerClusterGroup component, (like described in the README), but it seems to be ignored.
I tried to understand what was going on and stumbled upon this code line:
https://github.com/YUzhva/react-leaflet-markercluster/blob/master/src/react-leaflet-markercluster.js#L13
Shouldn't that have been prop.startsWith(…) rather than includes?
The string iconCreateFunction includes 'on' two times, but afaics it should not be treated as an event
handler in this context, right?
I see what happens if I change this and will report back here.

@ldegen Thank you for notice and your contribution! (=
Already fixed that issue in 2.0.0-rc3.
At first, remove -rc2 and then install the latest candidate release:
yarn add react-leaflet-markercluster@next # yarn
npm install react-leaflet-markercluster@next # npm

Will do it in the release version, when README/CHANGELOG and demo-app will be updated too :wink:

FYI: I just checked out rc3, at least in Chrome it works now.


Add information about CSS pseudo selector :defined

caniuse.com seemingly has no information on the compatibility of the CSS pseudo selector
:defined (which matches custom elements that have been defined).

According to mdn, this is the current support for :defined:

Is Chrome, Opera and safari support correct? Because it is marked as yes, meaning that all versions of chrome/safari/Opera support it

How would I know? That's why I tried to consult caniuse in the first place.

Available via MDN now: https://caniuse.com/mdn-css_selectors_defined
(Also support has been marked more granular now: https://developer.mozilla.org/en-US/docs/Web/CSS/:defined#browser_compatibility)