make the wasm-go lib easier to use

Ⅰ. Describe what this PR did
make the wasm-go lib easier to use
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #58 (136f9b8) into main (bb09426) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

@@           Coverage Diff           @@
##             main      #58   +/-   ##
=======================================
  Coverage   24.80%   24.80%
=======================================
  Files          24       24
  Lines        4076     4076
=======================================
  Hits         1011     1011
  Misses       3008     3008
  Partials       57       57


Getting configuration error on iOS.

Once installing the stripe package in the project, it gives the error as in the below image.

Steps to reproduce the behavior:

Install the stripe module with below command.
yarn add @stripe/stripe-react-native
or
npm install @stripe/stripe-react-native

cd ios && pod install && cd ..

Open the xcworkspace file in XCode and run the project.

Expected behavior
Run the project after resolving the errors.
OS: macOS Monterey
Development target iOS 11.0

I am also getting this error.
How can I resolve this issue?
Development target IOS: 12.0

same for me

what react native version, and what version of @stripe/stripe-react-native are you using? May want to refer to the troubleshooting guide here: https://github.com/stripe/stripe-react-native#undefined-symbols-for-architecture-x86_64-on-ios

Closing this for now since it's addressed in the troubleshooting doc. Like I said above:

If this doesn't work for you, please provide your version of react native & @stripe/stripe-react-native so that we can reproduce the issue

Hi, not work for me!
"dependencies": {
"@invertase/react-native-apple-authentication": "^2.1.0",
"@react-native-community/async-storage": "^1.12.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/picker": "^1.8.1",
"@react-native-community/progress-bar-android": "^1.0.4",
"@react-native-community/progress-view": "^1.2.3",
"@react-native-firebase/app": "^14.5.0",
"@react-navigation/bottom-tabs": "^5.11.2",
"@react-navigation/native": "^5.8.10",
"@react-navigation/stack": "^5.12.8",
"@stripe/stripe-react-native": "^0.3.0",
"add": "^2.0.6",
"axios": "^0.21.0",
"i18n-js": "^3.8.0",
"jwt-decode": "^3.1.2",
"lodash.memoize": "^4.1.2",
"moment": "^2.29.1",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-auto-height-image": "^3.2.3",
"react-native-currency-input": "^1.0.1",
"react-native-datepicker": "^1.7.2",
"react-native-elements": "^3.0.0-alpha.1",
"react-native-fast-image": "^8.3.4",
"react-native-fbsdk": "^3.0.0",
"react-native-flipper": "0.54.0",
"react-native-gesture-handler": "^1.9.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-global-props": "^1.1.5",
"react-native-google-places-autocomplete": "^2.1.2",
"react-native-i18n": "^2.0.15",
"react-native-image-picker": "^4.0.6",
"react-native-image-view": "^2.1.9",
"react-native-loading-spinner-overlay": "^2.0.0",
"react-native-localize": "^2.1.1",
"react-native-maps": "^0.27.1",
"react-native-masked-text": "^1.13.0",
"react-native-numeric-input": "^1.8.3",
"react-native-onesignal": "^3.9.2",
"react-native-pdf": "^6.2.2",
"react-native-picker-select": "^8.0.3",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.15.0",
"react-native-skeleton-placeholder": "^3.0.2",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^2.15.2",
"react-native-vector-icons": "^7.1.0",
"react-native-version-info": "^1.1.0",
"rn-fetch-blob": "^0.12.0",
"rn-swipeable-panel": "^1.2.5",
"yarn": "^1.22.10",
"yup": "^0.32.8"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/plugin-transform-typescript": "^7.16.8",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^1.1.0",
"babel-jest": "^25.1.0",
"eslint": "^6.5.1",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-clean-project": "^3.6.7",
"react-test-renderer": "16.13.1"
},

@emernuness could you share a link to a github repo that reproduces the issue?

charliecruzan-stripe

Because it is a private repository, I added your github user as a collaborator ok?

@emernuness could you share a link to a github repo that reproduces the issue?

Because it is a private repository, I added your github user as a collaborator ok?

@emernuness your repo works for me, I cloned it, ran yarn and then ran cd ios && rm -rf Pods Podfile.lock && pod install, then built on Xcode 13.2.1

@emernuness your repo works for me, I cloned it, ran yarn and then ran cd ios && rm -rf Pods Podfile.lock && pod install, then built on Xcode 13.2.1

Great news, did you add the stripe library? The problem happens to me the moment I add Stripe to the project. I'm using an M1, I don't know if it interferes.

I assumed it already had the stripe library installed 🙈 after installing stripe, i saw the same error, but was able to fix it with some minor xcode configuration changes.
I opened an issue on your repo with the changes (I didn't want to make anything from your project config files public that you preferred stay private). If they work and you're okay with sharing those changes, please paste my diff here since it will be useful for other people

could you please share the diff? I'm having the same issue even after following what's mentioned in README. for me also it's fine without this lib

Hello how are you? It worked for me, now the problem is solved! I'm sharing the Diff...
`diff --git a/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj b/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj
index ab1cb79a..c5efa118 100644
--- a/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj
+++ b/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj
@@ -32,6 +32,7 @@
8490DD8B269BAF810009D7B6 /* splash.jpg in Resources / = {isa = PBXBuildFile; fileRef = 8490DD8A269BAF810009D7B6 / splash.jpg /; };
84E2C035269239CE00B9BD7C / GoogleService-Info.plist in Resources / = {isa = PBXBuildFile; fileRef = 84E2C034269239CE00B9BD7C / GoogleService-Info.plist /; };
F295BE5E7CA1CF82D430C65E / libPods-jaspiapp.a in Frameworks / = {isa = PBXBuildFile; fileRef = 4367F57B50B8D6FDC90869F8 / libPods-jaspiapp.a */; };

  FCA0945927DFB9A600B122EF /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCA0945827DFB9A600B122EF /* File.swift */; };
  FF217169FF255DA1AC0C9A67 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 89EB54EFC35219A813CEA3B7 /* libPods-OneSignalNotificationServiceExtension.a */; };

/* End PBXBuildFile section */
@@ -142,6 +143,8 @@
ED297162215061F000B7C4FE /* JavaScriptCore.framework / = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE / JavaScriptCore.framework / = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
F163491815234ABB8ACE211A / Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; };

  FCA0945727DFB9A600B122EF /* jaspiapp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "jaspiapp-Bridging-Header.h"; sourceTree = "<group>"; };

  FCA0945827DFB9A600B122EF /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };

/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -262,6 +265,7 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (

  		FCA0945827DFB9A600B122EF /* File.swift */,
<PHONE_NUMBER>D49529008B41C3 /* main.jsbundle */,
  		13B07FAE1A68108700A75B9A /* jaspiapp */,
  		832341AE1AAA6A7D00B99B32 /* Libraries */,

@@ -271,6 +275,7 @@
2D16E6871FA4F8E400B85C8A /* Frameworks /,
D8B4F43563B409673B63CBBE / Pods /,
A734DB65A5C94E4BAD270885 / Resources */,

  		FCA0945727DFB9A600B122EF /* jaspiapp-Bridging-Header.h */,
  	);
  	indentWidth = 2;
  	sourceTree = "<group>";

@@ -349,8 +354,8 @@
00E356EA1AD99517003FC87E /* Sources /,
00E356EB1AD99517003FC87E / Frameworks /,
00E356EC1AD99517003FC87E / Resources */,

  		41F331F5830242D76ACE0B46 /* [CP] Embed Pods Frameworks */,
  		E38CECFD642E7207D2698F4E /* [CP] Copy Pods Resources */,

  		EF1D2414AE5AE2E71398B052 /* [CP] Embed Pods Frameworks */,
  	);
  	buildRules = (
  	);

@@ -373,9 +378,9 @@
13B07F8E1A680F5B00A75B9A /* Resources /,
00DD1BFF1BD5951E006B06BC / Bundle React Native code and images /,
63A1E81125C33CDA00ABCDD3 / Embed App Extensions */,

  		7A8F6D441C914AC7B4E33AC5 /* [CP] Embed Pods Frameworks */,
  		35DCF26C5CAD722194FE1478 /* [CP] Copy Pods Resources */,
  		1AF652C6BD843D951E1900C7 /* [CP-User] [RNFB] Core Configuration */,

  		A59AC932B340EA021C2D5917 /* [CP] Embed Pods Frameworks */,
  	);
  	buildRules = (
  	);

@@ -459,7 +464,7 @@
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = ZUW9H455DN;

  				LastSwiftMigration = 1120;

  				LastSwiftMigration = 1320;
  				ProvisioningStyle = Automatic;
  			};
  			2D02E47A1E0B4A5D006451C7 = {

@@ -644,24 +649,6 @@
shellScript = ""${PODS_ROOT}/Target Support Files/Pods-jaspiapp/Pods-jaspiapp-resources.sh"\n";
showEnvVarsInLog = 0;
};

  41F331F5830242D76ACE0B46 /* [CP] Embed Pods Frameworks */ = {

  	isa = PBXShellScriptBuildPhase;

  	buildActionMask =<PHONE_NUMBER>;

  	files = (

  	);

  	inputPaths = (

  		"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh",

  		"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",

  	);

  	name = "[CP] Embed Pods Frameworks";

  	outputPaths = (

  		"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",

  	);

  	runOnlyForDeploymentPostprocessing = 0;

  	shellPath = /bin/sh;

  	shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh\"\n";

  	showEnvVarsInLog = 0;

  };
  46BBD5E6CAC6B6AEB3C21DCD /* [CP] Check Pods Manifest.lock */ = {
  	isa = PBXShellScriptBuildPhase;
  	buildActionMask =<PHONE_NUMBER>;

@@ -728,7 +715,7 @@
shellScript = "diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"\n";
showEnvVarsInLog = 0;
};

  7A8F6D441C914AC7B4E33AC5 /* [CP] Embed Pods Frameworks */ = {

  A59AC932B340EA021C2D5917 /* [CP] Embed Pods Frameworks */ = {
  	isa = PBXShellScriptBuildPhase;
  	buildActionMask =<PHONE_NUMBER>;
  	files = (

@@ -798,6 +785,24 @@
shellScript = ""${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-resources.sh"\n";
showEnvVarsInLog = 0;
};

  EF1D2414AE5AE2E71398B052 /* [CP] Embed Pods Frameworks */ = {

  	isa = PBXShellScriptBuildPhase;

  	buildActionMask =<PHONE_NUMBER>;

  	files = (

  	);

  	inputPaths = (

  		"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh",

  		"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",

  	);

  	name = "[CP] Embed Pods Frameworks";

  	outputPaths = (

  		"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",

  	);

  	runOnlyForDeploymentPostprocessing = 0;

  	shellPath = /bin/sh;

  	shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh\"\n";

  	showEnvVarsInLog = 0;

  };
  F3430FFD61AD88EED34F5CB9 /* [CP] Check Pods Manifest.lock */ = {
  	isa = PBXShellScriptBuildPhase;
  	buildActionMask =<PHONE_NUMBER>;

@@ -896,6 +901,7 @@
buildActionMask =<PHONE_NUMBER>;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,

  		FCA0945927DFB9A600B122EF /* File.swift in Sources */,
  		13B07FC11A68108700A75B9A /* main.m in Sources */,
  	);
  	runOnlyForDeploymentPostprocessing = 0;

@@ -950,6 +956,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 0574767ED102C1470D7EA951 /* Pods-jaspiapp-jaspiappTests.debug.xcconfig */;
buildSettings = {

  		ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
  		BUNDLE_LOADER = "$(TEST_HOST)";
  		GCC_PREPROCESSOR_DEFINITIONS = (
  			"DEBUG=1",

@@ -974,6 +981,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 10B47B7E9EB5A6037E6AE921 /* Pods-jaspiapp-jaspiappTests.release.xcconfig */;
buildSettings = {

  		ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
  		BUNDLE_LOADER = "$(TEST_HOST)";
  		COPY_PHASE_STRIP = NO;
  		HEADER_SEARCH_PATHS = "$(inherited)";

@@ -1053,13 +1061,14 @@
""${PODS_ROOT}/Headers/Public/rn-fetch-blob"",
""$(PODS_ROOT)/Headers/Private/React-Core"",
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",

  			"\"${PODS_ROOT}/Headers/Public/Stripe\"",

  			"\"${PODS_ROOT}/Headers/Public/stripe-react-native\"",
  		);
  		INFOPLIST_FILE = jaspiapp/Info.plist;
  		IPHONEOS_DEPLOYMENT_TARGET = 11.0;

  		LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

  		LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks $(inherited)";
  		LIBRARY_SEARCH_PATHS = (

  			"$(inherited)",

  			"$(SDKROOT)/usr/lib/swift",

  			"$(inherited)"
  		);
  		MARKETING_VERSION = 1.88;
  		OTHER_LDFLAGS = (

@@ -1071,6 +1080,7 @@
PRODUCT_NAME = jaspiapp;
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTS_MACCATALYST = NO;

  		SWIFT_OBJC_BRIDGING_HEADER = "jaspiapp-Bridging-Header.h";
  		SWIFT_OPTIMIZATION_LEVEL = "-Onone";
  		SWIFT_VERSION = 5.0;
  		TARGETED_DEVICE_FAMILY = 1;

@@ -1140,14 +1150,13 @@
""${PODS_ROOT}/Headers/Public/rn-fetch-blob"",
""$(PODS_ROOT)/Headers/Private/React-Core"",
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",

  			"\"${PODS_ROOT}/Headers/Public/Stripe\"",

  			"\"${PODS_ROOT}/Headers/Public/stripe-react-native\"",
  		);
  		INFOPLIST_FILE = jaspiapp/Info.plist;
  		IPHONEOS_DEPLOYMENT_TARGET = 11.0;

  		LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

  		LIBRARY_SEARCH_PATHS = (

  			"$(inherited)",

  			"$(SDKROOT)/usr/lib/swift",

  		);

  		LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks $(inherited)";

  		LIBRARY_SEARCH_PATHS = "$(inherited)";
  		MARKETING_VERSION = 1.88;
  		OTHER_LDFLAGS = (
  			"$(inherited)",

@@ -1158,6 +1167,7 @@
PRODUCT_NAME = jaspiapp;
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTS_MACCATALYST = NO;

  		SWIFT_OBJC_BRIDGING_HEADER = "jaspiapp-Bridging-Header.h";
  		SWIFT_VERSION = 5.0;
  		TARGETED_DEVICE_FAMILY = 1;
  		VERSIONING_SYSTEM = "apple-generic";

@@ -1398,8 +1408,6 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (

  			"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",

  			"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
  			"\"$(inherited)\"",
  		);
  		MTL_ENABLE_DEBUG_INFO = YES;

@@ -1452,8 +1460,6 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (

  			"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",

  			"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
  			"\"$(inherited)\"",
  		);
  		MTL_ENABLE_DEBUG_INFO = NO;

`

I assumed it already had the stripe library installed 🙈 after installing stripe, i saw the same error, but was able to fix it with some minor xcode configuration changes.
I opened an issue on your repo with the changes (I didn't want to make anything from your project config files public that you preferred stay private). If they work and you're okay with sharing those changes, please paste my diff here since it will be useful for other people

could you please share the diff? I'm having the same issue even after following what's mentioned in README. for me also it's fine without this lib

Hello how are you? It worked for me, now the problem is solved! I'm sharing the Diff...
diff --git a/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj b/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj
index ab1cb79a..c5efa118 100644
--- a/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj
+++ b/jaspiapp/ios/jaspiapp.xcodeproj/project.pbxproj
@@ -32,6 +32,7 @@
 		8490DD8B269BAF810009D7B6 /* splash.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 8490DD8A269BAF810009D7B6 /* splash.jpg */; };
 		84E2C035269239CE00B9BD7C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 84E2C034269239CE00B9BD7C /* GoogleService-Info.plist */; };
 		F295BE5E7CA1CF82D430C65E /* libPods-jaspiapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4367F57B50B8D6FDC90869F8 /* libPods-jaspiapp.a */; };
+		FCA0945927DFB9A600B122EF /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCA0945827DFB9A600B122EF /* File.swift */; };
 		FF217169FF255DA1AC0C9A67 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 89EB54EFC35219A813CEA3B7 /* libPods-OneSignalNotificationServiceExtension.a */; };
 /* End PBXBuildFile section */

@@ -142,6 +143,8 @@
 		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
 		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
 		F163491815234ABB8ACE211A /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; };
+		FCA0945727DFB9A600B122EF /* jaspiapp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "jaspiapp-Bridging-Header.h"; sourceTree = "<group>"; };
+		FCA0945827DFB9A600B122EF /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */

 /* Begin PBXFrameworksBuildPhase section */
@@ -262,6 +265,7 @@
 		83CBB9F61A601CBA00E9B192 = {
 			isa = PBXGroup;
 			children = (
+				FCA0945827DFB9A600B122EF /* File.swift */,
<PHONE_NUMBER>D49529008B41C3 /* main.jsbundle */,
 				13B07FAE1A68108700A75B9A /* jaspiapp */,
 				832341AE1AAA6A7D00B99B32 /* Libraries */,
@@ -271,6 +275,7 @@
 				2D16E6871FA4F8E400B85C8A /* Frameworks */,
 				D8B4F43563B409673B63CBBE /* Pods */,
 				A734DB65A5C94E4BAD270885 /* Resources */,
+				FCA0945727DFB9A600B122EF /* jaspiapp-Bridging-Header.h */,
 			);
 			indentWidth = 2;
 			sourceTree = "<group>";
@@ -349,8 +354,8 @@
 				00E356EA1AD99517003FC87E /* Sources */,
 				00E356EB1AD99517003FC87E /* Frameworks */,
 				00E356EC1AD99517003FC87E /* Resources */,
-				41F331F5830242D76ACE0B46 /* [CP] Embed Pods Frameworks */,
 				E38CECFD642E7207D2698F4E /* [CP] Copy Pods Resources */,
+				EF1D2414AE5AE2E71398B052 /* [CP] Embed Pods Frameworks */,
 			);
 			buildRules = (
 			);
@@ -373,9 +378,9 @@
 				13B07F8E1A680F5B00A75B9A /* Resources */,
 				00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
 				63A1E81125C33CDA00ABCDD3 /* Embed App Extensions */,
-				7A8F6D441C914AC7B4E33AC5 /* [CP] Embed Pods Frameworks */,
 				35DCF26C5CAD722194FE1478 /* [CP] Copy Pods Resources */,
 				1AF652C6BD843D951E1900C7 /* [CP-User] [RNFB] Core Configuration */,
+				A59AC932B340EA021C2D5917 /* [CP] Embed Pods Frameworks */,
 			);
 			buildRules = (
 			);
@@ -459,7 +464,7 @@
 					};
 					13B07F861A680F5B00A75B9A = {
 						DevelopmentTeam = ZUW9H455DN;
-						LastSwiftMigration = 1120;
+						LastSwiftMigration = 1320;
 						ProvisioningStyle = Automatic;
 					};
 					2D02E47A1E0B4A5D006451C7 = {
@@ -644,24 +649,6 @@
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-jaspiapp/Pods-jaspiapp-resources.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		41F331F5830242D76ACE0B46 /* [CP] Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask =<PHONE_NUMBER>;
-			files = (
-			);
-			inputPaths = (
-				"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh",
-				"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
-			);
-			name = "[CP] Embed Pods Frameworks";
-			outputPaths = (
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
 		46BBD5E6CAC6B6AEB3C21DCD /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask =<PHONE_NUMBER>;
@@ -728,7 +715,7 @@
 			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
 			showEnvVarsInLog = 0;
 		};
-		7A8F6D441C914AC7B4E33AC5 /* [CP] Embed Pods Frameworks */ = {
+		A59AC932B340EA021C2D5917 /* [CP] Embed Pods Frameworks */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask =<PHONE_NUMBER>;
 			files = (
@@ -798,6 +785,24 @@
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-resources.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
+		EF1D2414AE5AE2E71398B052 /* [CP] Embed Pods Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask =<PHONE_NUMBER>;
+			files = (
+			);
+			inputPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh",
+				"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
+			);
+			name = "[CP] Embed Pods Frameworks";
+			outputPaths = (
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-jaspiapp-jaspiappTests/Pods-jaspiapp-jaspiappTests-frameworks.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
 		F3430FFD61AD88EED34F5CB9 /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask =<PHONE_NUMBER>;
@@ -896,6 +901,7 @@
 			buildActionMask =<PHONE_NUMBER>;
 			files = (
 				13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
+				FCA0945927DFB9A600B122EF /* File.swift in Sources */,
 				13B07FC11A68108700A75B9A /* main.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -950,6 +956,7 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 0574767ED102C1470D7EA951 /* Pods-jaspiapp-jaspiappTests.debug.xcconfig */;
 			buildSettings = {
+				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
 				BUNDLE_LOADER = "$(TEST_HOST)";
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUG=1",
@@ -974,6 +981,7 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 10B47B7E9EB5A6037E6AE921 /* Pods-jaspiapp-jaspiappTests.release.xcconfig */;
 			buildSettings = {
+				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
 				BUNDLE_LOADER = "$(TEST_HOST)";
 				COPY_PHASE_STRIP = NO;
 				HEADER_SEARCH_PATHS = "$(inherited)";
@@ -1053,13 +1061,14 @@
 					"\"${PODS_ROOT}/Headers/Public/rn-fetch-blob\"",
 					"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
 					"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",
+					"\"${PODS_ROOT}/Headers/Public/Stripe\"",
+					"\"${PODS_ROOT}/Headers/Public/stripe-react-native\"",
 				);
 				INFOPLIST_FILE = jaspiapp/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks $(inherited)";
 				LIBRARY_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(SDKROOT)/usr/lib/swift",
+					"$(inherited)"
 				);
 				MARKETING_VERSION = 1.88;
 				OTHER_LDFLAGS = (
@@ -1071,6 +1080,7 @@
 				PRODUCT_NAME = jaspiapp;
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SUPPORTS_MACCATALYST = NO;
+				SWIFT_OBJC_BRIDGING_HEADER = "jaspiapp-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
@@ -1140,14 +1150,13 @@
 					"\"${PODS_ROOT}/Headers/Public/rn-fetch-blob\"",
 					"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
 					"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",
+					"\"${PODS_ROOT}/Headers/Public/Stripe\"",
+					"\"${PODS_ROOT}/Headers/Public/stripe-react-native\"",
 				);
 				INFOPLIST_FILE = jaspiapp/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				LIBRARY_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(SDKROOT)/usr/lib/swift",
-				);
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks $(inherited)";
+				LIBRARY_SEARCH_PATHS = "$(inherited)";
 				MARKETING_VERSION = 1.88;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
@@ -1158,6 +1167,7 @@
 				PRODUCT_NAME = jaspiapp;
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SUPPORTS_MACCATALYST = NO;
+				SWIFT_OBJC_BRIDGING_HEADER = "jaspiapp-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
 				VERSIONING_SYSTEM = "apple-generic";
@@ -1398,8 +1408,6 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
 				LIBRARY_SEARCH_PATHS = (
-					"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
-					"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
 					"\"$(inherited)\"",
 				);
 				MTL_ENABLE_DEBUG_INFO = YES;
@@ -1452,8 +1460,6 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
 				LIBRARY_SEARCH_PATHS = (
-					"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
-					"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
 					"\"$(inherited)\"",
 				);
 				MTL_ENABLE_DEBUG_INFO = NO;


Is it take long to train this model?

Hi, I'm using EdgeNext as my Backbone for feature extraction for my image classification task, but I find it is very slow to converge (loss 35 vs loss 7 compare to efficientnetb0) so I'm not really sure if the model not really fits with my data or my config was wrong?
Can anyone share some experience training this type of model? Thanks :D

Hi @leduy99,
Thank You for your interest in EdgeNeXt. Could you provide some more information about your experiment, such as dataset and detection network? At what input resolution you are training your detector? Also please make sure that the backbone weights for EdgeNeXt are loaded correctly.
Thanks

Hi, currently I'm using an exact implementation of edgenext_small, resolution of my input is (3, 112, 112), training on a set of 4 million images and starting with learning rate of 6e-3.
It's still reducing the loss and accuracy still getting higher but I just feel it's slow, compare to some other pure CNN networks :D

Hi, currently I'm using an exact implementation of edgenext_small, resolution of my input is (3, 112, 112), training on a set of 4 million images and starting with learning rate of 6e-3. It's still reducing the loss and accuracy still getting higher but I just feel it's slow, compare to some other pure CNN networks :D

Thank you for providing the details,
We do notice in our detection experiments that EdgeNeXt is sensitive to LR and usually works well at slightly lesser LR as compared to pure ViTs. If you can afford, try tuning the LR for your training, let's say trying out some randomly sampled values around the current LR value. I hope this would be helpful.
Please let me know if you have any questions or get any useful insights out of your experiments. Thanks

Thanks, following your advice, I tried tunning LR a little lesser (1e-3) and use different Optimezer (AdamW instead of SGD like before) and the result is a lot better now :D Still wait to see the fully trained model performance and I will give some feedback later
Anyway, thanks for this model. Very cool architecture :D


Not able to system.register_partition with a default location if the location is not provided (hive connector)

I am wondering if we can have a default location just like system.create_empty_partition does.

For registering partitions that conform to hive's partition directory naming convention
I would recommend using sync_partition_metadata procedure.

For registering partitions that conform to hive's partition directory naming convention
I would recommend using sync_partition_metadata procedure.

That would be very expensive operation. Use case here is we are adding a new dt partition everyday, so just register_partition is sufficient.

I was thinking about that case and one more - when one of the partitions is broken we can unregister all and then add one at the time to find the broken one.

Use case here is we are adding a new dt partition everyday

@sandeshh how do you write the data? (eg who names the output directory?)

Legacy writers, writes the data to S3 and Spark adds the partition. Spark uses default location. Having this option would make it easy for us to just replace Spark with Presto.

Making location optional seems reasonable.


Update synopsys references to blackduck

This PR updates the following for sierra changes:

Update package names
Update email recipients
Update License
Remove EULA
Update dependency group names

@dterrysynopsys  Would a rename in HUB API Spec reduce the need for manual rename in this PR?

@dterrysynopsys Would a rename in HUB API Spec reduce the need for manual rename in this PR?

I can't say definitively but I don't think so. This is the generator itself which takes the hub spec as input. So I think any change in the hub spec might help with the generation...blackduck-common-api output in other words...but I don't think it would help with this repository.

@devmehtasynopsys this looks reasonable but has a generation been done to see what output for blackduck-common-api looks like?

@devmehtasynopsys this looks reasonable but has a generation been done to see what output for blackduck-common-api looks like?

No, this has been not done yet, I think the plan is to release this library right now with just initial sierra changes and handle all the changes required for generation later on. We decided that in the follow up meeting with alert team.

@devmehtasynopsys this looks reasonable but has a generation been done to see what output for blackduck-common-api looks like?

No, this has been not done yet, I think the plan is to release this library right now with just initial sierra changes and handle all the changes required for generation later on. We decided that in the follow up meeting with alert team.

Correct, we can iteratively apply the changes and not hold back any work. Sure, some work may be wasteful but reduced time to QA is desired.

@devmehtasynopsys this looks reasonable but has a generation been done to see what output for blackduck-common-api looks like?

No, this has been not done yet, I think the plan is to release this library right now with just initial sierra changes and handle all the changes required for generation later on. We decided that in the follow up meeting with alert team.

Correct, we can iteratively apply the changes and not hold back any work. Sure, some work may be wasteful but reduced time to QA is desired.

I remembered Dana saying that Martin had spent nearly 3-4 weeks for getting the latest version to be compatible with hub which I think would hinder with Detect 10 release as most of us are busy with other things. I am not sure if we can plan this with release after 10.0.0 and get this under a ticket for now?

@devmehtasynopsys this looks reasonable but has a generation been done to see what output for blackduck-common-api looks like?

No, this has been not done yet, I think the plan is to release this library right now with just initial sierra changes and handle all the changes required for generation later on. We decided that in the follow up meeting with alert team.

Correct, we can iteratively apply the changes and not hold back any work. Sure, some work may be wasteful but reduced time to QA is desired.

I remembered Dana saying that Martin had spent nearly 3-4 weeks for getting the latest version to be compatible with hub which I think would hinder with Detect 10 release as most of us are busy with other things. I am not sure if we can plan this with release after 10.0.0 and get this under a ticket for now?
Certainly, we can track with a ticket.


python extension debug function does not work

Bug Description:
After set python debug configuration, run debug，the notification service raise  "
terminal "796678749" does not exist"
debug configurations:
{   // Use IntelliSense to learn about possible attributes.   // Hover to view descriptions of existing attributes.   "version": "0.2.0",   "configurations": [     {       "name": "Python: Current File",       "type": "python",       "request": "launch",       "program": "${file}",       "console": "integratedTerminal"     }   ] }
blueprint version: 1.3.2 (beta)
python extension: 2020.10.33...

@Noneghost thank you for reporting the issue, by notification do you mean the actual notification in the application (bottom right corner) or a log message?
I confirmed that debugging works as expected on my end:

theia-blueprint: v1.32.0
ms-python: v2020.10.332292344

the notification view in bottom right corner
I used offline vsix installed python extension, because  slow internet. The theia blueprint extensions install is slow.

blueprint is used lastest windows exe。
more system information:
python version: 3.8.10
ms-python extension verion: 2020.10.33...

what you used theia blueprint verison is master verison or other?


Backup using a PDF.

https://user-images.githubusercontent.com/62699947/152773932-9ebf5148-327d-4d8d-b46b-d809b0232df8.mp4

Backup using PDF is not working initially."Share Now" button is not getting enabled in first try.I scanned the approval key still the "Share Now" button is disabled then again I went back to level 2 > Recovery key 2.There I select "Backup using PDf" and scanned the approval key then it showed me the share options on second time.

Verified this issue on dev app v2.0.75(463)


Still not

Avoiding big cells correctly it would go inside of a bigger cell just to get the cell food.
Please Fix
-CjackJr

Will be fixed in a future version.


Lib as NPM package + reorganisation

Making the library as a package
Adding long standing PR to permanently remove temporary files
Simple folder org with its each own readme file for each App
Added dependency library ImgApp as well as the library heavily relies on it

Deployments are working although manual, without CI yet
Continuation of the library support as the original repo does not seem to be active since its initial commit.

Some files have 3 "p" to App like SlideAppp.js

This is to avoid conflicts with Google apps that have the same name (DocumentApp, SpreadsheetApp etc)


Adding items with choice fields

Hi sharepointknight:
Have you any sample adding items with column type Choice?
I think I cannot make it work.
Thanks a lot!

Most of the time when working with Choice fields I just treat them like any other text field unless you are talking a multi-select choice. Then you just have to figure out the format. For that I set an item with the values then I do a rest call to check the format and then I send the data back in the same format.

Yes, I'm working with multi-select choice


Bump up atol for gradient check in gluon.test_hybrid_static_memory

Description
Fixes #11809
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage:
[x] Code is well-documented:
[x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@haojin2 @anirudh2290


Add Listings API

closes #27

@Turnerj changes applied!
AppVeyor is failing. Some tests say TooManyRequests exception 🤔

Changes look good! Yeah, the too many requests issue is one of the reasons I want to have a local instance of DEV/Forem spin up. Otherwise the alternative temporarily is throttling the tests but that seems counter intuitive.


FR: Allow generating a Clocks from the current RCC register values

Background:
Several peripheral init methods require a const ref to a Clocks struct, to ensure the clocks have been set up and to figure out what frequencies to use as their input calculations.  (For example, SPI requires knowing the frequency of the bus that it's on, to figure out which divisor to use to generate the frequency that the user requested for the SPI clock pin.)
But the only way to get a Clocks struct is to call .freeze() on the RCC CFGR, consuming it, and .freeze() tries to set a bunch of RCC registers to actuate the requested clock configuration.
The consumption-of-self is correct here, because those RCC registers can't be safely changed after the clocks are initialized.  (Or, more correctly, the microcontroller allows the registers to change, but you have to go through a very different process to change them than you went through to set them up in the first place.  Rerunning the setup code potentially disables the core's main clock, for example.  So you can't just re-run .freeze() and get a different clock configuration.)
And that's all well and good.
The problem is, in my case, I run a firmware image under a bootloader, and the bootloader sets up the clock related registers before it jumps to the firmware's first instruction.  So I can't call .freeze() even if I set up the same requested clock configuration, as I don't want to risk locking up the core by disabling its (PLL-derived) clock.
This means I can't use the SPI wrapper.
That's not the end of the world -- I could just use the SPI registers directly I suppose -- but the way the HAL already correctly and safely implements DMA is something I would really like to be able to use.
So, the feature request:
I'd like to be able to generate a Clocks struct off the actual RCC register contents, read-only.  This might need to be unsafe, to avoid using both it and the .freeze() API and create two separate Clocks instances, but I actually think that if this new API consumes an RCC RegisterBlock, it might be OK.  Or maybe it can consume a CFGR just like .freeze() does, so you can only ever use one of them?  That seems best now that I say it.
WDYT?

Hey, I was having a look at that last Monday but was too busy since.
My idea was to consume RCC and generate its content from the current values of the registers (something like fn from_current_config(self, hse_freq: Option<Hertz>) -> Rcc), so you can still apply some modification to the Rcc struct at that point, and then you would be able to call freeze() on it and passe the Clock around without any issue..
My current code is a bit too WIP right now, but what do you think about going that way

So, another method on RccExt, then?
I think that works as long as the caller doesn't modify the resulting Rcc struct in a way that causes .freeze() to break the clocks when applying the settings back to the registers.  It's also a little wasteful to read regs and then write them back to the same values, but that's not as big of an issue as it could be (the parts of this firmware that need to use this new API don't need to be tiny).
I have a WIP git change as well locally, with the initial .adopt_registers() idea (consuming a CFGR).  Haven't committed or pushed it yet, but it does compile, at least.
But I'd be up for either approach, sure.  LMK what you think about the .freeze() concern.


storage: updated documentation for read / write stream events

This properly documents the new events for read and write streams introduced in PR #824.

Thanks for catching this!


Make polyfill for requestAnimationFrame more robust

Many @raycast community members use swr to have a great caching solution for their extensions. Unfortunately they ran into a few issues that they patch in their extensions codebase right now. After chatting to @shuding, we thought it's best to fix this directly in the swr library to guarantee easy adoption. This shouldn't impact any other JS environments.
Problem
The polyfill for requestAnimationFrame relies on a full implementation of the window object. Not every JS environment provides this. F.e. we use Node.js in Raycast. In production builds, it doesn't offer a window object. However, in development builds we polyfill add a minimal window object to add support for react-devtools. The window object doesn't inlcude an implementation for requestAnimationFrame which SWR assumes.
Solution
I added an additional check to make sure the requestAnimationFrame is available in the JS environment. If not, it gets polyfilled with setTimeout. I don't check if requestAnimationFrame is a function. I took this as given.
Note: I tried to follow the coding style and added a new utility to check for the availability of requestAnimationFrame which is then used in the env.ts file.
Also, I'm not too familiar with the swr codebase. Please let me know if you think there would be a better way to fix it.

For the swr maintainers: is requestAnimationFrame required or would a microtask (Promise.resolve()) work too?

Thank you @thomaspaulmann for opening this PR, and the fix looks good to me!
@FezVrasta The best option here would be requestIdleCallback, but it's not that widely usable so we went with requestAnimationFrame and fallback to setTimeout. A microtask works too, but setTimeout still feels better to me. Because the intention is to not occupy any resource and and wait for React to render as well as finish state updates (which sometimes can be a microtask), before SWR revalidate the data. That's just because we already got something to display, and React's tasks are more important at this moment. So I'd still recommend using setTimeout as the fallback instead of Promise.resolve().

Thanks again for contributing, it's released as<EMAIL_ADDRESS>— give it a try.

Thanks a lot for the super quick merge and the clarification on the microtask.


Epoll event loop (linux)

Implements a custom event loop on top of epoll for Linux (and Solaris?), following RFC #7. It's not particularly optimized yet (e.g. it still allocates), but seems to be working.
TODO

[ ] #after_fork must close & nullify every Fiber#timerfd & update pending events to use the new fd ( :bug: );
[x] LibC bindings for aarch-linux-musl are wrong;
[ ] epoll_event.data should point to Node instead of fd, so we could skip searches ( :rocket: );
[ ] investigate segfault runs on CI;
[ ] support :preview_mt (broken CI);
[ ] extract fix for #14807 into distinct PR;
[ ] extract fix for double event dequeue in Fiber#cancel_timeout;
[ ] cleanup Crystal::Epoll::EventLoop (commented code, debug traces);
[ ] use :ev_epoll flag instead of forcing it for Linux (not yet: I want CI test runs);
[ ] more testing: please help to break it :hammer:

Urgh, supporting fork is painful. I must close the timerfds for each fiber (easy) but then I must mutate all pending events to use the new fd :weary:

I took care to use EPOLLEXCLUSIVE (available since 2017). I'm not sure we need EPOLLONESHOT since we register the fd once then dequeue readers/writers one by one. Now, there may still be races, especially in a MT environment, but there's little we can do without blocking the other readers/writers (there's no telling if a reader/writer will keep reading/writing).
I didn't know the close quirk. That explains why we unregister the file descriptors before we actually close. Now, if a fd is in multiple epoll instances, oops, this is likely already broken today :fearful:

The close quirk needs some experimental verification:

Q6    Will the close of an fd cause it to be removed from all epoll sets automatically?
A6    Yes.
https://linux.die.net/man/4/epoll

The close quirk

Could be they fixed it at some point, there has been a bunch of years since that post was written after all..

Another man page, a longer answer:

Yes,	but be aware of	the following point.  A	file descriptor	 is  a
reference  to  an  open file	description (see open(2)).  Whenever a
descriptor is duplicated via	dup(2),	dup2(2), fcntl(2) F_DUPFD,  or
fork(2),  a new file	descriptor referring to	the same open file de-
scription is	created.  An open file description continues to	 exist
until  all  file  descriptors  referring to it have been closed.  A
file	descriptor is removed from an epoll set	 only  after  all  the
file	 descriptors referring to the underlying open file description
have	been closed (or	before if the descriptor is explicitly removed
using epoll_ctl() EPOLL_CTL_DEL).  This means  that	even  after  a
file	 descriptor  that  is  part  of	 an epoll set has been closed,
events may be reported for that file	descriptor if other  file  de-
scriptors  referring	to the same underlying file description	remain
open.
https://man.freebsd.org/cgi/man.cgi?query=epoll&apropos=0&sektion=0&manpath=SuSE

The preview_mt issues are caused by thread B closing a fd while thread A is waiting; since each thread has its own eventloop this is creating issues, I end up not cleaning up the fd from thread A' epoll instance.
I'm trying to think of an efficient way to iterate the event loops on (something lighter than ThreadLocalValue), but may resort to iterate all EL for starters (and check if it fixes the MT issues).

Perhaps it is possible to have a lookup table fd -> loop (or probably - a bit less contentious in mt scenario - have a list in the FileDescriptor (well no, but you perhaps better understand what I mean compared to other choices of words) that keeps track of what epolls uses it). But it is an icky problem :(

It looks like it's starting to work... except for the interpreter that now hangs forever :sob:

Using a release compiler (with libevent), the interpreter segfaults :sob:
Building a compiler with epoll (as CI does) in non release, the interpreter enters a kind of infinite loop (100% CPU, silent strace) after printing the first spec dot (.). The last strace logs are:
epoll_create1(EPOLL_CLOEXEC)            = 13
eventfd2(0, EFD_CLOEXEC)                = 14
timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC) = 15
epoll_ctl(13, EPOLL_CTL_ADD, 14, {EPOLLIN, {u32=1958253120, u64=140490338505280}}) = 0
epoll_ctl(13, EPOLL_CTL_ADD, 15, {EPOLLIN, {u32=1958253072, u64=140490338505232}}) = 0
write(11, "\33[", 2
rite(11, "32", 232)                      = 2
write(11, "m", 1m)                       = 1
write(11, ".", 1.)                       = 1
write(11, "\33[", 2
rite(11, "0", 10)                       = 1
write(11, "m", 1m)                       = 1

It's creating the eventloop instance (epoll, eventfd, timerfd) then writes a colored . then nothing.
Any pointers to debug the interpreter itself?

I can't get tracing to work in the interpreted code, so I hacked myself into Crystal.trace and I see an infinite list of sched.event_loop traces :raised_eyebrow:

I only checked whether @events was empty and didn't check if @timers was, too :facepalm:

CI is finally green and the implementation can be reviewed!

how to roll out

Either opt-in with a flag... or we're bold and make it the default + a flag to opt-out. That will depend on how stable it will get until the next release.

Moving back to draft. There are some fixes in #14829 and... I got great ideas from the Go implementation that would allow to skip most of the synchronizations and take full advantage of epoll/kqueue (see https://github.com/ysbaddaden/execution_context/issues/30).

Superseded by #14959


Cannot Gen Javadoc on interface implementations

I have two classes as fllows
An interface SomeService

public interface SomeService{
    public voidSomeMethod;
}

An Implementation of SomeService

public interface SomeServiceImpl{
   private AnotherService anotherService;

   public voidSomeMethod{
    }
}

I can gen javadoc on SomeService
I cannot gen javadoc for method voidSomeMethod in class SomeServiceImpl
I cannot gen javadoc for field anotherService in class SomeServiceImpl

IntelliJ IDEA 14 Community Edition on MacOSX 10.10.2 with Java 8

sorry. Not enabled in configuration


Update Specification [chrysalis pt 2]

Description
With Chrysalis 2 changes just around the corner, we've started to prepare the transition for the client portion of Streams. Now we need to document those changes in the specification and update the version.
Motivation
Changes to the client format and transaction structure in the tangle requires updates for documentation purposes.
Requirements

[ ] Update transaction structure in spec
[ ] Update client usage in Channels Protocol section of spec

Open questions
Still an open rfc process for finalising Chrysalis, will there be any more significant changes on the front that require updating in our docs?

See https://github.com/iotaledger/streams/tree/chrysalis-2 for implementation


Allow to encode and decode TransactionMeta

Context
Since the field TransactionResult changed and doesn't return the contracts functions invocations results, now is required to add all the files necessary to decode the TransactionMeta being the field that contains the contracts invocations results.
Objective
Add all the required files to allow the encode and decode of TransactionMeta's

ℹ  Released in v0.13.0


Pushing onto two different arrays causes many reallocations

This fixes an issue raised on discord:
https://discord.com/channels/905194001349627914/905834552965103638/949343674272219226
On Solana, contract storage in storage in account data which is a
continious piece of memory. In order to support growable objects like
dynamic arrays, we have a mini heap implementation. This fixes a problem
in the realloc implementation.
Signed-off-by: Sean Young<EMAIL_ADDRESS>

Yes, you are right. I have added an explanation to the commit and the pr description.


Remove the zstd release note from 7.53.x

What does this PR do?
This removes the release note mentioning optional support for zstd compression from the 7.53.x branch.
Motivation
Related #25118
Some issues were noticed in the back end caused by the agent sending zstd. These need to be fixed before announcing.

/merge


Fix trivial typo and grammar in live docs

Type of changes

[ ] Bug fix
[ ] New feature
[X] Documentation / docstrings
[ ] Tests
[ ] Other

Checklist

[-] I've run the latest black with default args on new code.
[-] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
[-] I've added tests for new code.
[X] I accept that @willmcgugan may be pedantic in the code review.

Description
Fixes a trivial typo and grammar I found in the live docs while using them.

Thanks


ignoreImportsForOrganize does not behave as expected

System information

OS: Windows 10
TypeScript Hero version: 1.3.0
VSCode version: 1.13.1

Description
ignoreImportsForOrganize setting does not behave as expected.
Steps to reproduce

Add import:

import {} from '@types/googlemaps';

In the settings.json, ignore this import on organise:

"typescriptHero.resolver.ignoreImportsForOrganize":["@types/googlemaps"]

Reorganise imports (Ctrl-alt-o), import now becomes:

import undefined from '@types/googlemaps';

Actually, the ignoreImports does behave as expected, since the import is not removed 😉
BUT: the undefined part is definitly a bug.

Actually, if you just want to import the types for the sake of it, you could use import '@types/googlemaps'; But I don't know if there's any means to this.
I generally use that for reflect-metadata for example.

@buehler Ahh you are right in that the bug is with the organise imports operation rather than ignoreImportsForOrganize.
So in my specific use case I am using google maps in my Angular CLI project - my understanding is that the typescript compiler should find everything in node_modules/@types automatically - however it seems in the case of google maps there is some issue:
https://stackoverflow.com/questions/36064697/how-to-install-typescript-typings-for-google-maps
As suggested by the top solution, I am trying to use import {} from '@types/googlemaps';.
import '@types/googlemaps'; does not work - it produces an error as '@types/googlemaps' contains a typescript namespace rather than a typescript module.


Change flow export mechanism for Flow Aggregator

Introduced active and inactive flow timeout configuration knobs.
With active flow record timeout, every flow record is sent to the collector based on its own active expiry timeout value.
With inactive flow record timeout, a flow record is sent to the collector if no records are seen by the flow aggregator for the flow since it was last updated.
Followed the mechanism proposed in RFC: https://tools.ietf.org/html/rfc6183#section-5.3.1
Used priority queue approach to keep track of individual expiry values for records.
In addition, changing the Flow Exporter activeFlowTimeout to 30s from 60s, to keep it lower than the activeFlowTimeout at Flow Aggregator.
Fixes: #1637

Codecov Report

Merging #1949 (4d15b90) into main (e99a0bf) will decrease coverage by 17.91%.
The diff coverage is 62.19%.

@@             Coverage Diff             @@
##             main    #1949       +/-   ##
===========================================
- Coverage   60.10%   42.19%   -17.92%
===========================================
  Files         197      125       -72
  Lines       17217    15347     -1870
===========================================
- Hits        10348     6475     -3873
- Misses       5762     8335     +2573
+ Partials     1107      537      -570

Flag
Coverage Δ

kind-e2e-tests
?

unit-tests
42.19% <62.19%> (+0.33%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/controller/traceflow/controller.go
65.58% <ø> (-3.90%)
:arrow_down:

pkg/agent/openflow/pipeline.go
30.69% <33.33%> (-38.14%)
:arrow_down:

pkg/flowaggregator/flowaggregator.go
38.31% <57.44%> (-18.76%)
:arrow_down:

pkg/flowaggregator/priorityqueue.go
100.00% <100.00%> (ø)

pkg/ovs/openflow/ofctrl_packetout.go
71.49% <100.00%> (-15.43%)
:arrow_down:

pkg/agent/agent_linux.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/ovs/openflow/default.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/agent/config/node_config.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/agent/cniserver/pod_configuration_linux.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/apis/controlplane/v1beta1/register.go
0.00% <0.00%> (-92.86%)
:arrow_down:

... and 150 more

/test-all

Codecov Report

Merging #1949 (5c3396a) into main (2dda55c) will decrease coverage by 9.84%.
The diff coverage is 46.41%.

@@            Coverage Diff             @@
##             main    #1949      +/-   ##
==========================================
- Coverage   61.22%   51.37%   -9.85%
==========================================
  Files         270      265       -5
  Lines       20478    19855     -623
==========================================
- Hits        12538    10201    -2337
- Misses       6643     8357    +1714
  Partials     1297     1297

Flag
Coverage Δ

kind-e2e-tests
51.37% <46.41%> (-0.73%)
:arrow_down:

unit-tests
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/flowaggregator/flowaggregator.go
46.80% <43.06%> (-11.28%)
:arrow_down:

pkg/ipfix/ipfix_intermediate.go
66.66% <50.00%> (-13.34%)
:arrow_down:

pkg/agent/flowexporter/exporter/exporter.go
67.32% <60.00%> (-7.93%)
:arrow_down:

pkg/flowaggregator/priorityqueue.go
78.94% <78.94%> (ø)

pkg/agent/controller/egress/id_allocator.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/controller/networkpolicy/endpoint_querier.go
2.85% <0.00%> (-88.58%)
:arrow_down:

pkg/controller/egress/controller.go
0.00% <0.00%> (-83.88%)
:arrow_down:

pkg/agent/util/iptables/lock.go
0.00% <0.00%> (-81.82%)
:arrow_down:

pkg/apis/controlplane/v1beta1/conversion.go
1.16% <0.00%> (-79.85%)
:arrow_down:

pkg/cni/client.go
0.00% <0.00%> (-75.52%)
:arrow_down:

... and 80 more

/test-e2e

/test-e2e

I'm trying to understand why this code is added to Antrea and not to the aggregator implementation (exporter process) in the go-ipfix library. It seems that splitting the code leads to a lot of complexity, including in the locking model.

Currently, the exporting process in the Flow Aggregator uses the common package pkg/exporter in go-ipfix that is also used by the Flow Exporter. Aggregation process just aggregates the flow records and the maintenance of flow records before exporting is done in Antrea. This is the same with Flow Exporter at Antrea agent; we maintain the flow records in Antrea.

I'm also not sure about the logic in flowRecordExpiryCheck and the priority queue update. The way I was envisioning things was: 1) every time a new record is received by the aggregator, we update the appropriate item in the priority queue; 2) at any given time we have a timer set to expire based on the first item in the priority queue. Note that unless the priority queue is empty, the timer only needs to be updated (reset) after the first element of the queue is popped. This is because exiting items can only be pushed back in the queue. However, looking at the code I see calls to ForAllRecordsDo which doesn't seem right as it implies that we iterate over the records? Doesn't that defeat the purpose of having a priority queue. I could be misunderstanding the code.

We could maintain these queues in addition to the flow record map we have in the aggregation process. ForAllRecordsDo calls are essential to update the expiration times of all records based on popped item time in queue. Expiration times that were added earlier will not be current anymore and they need to be updated. I could not think of other ways to update it. Any thoughts?

ForAllRecordsDo calls are essential to update the expiration times of all records based on popped item time in queue. Expiration times that were added earlier will not be current anymore and they need to be updated. I could not think of other ways to update it. Any thoughts?

That's what I don't understand. The only time where you need to update these expiration times is when you pop an item from the queue or when you receive a record from a Node for that flow. I don't see how this requires a linear iteration over all flows?

/test-all

/test-e2e

/test-all
/test-ipv6-e2e
/test-ipv6-only-e2e

/test-all
/test-ipv6-e2e
/test-ipv6-only-e2e

/test-ipv6-e2e
/test-ipv6-only-e2e
/test-e2e

/test-ipv6-e2e
/test-ipv6-only-e2e
/test-e2e

/test-ipv6-e2e
/test-ipv6-only-e2e
/test-e2e

/test-ipv6-e2e
/test-ipv6-only-e2e
/test-e2e

/test-all

/test-ipv6-e2e
/test-ipv6-only-e2e

IPv6 jenkins e2e test seem to be broken. There are v6 specific changes. Merging for now.


Add musl targets

Go go gadget cross-rs! Was up late and thought I'd see if just adding the targets would work.
Fixes #27

Failure being caused by this: https://github.com/rusterlium/rustler/issues/470

@akrousset (and @conectado) On a slightly related note -- is it convention to use stable everywhere in the Rust ecosystem for CI pipelines and projects in general? Or is it more common to lock to a particular version to prevent drift like this?

@jamilbk Yes we should prefer to use stable and only version lock if needed. We could either lock to 1.61 for now or allow the clippy warnings until this fix goes through for Rustler.

@jamilbk Yes we should prefer to use stable and only version lock if needed. We could either lock to 1.61 for now or allow the clippy warnings until this fix goes through for Rustler.

That sounds good. I'll try my hand at some Rust today to ignore those clippy linter warnings.

@akrousset (and @conectado) On a slightly related note -- is it convention to use stable everywhere in the Rust ecosystem for CI pipelines and projects in general? Or is it more common to lock to a particular version to prevent drift like this?

Seconding what @akrousset said, normally, things like this shouldn't happen and there should be forward compatibility between rust versions. Editions however would break compatibility.
There's also the concept of minimum rust version which I think is not stabilized yet but it's used informally.


Remove need for platform overrides in SafeAreaView.js

Summary:
This file is forked in out of tree platforms as:

macOS > https://github.com/microsoft/react-native-macos/blob/main/Libraries/Components/SafeAreaView/SafeAreaView.js#L28-L33
Windows > https://github.com/microsoft/react-native-windows/blob/0.71-stable/vnext/src/Libraries/Components/SafeAreaView/SafeAreaView.windows.js#L30-L36

The change here removes the need of forking this file
Changelog:
[General] [Fixed] - [SafeAreaView] Remove need for platform overrides in SafeAreaView.js
Differential Revision: D47734944

@Saadnajmi  / @acoates-ms > looks good?

@Saadnajmi  / @acoates-ms > looks good?

Looks good to me. A few notes:

macOS should probably support SafeAreaView one day (since macOS has a similar native concept). I looked into it and it's doable, just not high priority for me. When that's done, I can just fork the file again to add macOS or change the check to isApple or something
Andrew Coates is OOF, so maybe @chiaramooney ?

@Saadnajmi > Ideally with this (and other changes to come) we would aim to limit the number of forked files 'out of tree platforms' have to maintain.
However for the macOS use case you mentioned you might still need one for the foreseeable future


Search doesn't work under certain circumstances

Expected behavior:
Search should return matching results
Actual behavior:
Under certain circumstances, search either errors out or doesn't return results.
Steps to reproduce:
There are two different issues:

When using ElasticSearch, a text search doesn't always return back the records it should.  For example, if there is a patient with the first name of "John", searching for John doesn't always return back that patient.
When ElasticSearch isn't enabled (config.searchURL is not configured - default value is not configured), there is a "slow" search that basically uses a temp couch view to search the database.  This search works for users who are system admins, but it fails for users who are not system admins.
Screenshots (if applicable):
N/A
OS and Browser:
All

Fixed by e705257.


5.4 Microsoft

Section 5.4 seems a bit unfair.  It implies that Microsoft doesn't like virtual machines, and doesn't like anything that doesn't run on Windows.  Both could be further from the truth.

Microsoft's virtual machine offerings include HyperV and Windows Azure VMs, both of which are supported in running non-Windows operating systems.

Microsoft's Azure environment explicitly embraces Linux.  See Linux and Open-Source Computing on Azure, and Microsoft Loves Linux

Microsoft has been producing Office for Macintosh, since Word for Mac debuted in 1984, and now has full versions of Office that run on OSX, iOS and Android.

Microsoft's new open-source version of the .NET Framework runs on Linux and OSX.

I could go on all day.  The sentiment expressed in section 5.4 is outdated and should be revised or removed.
Thanks.
Disclaimer - I work for Microsoft, but these are my own opinions, not any official company statement.

I couldn't agree more.
I thoroughly enjoyed this article, I think it's absolutely great. The only thing I couldn't understand was the Microsoft-hate, it just feels childish.
(I don't work for Microsoft, but spent most of my career in the MS-ecosystem.)

I interpreted this section differently.
First, the "virtual machine" referenced isn't virtual machine technology like Hyper-V locally or on Azure or anything like that, the reference is described in the previous section as the JVM/JRE, or Java Runtime Environment at times running as its own virtualized environment.
Read in that context, the opinion in this section about Microsoft is largely true long ago when MS decided to create the CLR as the head to head competitor to Java... a different approach to attaining the same objectives which is that a common app codebase could be used to create apps on numerous target platforms (Won't go into the technical details how the JVM/JRE and the CLR are different here)
Readers should understand that Paul's perspectives are clearly developed with a non-Microsoft, pro-Java history... which has to be OK because there's nothing wrong with that. It's what he knows which is representative of many, many others.

FWIW, @putztzu accurately described my intent. To add some color to this issue, Bill Gates, who currently works as a technology advisor at Microsoft, apparently liked the piece and felt that it "skillfully captures how code runs our lives." https://twitter.com/BillGates/status/613752323152719872

Regardless of intent, the section doesn't add anything to the piece and should be removed. Also get rid of the dig at C# devs. Microsoft hasn't been the "Evil Empire" since the 90s.

@putztzu - The exact line is:

You can’t have people choosing to run stuff on a virtual machine when they should be running it on Windows machines, as God and Bill Gates intended.

While the previous paragraph did talk about Java, this statement is blurring the line.  It doesn't even make sense within the context of the JVM runs just fine on Windows.
The rest of it is clearly about Java, but is just inflammatory.  Where is this coming from?

Of course if you are Microsoft, this is intolerable.

Really the whole first paragraph should be removed.  The second one is just fine by itself.

Don't understand where the implied Microsoft hate is at, the tail sentence in that section should clear any misunderstandings.
As a heavy user of Microsoft products I enjoyed the jab at "the big corp" (and the interpreted jab at Microsoft's competitive history.)
Similar to putztzu, I interpreted the section a bit differently, maybe not specifically about "VM"s as such, but more to the point of "it should be run as pure to the MS ecosystem, without third party rubbish" or something. The concept of system virtualization was never introduced, so I'm not sure where that association came from.
As a side note, as someone that has been supporting a Mac environ recently, it wouldn't be too unreasonable for someone to assume Microsoft dislikes Macs with it's current (and recent) version(s) of Office for Mac (along with it's quirks and lack of feature parity.) But that's neither here or there. Sorry!


[New Port Request] aria2c

I want to use aria2c  in windows.
so search it by vcpkg.
could not find it!

This is a library manager, not a centralized software manager like apt.

If this does not exist in vcpkg you can ask for a port request. However don't expect someone to create one for you in a short amount of time.

If you wish to add this port in the future, you can reopen this issue, but we're closing it for now.


[Android] Changes to column style padding to improve visual layout of content

Automatically generated task. Any updates to the title and body will be overwritten. Do NOT modify the labels.
Android implementation of #2755

We have decided not to make this change as it has negative effects on some existing cards.


Serialization/Deserialization of Date format

I have Request class with Date datatype property.
When sending in request Date api expects it  in format DD.MM.YYYY, and sending back Date in that format.
Is it possible to do that without changing generated code?
	var client = new PostsClient(httpClientRequestAdapter);

	var body = new Request()
	{
		PromjenaOd = new Microsoft.Kiota.Abstractions.Date(2020, 01, 01),
	};
	var response =  await client.Shema.GetStates.PostAsync(body,null);
	response.Dump();
	}

Thanks for raising this @hayama600,
Just to confirm, are you observing an issue during serialization or deserialization or both? I believe the format is currently yyyy-MM-dd which should mainly be an issue on serializing as the parser should be more lenient on deserialization.
You can probably post the correct date format in the meantime using the additionalData
var body = new Request();
body.AdditionalData["promjenaOd"] = new Date(2020, 01, 01).DateTime.ToString("DD.MM.YYYY");

If the client is generated from Kiota, are you able to share the openApi description used to generate the client, I suspect we should be able to use the date format in the description to help generate something that works better in the long run.

@hayama600
I suggest you change your description to use another format name (like us-date or so)
The date format is reserved to RFC3339 full date so YYYY-MM-DD

@hayama600 I suggest you change your description to use another format name (like us-date or so) The date format is reserved to RFC3339 full date so YYYY-MM-DD

I received a YAML file from a Croatian company, and they've used Croatian formats for dates and numbers. Unfortunately, I can't modify the expected date format in the API. I'm aware that I can manually replace each date with a string in the Kiota-generated model, but it would be much more convenient if I could provide custom serialization and deserialization for date and number formats.

I think we could probably provide a means of overriding the ToString method by allowing the passing of an extra format parameter to the Date class(constructor or another ToString overload) and that would allow serializing the date in a custom fashion. Thoughts @baywet?
However, as highlighted, as the date type is reserved, a valid description should probably not use the type, and the generated type by Kiota would probably not be the Date type but a string type with a format. Any chance you can share what the description has for the type, does it have a format property as well @hayama600?

@andrueastman is there anything preventing the client application from deriving from the type today and doing that already?

I had a similar thought, but the Date type is a struct so it really can't be inherited from.


No names when E-Mail login disabled

Hello :)
When you disable E-Mail login an anonymous user cannot use any name, it always reverts into "Anonymous", because the checkbox is disabled and can not be unclicked.

I'm also looking for a way to use names when E-mail login is disabled.

Fixed!


VQ code vectors

❓ Questions
Thanks for the nice paper/work!
I've a question:
How do I print the VQ code vectors of EnCodec?

model = EncodecModel.encodec_model_24khz()  # return the pretrained causal 24khz model
model.set_target_bandwidth(24)  # use all of the 32 codebooks (24kpbs)
model.quantizer.vq.layers[5]._codebook.embed # to show the 5+1=6th codebook of RVQ. shape is (1024,128) corresponding to (nbr_entries, dimensionality)

Awesome! Thanks.

Hello,
I'm new to these codecs  concepts. I didn't understand clearly, how these Codebooks are generated. Whether these are created on the fly or stored beforehand. Where Can I get complete information on code books creation and usage.
Thank You

Hi @HimaJyothi17, if I may answer your questions:

Whether these are created on the fly or stored beforehand.

The codebooks are created beforehand during training. Then you compute the most appropriate codes from these codebooks for a given audio on-the-fly. It is done by applying the RVQ algorithm on the continuous embedding of the audio signal provided by the Encoder.

Where Can I get complete information on code books creation and usage.

Maybe reading the original paper would be a good starting point :wink:

Thanks for the reply @jhauret !!
I've already gone through the original paper. But I didn't find much info on Codebook Creation. They did mention that, they've used 32 codebooks and are updated with 0.99 decay.
But I need info on how they created those 32 codebooks. Is it predefined with approaches like kmeans or created dynamically during training with random initialization?

 So the paper says that they followed the same procedure as Soundstream, which first introduced RVQ. In this Soundstream's paper you can find more details about codebook initialization and updates:

" The codebook of each quantizer is trained with exponential moving average updates, following the method proposed in VQ-VAE-2 [32]. To improve the usage of the codebooks we use two additional methods. First, instead of using a random initialization for the codebook vectors, we run the k-means algorithm on the first training batch and use the learned
centroids as initialization. This allows the codebook to be close to the distribution of its inputs and improves its usage. Second, as proposed in [34], when a codebook vector has not been assigned any input frame for several batches, we replace it with an input frame randomly sampled within the current batch. More precisely, we track the exponential moving average of the assignments to each vector (with a decay factor of 0.99) and replace the vectors of which this statistic falls below 2. "


Baklava faucet requires valid Keybase account

Details in https://docs.google.com/document/d/13I9wQfSriiQOWMZKb5YRkrdclZ4SowEoz3YusOSCtsU/edit#heading=h.w63hdoxbfy4o

[ ] Faucet accepts a form submission which includes a required URL to metadata

[ ] Pulls the metadata from that URL and verifies the keybase claim

[ ] Optionally -- Handles the case where someone sets the URL to be https://gist.github.com/timmoreton/01e54471eb159ec4c399d6ce2cd08a81 whereas they really meant https://gist.githubusercontent.com/timmoreton/01e54471eb159ec4c399d6ce2cd08a81/raw/master/

[ ] Further checks that the keybase user in the verified claim: "A Keybase account must have >= 2 external accounts verified (phone number, Twitter, GitHub with at least 1 repo, HN with at least 1 karma, Reddit with at least 1 karma) at least a month before the stake off starts i.e. before October 1st 2019"

[ ] Faucet only allows a Keybase username to be fauceted once

[ ] Faucet is a reserve spender -- hence there is no faucet account -- but we will still need single-threading here!

[ ] Configured in the migrations as a Reserve spender

[ ]  Makes transfers using Reseve's transferGold(address to, uint256 value) external returns (bool) method

[ ] Records the metadata URL and the keybase name as fields in the Firebase DB (so we can check not refauceted)

[ ] Prints clear error messages so the user can know what's wrong

Faucet killed.


X3 HAC - Modes

I think basic controlls like START/STOP Charging and maybe changing MODES (ECO/GREEN/FAST) will be nice.
Originally posted by @alna-laurentiu in https://github.com/PatrikTrestik/homeassistant-solax-http/issues/42#issuecomment-2556474093

@alna-laurentiu Mapping investigation is task for you.
You have to have car connected to be sure that it reacts. Sometimes it refuses some modes if it is not connected.

Switch modes in SolaX app and see what is changing in curl output ("optType=ReadSetData")
I expect it to be one of first positions. On G1 it is second >> [1] (zero based).
Values are here:

            0: "Stop",
            1: "Fast",
            2: "ECO",
            3: "Green",

As side efect you might look on "optType=ReadRealTimeData" and see if some values related to charging can be identified.

My mapping document is here https://github.com/PatrikTrestik/homeassistant-solax-http/raw/refs/heads/main/doc/Mapping.xlsx
Sorry, it is not well organized, only for my internal use. Left is G1 mapping (tested) and on right side is G2 (my guess).

Found some time today, i will paste the output here. (was not sure about the xlsx format you prefere :-) )
#####################
# Read Real Time DATA
#####################

curl -d "optType=ReadRealTimeData&pwd=XXXXXXXX" -X POST http://<IP_ADDRESS>/

# unpluged
{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[0,0,0,22701,23072,22538,0,0,0,0,0,0,0,0,0,983,0,19,19,65518,0,65535,13,65069,15,22,0,0,0,0,0,0,0,4986,4984,4984,4352,5137,6156,5,0,0,0,0,0,0,0,0,1,0,0,4409,4882,6156,48,1207,1000,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,50,15,0,15,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}
# Plugged but STOPED
{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[3,0,0,22549,23372,22879,0,0,0,0,0,0,0,2,0,985,0,19,19,65518,65530,223,2,62770,15,22,0,1,0,0,0,0,0,4988,4986,4986,6947,5137,6156,5,0,0,0,0,0,0,0,0,1,210,0,5665,5137,6156,48,905,1000,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,50,16,0,16,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}
# Charging FAST
{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[2,0,1,22456,23096,22782,1533,0,0,3450,0,0,3450,1,0,984,0,19,19,65518,65520,43,5,61547,14,21,0,2,0,0,0,0,0,4984,4982,4984,6183,5137,6156,5,0,0,0,0,0,0,0,0,1,126,0,5665,5137,6156,48,594,266,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,50,16,0,16,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}
# Charging ECO 10A
{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[2,0,2,22406,23084,22931,921,0,0,2064,0,0,2065,1,0,986,0,19,19,65518,1,68,65510,62897,15,21,0,2,0,0,0,0,0,4984,4982,4984,9236,5137,6156,5,0,0,0,0,0,0,0,0,1,281,0,7473,5137,6156,48,584,166,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,14,50,20,0,17,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}
# Charging GREEN 6A
{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[12,0,3,22500,23194,22896,69,0,0,0,0,0,0,0,0,985,0,19,19,65518,28,99,65344,62840,15,21,0,2,0,0,0,0,0,4988,4984,4986,8470,5137,6156,5,0,0,0,0,0,0,0,0,1,144,0,7473,5137,6156,48,594,1000,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,14,50,19,0,17,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}

###############
# Read SET DATA
###############

curl -d "optType=ReadSetData&pwd=XXXXXXXX" -X POST http://<IP_ADDRESS>/

# unpluged
[0,0,70,16,0,0,0,1,0,1,0,10,6,265,160,0,0,0,0,0,0,44,25,0,0,12593,12593,12593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4600,0,0,0,0,0,1,257,2,0,0,0,0,220,0]
# Plugged but STOPED
[0,0,70,16,0,0,0,1,0,1,0,10,6,265,160,0,0,0,0,0,0,44,25,0,0,12593,12593,12593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4600,0,0,0,0,0,1,257,2,0,0,0,0,220,0]
# Charging FAST
[0,1,70,16,0,0,0,1,0,1,0,10,6,265,160,0,0,0,0,0,0,44,25,0,0,12593,12593,12593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4600,0,0,0,0,0,1,257,1,0,0,0,0,220,0]
# Charging ECO 10A
[0,2,70,16,0,0,0,1,0,1,0,10,6,265,160,0,0,0,0,0,0,44,25,0,0,12593,12593,12593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4600,0,0,0,0,0,1,257,1,0,1,0,0,220,0]
# Charging  GREEN 6A
[0,3,70,16,0,0,0,1,0,1,0,10,6,265,160,0,0,0,0,0,0,44,25,0,0,12593,12593,12593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4600,0,0,0,0,0,1,257,1,0,2,0,0,220,0]

Thanks.
I see that RealTimeData[2] is MOde we are looking for.
In settings it is SetData[1].
Now comes harder part for you. When I tested my G1, I've found that for not obvious reason and without any "regularity", writes are for different positions.
You can see the problem in XLS. First few Setings are shifted by +1 when writing. Some others are completely off.
Possibility 1: For registers which are in G1, they will not change it. >> Mode write will be [2]
Possibility 2: They fixed the shift. >> Mode write will be [1]
You can test it by curl POST:
'optType=setReg&pwd=&data={"num":1,"Data":[{"reg": 2, "val": 3}]}'

this will set register 2 to val 3 (Green).
in case it is not register 2 you can change something else and possibly (small chance) destroy your charger.
Worst what happend to me was that I reset it to factory defauits. You can always write correct walue or use SolaX app to fix setting.
But you have been warned. This is complete mine field.

Once I have write confirmed I can isssue version with Mode entity.

cURL >'optType=setReg&pwd=&data={"num":1,"Data":[{"reg": 2, "val": 3}]}' failed after a couple seconds, did not changed anything.
Tested charging via app and so on everything still works so far... :-)
verbose output
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 80
> POST / HTTP/1.1
> Host: <IP_ADDRESS>
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Length: 74
> Content-Type: application/x-www-form-urlencoded
>
* Recv failure: Connection reset by peer
* Closing connection
curl: (56) Recv failure: Connection reset by peer

It is escaping problem.
I tested that curl needs to be:
curl -d "optType=setReg&pwd=SSSSSSSSS&data={"num":1,"Data":[{"reg":2,"val":"2"}]}" -X POST http://wallbox.lan
This works for me.

Please also send me response received (when it is succes).
From G1 i get something like "Y:code,message:"success"}"

Tested wit "val" 1, 2, 3 ...... message is success all the time but in the app i cant see anything that was changed...
curl -d "optType=setReg&pwd=XXXXXXXXXX&data={\"num\":1,\"Data\":[{\"reg\":2,\"val\":\"2\"}]}" -X POST http://<IP_ADDRESS>/
Y:code,message:"success"}

Tested with "val" 1, 2, 3 ...... message is success all the time but in the app i cant see anything that was changed...
curl -d "optType=setReg&pwd=XXXXXXXXXX&data={\"num\":1,\"Data\":[{\"reg\":2,\"val\":\"2\"}]}" -X POST http://<IP_ADDRESS>/
Y:code,message:"success"}

At least we have working write.
If your car was connected at the time of test, it is wrong register.
Try reg:1

That is bad news. From your list I see that it didn't set any register at all 😢
I have to decompile newest SolaX app and try to figer out how they are doing it. But it will be hard job, give me spome time.

Hi,
I also own x3 22kwh G2 charger
Let me know if I can help/test something.

@PatrikTrestik maybe we can open a solax support ticket and request some API infos, worth a try i would say.

@PatrikTrestik maybe we can open a solax support ticket and request some API infos, worth a try i would say.

Great idea. Please do it if you have a minute.
I asked SolaX support some time ago but I had no patience to get through L1 support. They ware cooperative, but not really understanding what is my "problem". It ended becouse my low patience.
But they published few new documents for SolaX invertor lately as part od Support solutions. Might be they help us.

I decompiled latest android app and I'm trying to reversengineer as before.
Will see if success.

By all my reading it should work. Writing to reg:2.
But it seams it does not.

i will try about 2-3h
what is expected result?

 By all my reading it should work. Writing to reg:2. But it seams it does not.

Hi @PatrikTrestik, I can confirm the 3 commands above all return a Y:code,message:"success". Do you require any other outputs? I do not have my EV Car yet, so unfortunately, I cannot test charging functionality at this stage. It is due to arrive in 3 months or so.

 By all my reading it should work. Writing to reg:2. But it seams it does not.

Hi @PatrikTrestik, I can confirm the 3 commands above all return a Y:code,message:"success". Do you require any other outputs? I do not have my EV Car yet, so unfortunately, I cannot test charging functionality at this stage. It is due to arrive in 3 months or so.

I also saw above to test with 'reg2', so I used and successfully returned a Y:code,message:"success" with the below:
curl -d "optType=setReg&pwd=XCQCxxxxx&data={"num":1,"Data":[{"reg":2,"val":"2"}]}"  -X POST http://xxx.xxx.xxx.xxx/

{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[0,0,0,22701,23072,22538,0,0,0,0,0,0,0,0,0,983,0,19,19,65518,0,65535,13,65069,15,22,0,0,0,0,0,0,0,4986,4984,4984,4352,5137,6156,5,0,0,0,0,0,0,0,0,1,0,0,4409,4882,6156,48,1207,1000,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,50,15,0,15,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}

@alna-laurentiu please test "reg: 52".
I found it in Android app code. It looks promissing to change Mode.

@PatrikTrestik Solax support shared a API document with me, but for what i see its for the Solax Cloud App :-(  let me know iy you want it.
Need to test more....but today i will not be able to make it....

It looks like we are missing some value or mapping incorect position.
Please add description of Charger state at times that it was "Unknown" and if you could, also curl read of GetRealTimeData.

@PatrikTrestik Solax support shared a API document with me, but for what i see its for the Solax Cloud App :-( let me know iy you want it.
Need to test more....but today i will not be able to make it....
Merry X-Max :-)

API for Claud is newarly same as local. But unfortunately their document contains only "read" registers.
I was able to find document for old G1 on SolaX cloud web, but please share. Might be it helps at least for readonly sensors.

{"SN":"XXXXXXXX","ver":"004.04","type":3,"Data":[0,0,0,22701,23072,22538,0,0,0,0,0,0,0,0,0,983,0,19,19,65518,0,65535,13,65069,15,22,0,0,0,0,0,0,0,4986,4984,4984,4352,5137,6156,5,0,0,0,0,0,0,0,0,1,0,0,4409,4882,6156,48,1207,1000,0,44,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,50,15,0,15,0,0],"Information":[11.000,3,"5030BXXXXXXXX",2,2.03,4.03,0.00,0.00,0.00,1,1,0,73],"OCPPServer":"","OCPPChargerId":"","QRContent":""}

@alna-laurentiu please test "reg: 52". I found it in Android app code. It looks promissing to change Mode.

Note. If you don't have car connected, solax app will show no change.
But it has to be reflected in ReadSetData.
While testing always do SetReg folowed by ReadSetData and grab output. It is because SolaX App logic masks some values and "simplifies" it.

Hi, just for clarification, setting val 1 and 2 will start charging (Nice :-) so i´m happy and grateful)
Status before all tests: Car is connected but not charging.

Yes, it is expected. And also you have to have correct setting of data source and hardware connection. My installation company did it wrong and I had to fix it myself. But it is different story 😄
Thanks for testing. I'll go through your data and possibly produce some beta version with Mode setting.

i think val:3 is doing nothing bc its GREEN Mode and no PV surplus atm.

Yes, it is expected. And also you have to have correct setting of data source and hardware connection. My installation company did it wrong and I had to fix it myself. But it is different story 😄
Thanks for testing. I'll go through your data and possibly produce some beta version with Mode setting.

thats something i also need to test, since i connected the charger to the inverster COM port and my wifes car can only charge with 1 phase (3.6kw, hyundai ioniq 38).

i think val:3 is doing nothing bc its GREEN Mode and no PV surplus atm.

Yes, it is expected. And also you have to have correct setting of data source and hardware connection. My installation company did it wrong and I had to fix it myself. But it is different story 😄
Thanks for testing. I'll go through your data and possibly produce some beta version with Mode setting.

thats something i also need to test, since i connected the charger to the inverster COM port and my wifes car can only charge with 1 phase (3.6kw, hyundai ioniq 38).

Do not wory about Phases. It works. Car has only L1 pin and will use only this. I have Ioniq 27 😄
Because you have all three phases connected, charger knows which is L1.
If COM connection is working charger will receive all pahses information.

Published v1.3.3 with working Select entity for Mode switching.
Also new statuses added. If you switch to GREEN, there is new status to show that it is waiting for power.
Please test.

Set charger max current 6A
curl -d "optType=setReg&pwd=xxxxxxxx&data={"num":1,"Data":[{"reg":54,"val":"6"}]}" -X POST http://<IP_ADDRESS>/
set charger max current 32A
curl -d "optType=setReg&pwd=xxxxxxxx&data={"num":1,"Data":[{"reg":54,"val":"32"}]}" -X POST http://<IP_ADDRESS>/

Published v1.3.3 with working Select entity for Mode switching.
Also new statuses added. If you switch to GREEN, there is new status to show that it is waiting for power.
Please test.

New 1.3.3 won't show charge mode, 1.3.2 works fine.

Set charger max current 6A curl -d "optType=setReg&pwd=xxxxxxxx&data={"num":1,"Data":[{"reg":54,"val":"6"}]}" -X POST http://<IP_ADDRESS>/
set charger max current 32A curl -d "optType=setReg&pwd=xxxxxxxx&data={"num":1,"Data":[{"reg":54,"val":"32"}]}" -X POST http://<IP_ADDRESS>/
also @PatrikTrestik please add "Single charge" total pos.14. 17 = 1,7 kWh
pos.1 is charger status :
0：Available 1：Preparing 2：Charging 3：Finishing 4：Faulted 5: Unavailable 6：Reserved 7：SuspendedEV 8：SuspendedEVSE 9：Update
curl -d "optType=ReadRealTimeData&pwd=xxxxxxx" -X POST http://<IP_ADDRESS>/ {"SN":"xxxxxxxx","ver":"003.02","type":3,"Data":[2,0,1,22674,23122,23351,603,607,602,1365,1402,1404,4173,17,1,2252,0,65524,11,15,65533,65535,65533,0,15,16,0,2,0,0,0,0,0,4988,4990,4994,5644,6423,6156,3,0,0,0,0,0,0,0,0,1,1382,0,14880,6417,6156,48,581,100,65236,20,0,0,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,14,50,31,0,31,0,0],"Information":[22.000,3,"5030M11111421D",2,2.03,4.03,0.00,0.00,0.00,1,1,0,0],"OCPPServer":"","OCPPChargerId":"","QRContent":""}

Charger Max Current - please separate other requirements to new Issue. We have to keep it tidy.

Read values are mostly mapped. No need to waste time testing. Just ask what you want and I'll let you know if it is known.
Also please separate issue.

Charger status is already there "Run Mode". Including new statuses for G2.
If not working again raise new Issue for me to fix it.

Published v1.3.3 with working Select entity for Mode switching.
Also new statuses added. If you switch to GREEN, there is new status to show that it is waiting for power.
Please test.

New 1.3.3 won't show charge mode, 1.3.2 works fine.

"Charger use mode" is Select entity not Sensor. Please check if really is not displayed.
Mught be that I didnt mention it, but you have to "reconfigure" integration to be able to show new entities.
It is not needed if no new entities are expected.

Charge modes should work in v1.3.3.
Please test and confirm if I can close this issue.

@PatrikTrestik I got everything working with Node-RED and Home Assistant. Maybe this will help.

All RealTimeParam:
`const stateMapping = {
0: "Available",
1: "Preparing",
2: "Charging",
3: "Finishing",
4: "Faulted",
5: "Unavailable",
6: "Reserved",
7: "SuspendedEV",
8: "SuspendedEVSE",
9: "Update",
10:"CardActivation",
11: "StartDelay",
12: "ChargePause",
13: "Stoping"
};
const modeMapping = {
0: "STOP",
1: "FAST",
2: "ECO",
3: "GREEN",
4: "MANUAL"
};
var chargerState = { payload: stateMapping[msg.payload.Data[0]] || "Unknown" };
var chargerModeState = { payload: modeMapping[msg.payload.Data[2]] || "Unknown" };
var chargeL1Voltage = { payload: +(msg.payload.Data[3] * 0.01).toFixed(2) };
var chargeL2Voltage = { payload: +(msg.payload.Data[4] * 0.01).toFixed(2) };
var chargeL3Voltage = { payload: +(msg.payload.Data[5] * 0.01).toFixed(2) };
var chargeL1Current = { payload: +(msg.payload.Data[6] * 0.01).toFixed(2) };
var chargeL2Current = { payload: +(msg.payload.Data[7] * 0.01).toFixed(2) };
var chargeL3Current = { payload: +(msg.payload.Data[8] * 0.01).toFixed(2) };
var chargeL1Power = { payload: +(msg.payload.Data[9]).toFixed(2) };
var chargeL2Power = { payload: +(msg.payload.Data[10]).toFixed(2) };
var chargeL3Power = { payload: +(msg.payload.Data[11]).toFixed(2) };
var chargeTotalPower = { payload: +(msg.payload.Data[12]).toFixed(2) };
var chargeSingleCharge = { payload: +(msg.payload.Data[13] * 0.1).toFixed(2) };
var chargeTotalCharge = { payload: +(msg.payload.Data[15] * 0.1).toFixed(2) };
var chargeSessionTime = {
payload: msg.payload.Data[49]
};
var totalSeconds = chargeSessionTime.payload;
var hours = Math.floor(totalSeconds / 3600);
var minutes = Math.floor((totalSeconds % 3600) / 60);
var seconds = totalSeconds % 60;
chargeSessionTime.payload = [
hours.toString().padStart(2, '0'),
minutes.toString().padStart(2, '0'),
seconds.toString().padStart(2, '0')
].join(':');
return [
chargerState,
chargeL1Voltage,
chargeL2Voltage,
chargeL3Voltage,
chargeL1Current,
chargeL2Current,
chargeL3Current,
chargeL1Power,
chargeL2Power,
chargeL3Power,
chargeTotalPower,
chargeSingleCharge,
chargeTotalCharge,
chargerModeState,
chargeSessionTime
];`
Set max current :
`msg.headers = {
"Content-Type": "application/x-www-form-urlencoded"
};
var current = msg.current;
msg.payload = "optType=setReg&pwd=XCUDAZB24A&data={"num":1,"Data":[{"reg":54,"val":"" + current + ""}]}";
return msg;`
Set Mode
`let mode = msg.payload;
let modeNumber;
switch (mode.toUpperCase()) {
case "STOP":
modeNumber = 0;
break;
case "FAST":
modeNumber = 1;
break;
case "ECO":
modeNumber = 2;
break;
case "GREEN":
modeNumber = 3;
break;
default:
modeNumber = null;  // Corrected variable name
break;
}
msg.headers = {
"Content-Type": "application/x-www-form-urlencoded"
};
msg.payload = "optType=setReg&pwd=XCUDAZB24A&data={"num":1,"Data":[{"reg":52,"val":"" + modeNumber + ""}]}";
return msg;`

Charge modes should work in v1.3.3.
Please test and confirm if I can close this issue.

Hi @PatrikTrestik, so far i tested all charging modes, everything is working as expected.
The only thing that is not showing is the "use mode", but its charging according to selected "use mode" mode.
For me this is not a big deal tbh... i´m fine with the current status! :-)
THX for the work you put in ;-)

@PatrikTrestik I got everything working with Node-RED and Home Assistant. Maybe this will help.

**All RealTimeParam:**

const stateMapping = {
   0: "Available",
   1: "Preparing",
   2: "Charging",
   3: "Finishing",
   4: "Faulted",
   5: "Unavailable",
   6: "Reserved",
   7: "SuspendedEV",
   8: "SuspendedEVSE",
   9: "Update",
   10:"CardActivation",
   11: "StartDelay",
   12: "ChargePause",
   13: "Stoping"
};

const modeMapping = {
   0: "STOP",
   1: "FAST",
   2: "ECO",
   3: "GREEN",
   4: "MANUAL"
};

var chargerState = { payload: stateMapping[msg.payload.Data[0]] || "Unknown" };
var chargerModeState = { payload: modeMapping[msg.payload.Data[2]] || "Unknown" };
var chargeL1Voltage = { payload: +(msg.payload.Data[3] * 0.01).toFixed(2) };
var chargeL2Voltage = { payload: +(msg.payload.Data[4] * 0.01).toFixed(2) };
var chargeL3Voltage = { payload: +(msg.payload.Data[5] * 0.01).toFixed(2) };
var chargeL1Current = { payload: +(msg.payload.Data[6] * 0.01).toFixed(2) };
var chargeL2Current = { payload: +(msg.payload.Data[7] * 0.01).toFixed(2) };
var chargeL3Current = { payload: +(msg.payload.Data[8] * 0.01).toFixed(2) };
var chargeL1Power = { payload: +(msg.payload.Data[9]).toFixed(2) };
var chargeL2Power = { payload: +(msg.payload.Data[10]).toFixed(2) };
var chargeL3Power = { payload: +(msg.payload.Data[11]).toFixed(2) };
var chargeTotalPower = { payload: +(msg.payload.Data[12]).toFixed(2) };
var chargeSingleCharge = { payload: +(msg.payload.Data[13] * 0.1).toFixed(2) };
var chargeTotalCharge = { payload: +(msg.payload.Data[15] * 0.1).toFixed(2) };

var chargeSessionTime = {
   payload: msg.payload.Data[49]
};

var totalSeconds = chargeSessionTime.payload;
var hours = Math.floor(totalSeconds / 3600);
var minutes = Math.floor((totalSeconds % 3600) / 60);
var seconds = totalSeconds % 60;

chargeSessionTime.payload = [
   hours.toString().padStart(2, '0'),
   minutes.toString().padStart(2, '0'),
   seconds.toString().padStart(2, '0')
].join(':');

return [
   chargerState,
   chargeL1Voltage,
   chargeL2Voltage,
   chargeL3Voltage,
   chargeL1Current,
   chargeL2Current,
   chargeL3Current,
   chargeL1Power,
   chargeL2Power,
   chargeL3Power,
   chargeTotalPower,
   chargeSingleCharge,
   chargeTotalCharge,
   chargerModeState,
   chargeSessionTime
];

**Read set param**
var chargeMaxCurrent = { payload: msg.payload[3] };
var chargeAuthMode = msg.payload[5];
var chargeAuthModeTxt = null;

if (chargeAuthMode === 0) {
   chargeAuthModeTxt = "PlugNCharge";
} else if (chargeAuthMode === 1) {
   chargeAuthModeTxt = "RFID";
} else if (chargeAuthMode === 2) {
   chargeAuthModeTxt = "APP";
} else {
   chargeAuthModeTxt = null;
}

chargeAuthMode = { payload: chargeAuthModeTxt };

return [

   chargeMaxCurrent,
   chargeAuthMode
];

**Set max current :**

msg.headers = {
 "Content-Type": "application/x-www-form-urlencoded"
};

var current = msg.current;
msg.payload = "optType=setReg&pwd=zzzzzzzz&data={\"num\":1,\"Data\":[{\"reg\":54,\"val\":\"" + current + "\"}]}";
return msg;`

**Set Mode**
let mode = msg.payload;
let modeNumber;

switch (mode.toUpperCase()) {
   case "STOP":
       modeNumber = 0;
       break;
   case "FAST":
       modeNumber = 1;
       break;
   case "ECO":
       modeNumber = 2;
       break;
   case "GREEN":
       modeNumber = 3;
       break;
   default:
       modeNumber = null;
       break;
}

msg.headers = {
   "Content-Type": "application/x-www-form-urlencoded"
};

msg.payload = "optType=setReg&pwd=zzzzzzzz&data={\"num\":1,\"Data\":[{\"reg\":52,\"val\":\"" + modeNumber + "\"}]}";
return msg

What is the issue? What is not working?

There is no issue, I was thinking maybe you can get some info what you can use in Solax HTTP integratsion.
like
chargeSessionTime
or
how to set
chargeMaxCurrent,
chargeAuthMode

There is no issue, I was thinking maybe you can get some info what you can use in Solax HTTP integratsion. like
chargeSessionTime or how to set chargeMaxCurrent, chargeAuthMode

This integration is already supporting G1 EVC and all sensors are working. See #42.
Only because I have no hardware at home, I don't want to blindly add G2 mappings. It is all on request because I have to have concrete person to test it.
If you are missing any entities, please raise new Issue. It is for easier tracking what is done and what not.
It ussually takes me no more than few days to enable entity for G2.

As @Evarra and @alna-laurentiu  reported "Charging Mode" is working.
Closing this as done.