RosBridgeClient Refactoring

We are just starting a major refactoring of the RosBridgeClient library.
Here are some things that we want to achieve:

add generic communication protocol interface
This enables us to easily switch between websocket-sharp, Websocket-Sharp-UWP .NET Websocket and to add other (also non-WebSocket) communication protocols in the future. Thanks to @jaguar243 for suggesting this in issue #21 months ago!
add NUnit tests
improve readability, code structure and performance

You can follow the current state of development on my fork.

On my fork we just completed refactoring the RosBridgeClient library and realised all points mentioned above.
Based on above changes RosBridgeClient now comes with a different syntax.
See RosSocketConsoleExample.cs for an example.
We thus will also update the Unity3D project and some Wiki pages before pushing the changes upstream.
Here are some advantages of the new verison:

All message types are strongly typed based on generics. No more types as arguments or Json Objects to parse.

string publication_id = rosSocket.Advertise<std_msgs.String>("publication_test");

The ROS message name is directly included in the message type definition. No separate message type dictionary is required.  See e.g. Messages.Standard.String.

RosSocket is instantiated by passing a IProtocol interface implementation, i.e.

RosSocket = new RosSocket(new RosBridgeClient.Protocols.WebSocketSharpProtocol(<IP_ADDRESS>));

The following two IProtocolimplementations currently exist :

WebSocketNetProtocol: using System.Net.WebSockets and requiring .NET 4.5+ to compile and Windows 8+ to run.
WebSocketSharpProtocol: our good old websocket-sharp interface that runs well with everything but UWP/.NET Core.
We skipped the WebSocketSharp-UWP implementation metioned above, since we think it will not be needed.
We should be able to easily write other implementations for also non Websocket (e.g UDP) protocols in the future if necessary.

We started setting up the first unit tests in RosSocketTests.cs.
We restructed the VS solutions such that all ROS# .dlls will be generated from one single  VS solution located in the directory ros-sharp/Libraries. Will will also migrate the UrdfImporter there.

I hope you guys like these modifications and will not have much effort adjusting your ROS# application to this update that will come in some weeks.
If you have any concerns about the changes, please inform us here in this issue.

Hi!
I am interested in using ros-sharp with the Hololens so I recently tested the code from @MartinBischoff 's fork with a very simple scene and an ImagePublisher message. I noticed some difference from siemens/ros-sharp in the way that the GameObjects and the scripts are related in the scene:

A protocol now needs to be specified for the Ros Conncetor Script
Image Publisher script needs to be related with a Ros Connector GameObject
unitytimepublisher removed
Player Settings  -> Other Settings -> Configuration -> Scripting Runtime Version: .NET 4.x Equivalent

When I use the code from this branch (siemens/ros-sharp) everything works perfectly fine (Image1 displayed using rviz) but it doesn't work when I used the new version (even if I use WebSockectSharp protocol - see Image2 attached).
I have tested in Unity 2018.1.6f1 and 2018.1.4f1. Is anyone else having an issue with this or am I omitting some other important steps? Thank you in advance for your help.

Hi @roalchaq ! Thanks for testing the code on my fork ;-) Thank you also for indicating the functional differences to the upstream version. The code on my fork is not ready yet, otherwise we would merge it upstream (into this branch as you call it).
The code here is working, but not with the Hololens as discussed here #33.

So, Martin, just to get things right, is it possible to deploy on HoloLens an application that uses ros-sharp or not? So far, I get lots of built erros when I try with .NET 4.6. . I tried with IL2CPP and I managed to deploy it on HoloLens but I get lot's of exceptions when I debug it, e.g.:
Exception thrown at 0x770C2502 in Project - Haptic Unity.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0290EB30.
Exception thrown at 0x770C2502 in Project - Haptic Unity.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0290E4F8.
Exception thrown at 0x770C2502 in Project - Haptic Unity.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0290F03C.
NotSupportedException: C:\Users\eakoria\Desktop\ClientVisual\AppCpp\Il2CppOutputProject\IL2CPP\libil2cpp\icalls\mscorlib\System.Reflection.Emit\DynamicMethod.cpp(19) : Unsupported internal call for IL2CPP:DynamicMethod::create_dynamic_method - System.Reflection.Emit is not supported.
  at System.Reflection.Emit.DynamicMethod.create_dynamic_method (System.Reflection.Emit.DynamicMethod m) [0x00000] in <00000000000000000000000000000000>:0
  at System.Reflection.Emit.DynamicMethod.CreateDynMethod () [0x00000] in <00000000000000000000000000000000>:0
  at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateParameterizedConstructor (System.Reflection.MethodBase method) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
  at System.Func`2[T,TResult].Invoke (T arg) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Utilities.ThreadSafeStore`2[TKey,TValue].AddValue (TKey key) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Utilities.ThreadSafeStore`2[TKey,TValue].Get (TKey key) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe (System.Object value) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <00000000000000000000000000000000>:0
  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value) [0x00000] in <00000000000000000000000000000000>:0
  at RosSharp.RosBridgeClient.RosSocket.Serialize (System.Object obj) [0x00000] in <00000000000000000000000000000000>:0
  at RosSharp.RosBridgeClient.RosSocket.sendOperation (RosSharp.RosBridgeClient.Operation operation) [0x00000] in <00000000000000000000000000000000>:0
  at RosSharp.RosBridgeClient.RosSocket.Subscribe (System.String topic, System.String rosMessageType, RosSharp.RosBridgeClient.RosSocket+MessageHandler messageHandler, System.Int32 throttle_rate, System.Int32 queue_length, System.Int32 fragment_size, System.String compression) [0x00000] in <00000000000000000000000000000000>:0
  at CommunicationROS.Start () [0x00000] in <00000000000000000000000000000000>:0

So, my question actually is the following: what is the current status of the ros-sharp? Would .NET 4.7 solve my problem?
Thanks

Hi,
Yesterday I asked a question regarding the HoloLens deployment of an app that uses ROS-Sharp. For some strange reason my comment was deleted by Siemens. Did I do something wrong?
Thanks

Hi @IoannisKaragiannis thanks for reaching out.
We had to delete your message since we considered it off-topic and not constructive. Please feel free to contact us via<EMAIL_ADDRESS>for further clarification.
Though Hololens was not the orignial  contents of this issue (@rolchaq brought it up only in his message above), I go into this topic here:
At our research group we have not developed and are currently not planning to develop ROS# applications for the Hololens. So, to be honest, I personally do not know whether ROS# or any branch works with it or not.
Of course we are very much interested in developing a perferably generic ROS-Unity communication framework. This is the reason why we are currently refactoring RosBridgeClient as discussed above. We expect that one nice side-effect of the new .NET ClientWebsocket implementation will be that it also works with the Hololens, due to the higher .NET Framework version and UWP support.
In this open source project everyone is kindly invited to contribute, find and resolve bugs, and adjust the ROS# code in his forks to his needs and liking. Thanks a lot to @tarukosu again for including a websocket-sharp version for UWP that is supposed to work with the hololens on his fork: https://github.com/tarukosu/ros-sharp/tree/support-for-uwp

Thanks for your thorough response.

done (cf. https://github.com/siemens/ros-sharp/commit/34fb2a8ddd58c5f099b1e4b887a253b954808fb4)


Classes and Properties Missing

Bonjour @pierrechoffe ,
I have seen that some classes and properties are missing. I don't know if that is because they are not verified yet.
Classes:

M9_Derivation_Type
M36_Performer_Type
M37_Cast_Performer

Properties:

U30_created_track
U33_has_intended_performer
U34_has_performer_type

Are you using the document "Nouvelles Classes & Properties.xlsx" for building the ontology? Maybe I am checking an old version.

Hi Eva,
Thank you for this. I am presently in a meeting with Marie, so to answer quickly :
M9 and U30 must be added, I will do this tomorrow :)
As for the performed related classes and properties, I did not include them because CRM-SIG were very interested in the subject and would like to be part of the modelisation which is still a work in progress.
This is a tricky one, basically the idea is to modelise the intension of the composer as to how many performers should be performing one medium of performance. So, since we do not have a clear solution yet, we cannot include these classes and properties in the model.
I will check the version of new classes and properties but I think it is the right one.
Thanks !
Pierre

Le 3 mai 2016 à 10:10, Eva Fernández<EMAIL_ADDRESS><EMAIL_ADDRESS>a écrit :
Bonjour @pierrechoffe https://github.com/pierrechoffe ,
I have seen that some classes and properties are missing. I don't know if that is because they are not verified yet.
Classes:
M9_Derivation_Type
M36_Performer_Type
M37_Cast_Performer
Properties:
U30_created_track
U33_has_intended_performer
U34_has_performer_type
Are you using the document "Nouvelles Classes & Properties.xlsx" for building the ontology? Maybe I am checking an old version.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/DOREMUS-ANR/doremus-ontology/issues/1

Hi Eva,Thank you for this. I am presently in a meeting with Marie, so to answer quickly :M9 and U30 must be added, I will do this tomorrow :)As for the performed related classes and properties, I did not include them because CRM-SIG were very interested in the subject and would like to be part of the modelisation which is still a work in progress. This is a tricky one, basically the idea is to modelise the intension of the composer as to how many performers should be performing one medium of performance. So, since we do not have a clear solution yet, we cannot include these classes and properties in the model.I will check the version of new classes and properties but I think it is the right one.Thanks !PierreLe 3 mai 2016 à 10:10, Eva Fernández<EMAIL_ADDRESS>a écrit :Bonjour @pierrechoffe ,I have seen that some classes and properties are missing. I don't know if that is because they are not verified yet.Classes:
M9_Derivation_Type
M36_Performer_Type
M37_Cast_Performer
Properties:
U30_created_track
U33_has_intended_performer
U34_has_performer_type
Are you using the document "Nouvelles Classes & Properties.xlsx" for building the ontology? Maybe I am checking an old version.—You are receiving this because you were mentioned.Reply to this email directly or view it on GitHub

@fernanev
I just added M9 and U30. The reason they were not added in the first place was that U30 had not been discussed in the modelisation wg yet ; regarding M9, this raises an interesting question which I wanted to address before adding the class in Protégé :
M9 Derivation Type is the range of R2.1 has type which is a property of R2 is derivative of.
These properties of properties are listed in the owl description (see e.g. P14 and P14.1) but they do not have a description for themselves. How are they treated ? If I understand it right, the typed property has to be reified, how would this be modelled in Protégé ?
All best, Pierre

Hi Pierre, your question is correct, but I am afraid that we will not have an answer so easily.
We found this FRBRoo document in which they explicitely declare that it is impossible to write that properties in a RDF-compliant way (read paragraph 1.6).
For now I suggest to treat them just as FRBRoo do, so declare them in a comment, in this way
<owl:ObjectProperty rdf:about="http://erlangen-crm.org/efrbroo/R2_is_derivative_of">
     ...
     <rdfs:comment>
        Examples:
        William Schuman’s orchestration of Charles Ives’s ‘Variations on America’ (F15) R2 is derivative of Charles Ives’s ‘Variations on America’ (F15) R2.1 has type orchestration (E55)
        Charles Ives’s musical work entitled ‘Variations on America’ (F15) R2 is derivative of the musical work titled ‘America’ (F15) R2.1 has type variations (E55)
        The musical work entitled ‘America’ (F15) R2 is derivative of the musical work entitled ‘God save the King’ (F15) R2.1 has type same tune with different lyrics (E55)
        Properties:R2.1 has type: E55 Type
   </rdfs:comment>
   ....
</owl:ObjectProperty >

Hi Eva,
but how they dealt with in CRM ? the Cidoc-CRM ontology has lots of them
(e.g. P14 carried out by P14.1 in the role of) . Maybe it is not to be
detailed in the ontology but only in the implementation, is this what you
mean ?
p
2016-05-04 16:42 GMT+02:00 Pasquale Lisena<EMAIL_ADDRESS>
Hi Pierre, your question is correct, but I am afraid that we will not have
an answer so easily.
We found this FRBRoo document
http://library.ifla.org/1150/1/207-leboeuf-en.pdf in which they
explicitely declare that it is impossible to write that properties in a
RDF-compliant way (read paragraph 1.6).
For now I suggest to treat them just as FRBRoo do, so declare them in a
comment, in this way
<owl:ObjectProperty rdf:about="http://erlangen-crm.org/efrbroo/R2_is_derivative_of">
...
rdfs:comment
Examples:
William Schuman’s orchestration of Charles Ives’s ‘Variations on America’ (F15) R2 is derivative of Charles Ives’s ‘Variations on America’ (F15) R2.1 has type orchestration (E55)
Charles Ives’s musical work entitled ‘Variations on America’ (F15) R2 is derivative of the musical work titled ‘America’ (F15) R2.1 has type variations (E55)
The musical work entitled ‘America’ (F15) R2 is derivative of the musical work entitled ‘God save the King’ (F15) R2.1 has type same tune with different lyrics (E55)
Properties:R2.1 has type: E55 Type
</rdfs:comment>
....
</owl:ObjectProperty >
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/DOREMUS-ANR/doremus-ontology/issues/1#issuecomment-216886806


docs:create showcase page

Closes #13
📝 Description

Migrate showcase's data from Awesome Chakra UI into configs/showcase.json
Create a showcase page
Implement a script showcase-preview-images.ts built with puppeteer and sharp to get preview images

⛳ Current behavior (updates)
No showcase page
🚀 New behavior
Layout in Large Screen

Layout in Medium Screen

Layout in Small Screen

Layout in Mobile Screen

Showcase's display when hovering on it

💣 Is this a breaking change (Yes/No):

No
📝 Additional Information
Package Added in this pr

puppeteer
@types/puppeteer

@YenTingWu this looks great! I didn't have the time to do a proper PR review, but just by looking at the page I have some notes/ideas:

We should find a good place to put the Showcase link (probably below the Team link in the sidebar)
I think we should use softer shadows on the cards
Bring the "Showcase" and "Meet Websites Built with Chakra UI" a bit closer together
We should find a way to automatically update the Showcase page. Maybe use octokit to periodically fetch awesome-chakra-ui's README file and try to parse the contents? If you think we should restructure the awesome-chakra-ui repo, or have any ideas feel free to share them.

Thank you so much for working on this 🙏

Hi, @lazarnikolov94

That will be a nice place (below the Team link in the sidebar) to put the link, but I think I need an icon for that. Could you design one for me?
I think we should contain both the site's url and the github's url (or maybe just site's url) in awesome-chakra-ui. Otherwise, when using puppeteer to get the preview image, I'll only get an image for the github repo. That's super weird.
The reason I put the link on the icons is because some sites contain both urls (github and site). If I want to display both of them, I need two icons to show the link. It might be not straightforward enough. If you have a better solution, please feel free to let me kwow!
Using octokit will be great. I will rewrite the script and fix UI issues ASAP.

Hey @YenTingWu! I've created a Patch for you that adds a sidebar link to the Showcase, plus I did some minor UI touches. Check it out.
0001-docs-showcase-added-sidebar-link-to-showcase-UI-fixe.patch.zip

@lazarnikolov94 I used or-image.png as a placeholder if there is no a preview image. In this case, I think we should show the mask by default to display the title and the url.

Hi @lazarnikolov94,
I've rewritten the script with octokit. We now can get the parsed data from awesome-chakra-ui automatically! I also found a way to get the site's url as well, so I think we don't need to restructure the repo.
Btw, I created a pr #9 in awesome-chakra-ui to remove a missing repo, can you review it?

Hey @YenTingWu, let's also create a GitHub Action to fetch the awesome-chakra-ui contents periodically (once a day) and open a PR with the new contents. What do you think?

HI @lazarnikolov94 Do you mean leave the page content here and create a new pr with script and daily.yml?
Or just create a pr with the new daily.yml

HI @lazarnikolov94 Do you mean leave the page content here and create a new pr with script and daily.yml? Or just create a pr with the new daily.yml

Yep, add it to the daily.yml config.

I noticed you don't have the showcase-data:gen added in the daily.yml. We should have this auto-generate the showcase data on a daily basis. Can you look into adding it?

@lazarnikolov94 I thought that should be another pr #92

@lazarnikolov94 I thought that should be another pr #92

Totally missed that one 😁 thanks!

On the other hand, I noticed you don't have the dotenv config placed. If you don't do that, the process.env.OCTOKIT_TOKEN is not going to get picked up. Do this at the top of the file:
import dotenv from 'dotenv'

dotenv.config()

Also, I just remembered that we already have a GitHub token, so use process.env.GITHUB_TOKEN instead.

On the other hand, I noticed you don't have the dotenv config placed. If you don't do that, the process.env.OCTOKIT_TOKEN is not going to get picked up. Do this at the top of the file:
import dotenv from 'dotenv'

dotenv.config()

Great catch! I've fixed that

@YenTingWu before we merge, can you add a "Submit your project" link to the awesome-chakra-ui repo in the subtitle? Just by looking at it you can't really know that we're pulling data from the awesome repo. Folks who'd want to appear on the Showcase page will be looking for a way, so let's add a "Submit your project" link in the subtitle.


fix: GATLING_VERSION path glob

MANIFEST.MF file is not being generated correctly due to an empty GATLING_VERSION environment variable:
$ ./bin/enterprisePackage.sh
GATLING_HOME is set to /mnt/hgfs/gatling-charts-highcharts-bundle-3.7.5
ls: cannot access '/mnt/hgfs/gatling-charts-highcharts-bundle-3.7.5/lib/gatling-app-*.jar': No such file or directory
GATLING_VERSION is set to ''
Creating package...
Package created

$ unzip target/package.jar META-INF/MANIFEST.MF && cat META-INF/MANIFEST.MF
Archive:  target/package.jar
  inflating: META-INF/MANIFEST.MF
Manifest-Version: 1.0
Gatling-Version:
Gatling-Packager: bundle
Created-By: 17.0.1 (N/A)

Adjust path glob to "${GATLING_HOME}/lib/gatling-app-"*.jar to fix this:
$ ./bin/enterprisePackage.sh
GATLING_HOME is set to /mnt/hgfs/gatling-charts-highcharts-bundle-3.7.5
GATLING_VERSION is set to '3.7.5'
Creating package...
Package created

$ unzip target/package.jar META-INF/MANIFEST.MF && cat META-INF/MANIFEST.MF
Archive:  target/package.jar
  inflating: META-INF/MANIFEST.MF
Manifest-Version: 1.0
Gatling-Version: 3.7.5
Gatling-Packager: bundle
Created-By: 17.0.1 (Eclipse Adoptium)

Tested on:

macOS 12.2.1 (bash & zsh)
Arch Linux (bash & zsh)

I've cherry-picked on the 3.7 branch only as we'll drop those scripts in upcoming 3.8.
Thanks a lot!


libkpod: sandbox: refactor to memory store

same as #1198 but for release-1.7 branch - note that we're not using the release-1.0 branch anymore as this way we can avoid confusion around 1.0->1.7 - especially for people integrating automation with our repository.

/test all

@mrunalp PTAL


Added expected finish charging localtime to teslamate site

I've added the requested feature for displaying the expected finishing time of charging on the TeslaMate site, as per the discussion in issue #3483.
Here's an image showcasing the update:

Very cool this new feature, but it seems it's off by 1 hour for me. Is there a setting somewhere?

Very cool this new feature, but it seems it's off by 1 hour for me. Is there a setting somewhere?

Have you changed the default timezone via TZ env var in docker compose file?
https://docs.teslamate.org/docs/configuration/environment_variables

Thanks for the quick response! Resolved!

Resolved! Thanks for the quick response and my feature request!

@JakobLichterfeld,
Perhaps we should include a note in the release notes advising users to adjust the TZ environment variable if the expected time is incorrect.

Not sure about this. Grafana can use local browser time. What about Elixir?
Wanted to include your change in yesterday's release and did not fully check the consequences to be honest.
I always set TZ.

It is possible to use local browser time in Elixir live views, but considering the limited scope of the web API, wonder if it is worth it. Might be easier just to set TZ (assuming this works correctly - not tested yet myself).
For details on how to do this see https://alex-min.fr/live-view-browser-timezone/ (top search result; no idea if this is the best or not)

Is there a way to not have it default to 24 hours @NirKli ? Is that defined in the TZ environment variable?

Perhaps that could be handled via an environment variable. Similar to GF_DATE_FORMATS_FULL_DATE...

I would say either an environment variable or a setting variable (via database) similar to temperature and tire pressure.

I’m getting the wrong time zone too, and I have the TZ line set correctly. Is there something else to change to get the correct time zone?

I’m getting the wrong time zone too, and I have the TZ line set correctly. Is there something else to change to get the correct time zone for estimated charge completion?

Please double-check your value is valid (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If the error still persists afterward, please open an issue and share your TZ settings.

I’m getting the wrong time zone too, and I have the TZ line set correctly. Is there something else to change to get the correct time zone for estimated charge completion?

Please double-check your value is valid (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If the error still persists afterward, please open an issue and share your TZ settings.

I believe I double checked and it seems to be correct, and even after restarting Docker/whole Mac, I can't seem to get this to work.
`version: '3'
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:

ENCRYPTION_KEY=lxxx
DATABASE_USER=teslamate
DATABASE_PASS=secret
DATABASE_NAME=teslamate
DATABASE_HOST=database
MQTT_HOST=mosquitto
TZ=America/Los_Angeles`

seems to be right, I opened a seperate issue for you, #3665


[Fix bug 1195252] Stack vouch information on profiles

Coverage remained the same at 92.534% when pulling dba779ea0ed2daba496c67b172238299b21a51a5 on comzeradd:stack-vouches into c9245d46e0d75aec178be6107c1d5c93756456de on mozilla:master.

@akatsoulas r?
I'm adding a screenshot in case @ppapadeas would also like to have a look at the UI

Let's hold on that until we create a holistic take on annotation information on profiles (vouch included)

Pushed another commit to this, but let's wait till #1436 is merged.

Coverage remained the same at 92.534% when pulling 0d5c9086df828e6e3acba7a0b6b97a6dccbcce48 on comzeradd:stack-vouches into 1ebc088c297a245bd8b156b0e4a3617f38c99c8b on mozilla:master.

Also please drop the second commit from this PR. Let's keep one change in each PR.


Continued response to Tuple topic feedback

Fixes #1889
Much of these had been addressed by @svick. Adding the remaining open
items.

@terrajobst Can you review my edits on types on which language features depend and .NET standard? I want to make sure it's accurate.
/cc @richlander


support uri scheme for parameter files by creating a new parameter --parameter-file

Is your feature request related to a problem? Please describe.

Unable to use @ for parameter file reference in Powershell 7. It requires to create scripts for windows batch and linux separate than Powershell 7. Also, Powershell has more features in command line than windows command terminal.
Describe the solution you'd like

Instead of modifying the parameters argument to support URI format to reference parameters file, create a new argument to support URI convention to support local files.
Describe alternatives you've considered

Update parameters to support URI convention for parameters to refer local files.
like --parameters ./parameters.json that will work in all environments
Additional context

add to S170

The reason why we don't design separate parameters for files is that we don't know which parameter should be read from the file. In other words, users can use a file as input for any parameter.
@ is a more general approach which supports all parameters. In PowerShell terminal, @ is reserved for splatting. To use it in az as a file name indicator, you only need to escape it:
# Escape with backtick
az<EMAIL_ADDRESS>
# Surround with single quotes
az<EMAIL_ADDRESS>
# Surround with double quotes
az<EMAIL_ADDRESS>
For more info about PowerShell usage, please see About Quoting Rules and About Special Characters.
For Azure CLI usage, please see Tips for using Azure CLI effectively.


Added Throughput caclulation

Hi!
Can you accept this code change? I'd like to use go-metrics in my project, but I need a few little improvements... Maybe will make more pull requests.

@vlkv I would replace Throughput with Rate and also this needs tests prior to merging.

I'll rename Throughput to Rate (it's a better name, I agree). Please take a look at InmemFileDumper, in this branch.
I'll try to add tests in near future

Added general tests, please check

Any activity, please...

@vlkv I've left some feedback. I'd ask that you remove inmem_file_dumper.go entirely, as its not something I want to support in this package, but you should be able to cleanly move it into a separate library.

OK, I've removed inmem_file_dumper.go and modified formula

Thanks!


Compile Failure on OSX

Hey, this doesn't seem to build on OSX on rust 1.10.0 stable.
Here's a gist with the output of cargo build --verbose:
https://gist.github.com/jac32/b6c78e6a0f92be7a00fbf04a4e0c9727

I've just pushed a fix for this. Would you care to test and let me know if there are any other issues?

Yeah I can do that 👍

Master works on OS X. Version 0.1.1 gave me the same problem as was reported here.

@waywardmonkeys: Thanks. I've published master to crates.io as version 0.1.2.


⚠ ClamAV has degraded performance

In 15b27b4, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 46 ms

Resolved: ClamAV performance has improved in eaa608b after 5 minutes.


SimpleTcpClient no longer works after update to version <IP_ADDRESS> - <IP_ADDRESS>

No data are received on the event

Hi @tinohager which OS and framework/runtime were you using?  I tested .NET Framework, .NET Core, and .NET 5 and 6, and had no issue.  Could you help me reproduce?

Cancel that, looks like you're referring to server to client communication.  I just tested all versions client to server.  Looking into it now.

Windows 10/64bit in my unit test i have optimize the test case Start_StartServerAndConnectWithOneClientAndSendMessages_Successful

Thanks, my patch in <IP_ADDRESS> broke it trying to resolve another issue.  I've unlisted <IP_ADDRESS>+ from NuGet and will work on resolving this.  Thanks for letting me know.  NetworkStream.ReadAsync doesn't actually use CancellationTokens that are passed into them which caused me to have to do some strange gymnastics with tasks.  I will do my best to get to it this weekend.  Thanks for letting me know.

https://github.com/dotnet/runtime/issues/24093

Exactly 😊

@tinohager I'd love to get your opinion on how to address this.  The easiest way, in the client DataReadAsync, is to use synchronous .Read calls against the stream, having set the _networkStream.ReadTimeout to _settings.ReadTimeoutMs and the same for _sslStream.  That parameter Stream.ReadTimeout is not considered when using .ReadAsync.
I'm still looking for a solution that leverages async.
Here's what I've come up with for sync:
        private async Task<byte[]> DataReadAsync(CancellationToken token)
        {
            byte[] buffer = new byte[_settings.StreamBufferSize];
            int read = 0;

            try
            {
                if (!_ssl)
                {
                    read = _networkStream.Read(buffer, 0, buffer.Length);
                }
                else
                {
                    read = _sslStream.Read(buffer, 0, buffer.Length);
                }

                if (read > 0)
                {
                    using (MemoryStream ms = new MemoryStream())
                    {
                        ms.Write(buffer, 0, read);
                        return ms.ToArray();
                    }
                }
                else
                {
                    throw new SocketException();
                }
            }
            catch (IOException)
            {
                // thrown if ReadTimeout (ms) is exceeded
                // see https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.networkstream.readtimeout?view=net-6.0
                // and https://github.com/dotnet/runtime/issues/24093
                return null;
            }
        }

And beforehand, setting the _networkStream.ReadTimeout and _sslStream.ReadTimeout in both Connect() and ConnectWithRetries.
Doing this synchronously is not optimal but it does work (quite well).  Would you happen to have a suggestion?  Or if this is sufficient, I'll put together a new version and publish.  Cheers, Joel

using System;
using System.IO;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

class TestClient : IDisposable
{
    private readonly TcpClient _tcpClient;
    private readonly Stream _stream;
    private CancellationTokenSource _cancellationTokenSource;

    public TestClient()
    {
        this._cancellationTokenSource = new CancellationTokenSource();
        this._tcpClient = new TcpClient();

        _ = Task.Run(async () => await this.DataReceiver(this._cancellationTokenSource.Token), this._cancellationTokenSource.Token);

        IAsyncResult ar = this._tcpClient.BeginConnect("<IP_ADDRESS>", 20007, null, null);
        WaitHandle wh = ar.AsyncWaitHandle;

        if (!ar.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(1000), false))
        {
            this._tcpClient.Close();
            wh.Close();
            throw new TimeoutException($"Timeout connecting to");
        }

        this._tcpClient.EndConnect(ar);
        this._stream = this._tcpClient.GetStream();

        this._stream.WriteAsync(new byte[] { 0x06, 0x01 });
    }

    public void Dispose()
    {
        Console.WriteLine($"{nameof(Dispose)} - start...");

        this._cancellationTokenSource.Cancel();
        this._cancellationTokenSource.Dispose();

        this._stream.Close();
        this._stream.Dispose();

        if (this._tcpClient.Connected)
        {
            this._tcpClient.Close();
        }
        this._tcpClient.Dispose();

        Console.WriteLine($"{nameof(Dispose)} - done");
    }

    private async Task DataReceiver(CancellationToken cancellationToken = default)
    {
        while (!cancellationToken.IsCancellationRequested && this._tcpClient != null)
        {
            if (!this._tcpClient.Connected)
            {
                Console.WriteLine($"{nameof(DataReceiver)} - Client not connected");
                await Task.Delay(100).ConfigureAwait(false);
            }

            try
            {
                Console.WriteLine($"{nameof(DataReceiver)} - Wait for data...");
                using var timeoutCancellationToken = new CancellationTokenSource(100);
                using var linkedCancellationToken = CancellationTokenSource.CreateLinkedTokenSource(timeoutCancellationToken.Token, cancellationToken);

                await DataReadAsync(linkedCancellationToken.Token).ContinueWith(async task =>
                {
                    if (task.IsCanceled)
                    {
                        Console.WriteLine($"{nameof(DataReceiver)} - Timeout");
                        return;
                    }

                    byte[] data = task.Result;

                    if (data == null)
                    {
                        Console.WriteLine($"{nameof(DataReceiver)} - No data received");
                        await Task.Delay(100).ConfigureAwait(false);
                        //continue;
                    }

                    Console.WriteLine(BitConverter.ToString(data));

                }).ConfigureAwait(false);
            }
            catch (Exception exception)
            {
                Console.WriteLine($"{nameof(DataReceiver)} - {exception}");
                break;
            }
        }
    }

    private async Task<byte[]> DataReadAsync(CancellationToken cancellationToken)
    {
        byte[] buffer = new byte[100];

        var numberOfBytesToRead = await this._stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
        Console.WriteLine($"{nameof(DataReadAsync)} - NumberOfBytesToRead:{numberOfBytesToRead}");

        using (var memoryStream = new MemoryStream())
        {
            await memoryStream.WriteAsync(buffer, 0, numberOfBytesToRead, cancellationToken).ConfigureAwait(false);
            return memoryStream.ToArray();
        }
    }
}

The Timeout work with netcoreapp 3.0 and NET 6

I was looking for a test tool to simulate certain cases but didn't find anything optimal right away. What do you use?

with .net 4.8 DataReadAsync is not stopped on cancellationToken
What exactly is the requirement here? Do you want the client to just stop properly or do you want to start reading over and over again?

Hi @tinohager the issue is that if you call Disconnect on the client, it has to terminate the DataReceiver which needs to cancel the stream.ReadAsync in DataReadAsync.  The original issue was that calling Disconnect followed by Connect from the client wouldn't work.
It appears I'll either have to a) use the sync solution I referenced above or b) put in preprocessor #if statements to have separate code for .NET Framework, .NET Core, .NET5/6.
Do you have a preference?  Cheers and thanks for your input.

Can you check this logic?
using System;
using System.IO;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

class TestClient : IDisposable
{
    private TcpClient _tcpClient;
    private Stream _stream;
    private CancellationTokenSource _cancellationTokenSource;

    public TestClient()
    {
        this._cancellationTokenSource = new CancellationTokenSource();

        _ = Task.Run(async () => await this.DataReceiver(this._cancellationTokenSource.Token), this._cancellationTokenSource.Token);
    }

    public void Dispose()
    {
        Console.WriteLine($"{nameof(Dispose)} - start...");

        this._cancellationTokenSource.Cancel();
        this._cancellationTokenSource.Dispose();

        this._stream?.Close();
        this._stream?.Dispose();

        if (this._tcpClient != null)
        {
            if (this._tcpClient.Connected)
            {
                this._tcpClient.Close();
            }
            this._tcpClient.Dispose();
        }

        Console.WriteLine($"{nameof(Dispose)} - done");
    }

    public void Connect()
    {
        this._tcpClient = new TcpClient();

        IAsyncResult ar = this._tcpClient.BeginConnect("<IP_ADDRESS>", 20007, null, null);
        WaitHandle wh = ar.AsyncWaitHandle;

        if (!ar.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(1000), false))
        {
            this._tcpClient.Close();
            wh.Close();
            throw new TimeoutException($"Timeout connecting to");
        }

        this._tcpClient.EndConnect(ar);
        this._stream = this._tcpClient.GetStream();
    }

    public void Disconnect()
    {
        this._stream?.Close();
        this._stream?.Dispose();
        this._tcpClient.Close();
        this._tcpClient.Dispose();
    }

    public async Task SendDataAsync()
    {
        await this._stream.WriteAsync(new byte[] { 0x06, 0x01 });
    }

    private async Task DataReceiver(CancellationToken cancellationToken = default)
    {
        while (!cancellationToken.IsCancellationRequested)
        {
            if (this._tcpClient == null)
            {
                Console.WriteLine($"{nameof(DataReceiver)} - TcpClient not initialized");
                await Task.Delay(100, cancellationToken).ContinueWith(task => { }).ConfigureAwait(false);
                continue;
            }

            if (!this._tcpClient.Connected)
            {
                Console.WriteLine($"{nameof(DataReceiver)} - Client not connected");
                await Task.Delay(100, cancellationToken).ContinueWith(task => { }).ConfigureAwait(false);
                continue;
            }

            if (this._stream == null)
            {
                Console.WriteLine($"{nameof(DataReceiver)} - Stream not ready");
                await Task.Delay(100, cancellationToken).ContinueWith(task => { }).ConfigureAwait(false);
                continue;
            }

            try
            {
                Console.WriteLine($"{nameof(DataReceiver)} - Wait for data...");

                await Task.Run(async () =>
                {
                    using (cancellationToken.Register(() => this._stream.Close()))
                    {
                        await DataReadAsync(cancellationToken).ContinueWith(async task =>
                        {
                            if (task.IsCanceled)
                            {
                                Console.WriteLine($"{nameof(DataReceiver)} - Timeout");
                                return;
                            }

                            byte[] data = task.Result;

                            if (data == null)
                            {
                                Console.WriteLine($"{nameof(DataReceiver)} - No data received");
                                await Task.Delay(100).ConfigureAwait(false);
                                return;
                            }

                            Console.WriteLine(BitConverter.ToString(data));

                        }).ConfigureAwait(false);
                    }

                }, cancellationToken).ContinueWith(task => { }).ConfigureAwait(false);
            }
            catch (Exception exception)
            {
                Console.WriteLine($"{nameof(DataReceiver)} - {exception}");
                break;
            }

            Console.WriteLine($"{nameof(DataReceiver)} - restart loop");
        }

        Console.WriteLine($"{nameof(DataReceiver)} - Stop");
    }

    private async Task<byte[]> DataReadAsync(CancellationToken cancellationToken)
    {
        byte[] buffer = new byte[100];

        Console.WriteLine($"{nameof(DataReadAsync)} - Read data...");
        var numberOfBytesToRead = await this._stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
        Console.WriteLine($"{nameof(DataReadAsync)} - NumberOfBytesToRead:{numberOfBytesToRead}");

        using (var memoryStream = new MemoryStream())
        {
            await memoryStream.WriteAsync(buffer, 0, numberOfBytesToRead, cancellationToken).ConfigureAwait(false);
            return memoryStream.ToArray();
        }
    }
}

The logic below seems to work fine for me for all .NET variants. Otherwise I would recommend to use an #if block so it is clear what the old code is. And can be easily removed at some point.

Awesome, this works perfectly @tinohager, packaging into a new release now.  Then onto the PRs you submitted.  Thanks again

NuGet: https://www.nuget.org/packages/SuperSimpleTcp/<IP_ADDRESS>
Commit: https://github.com/jchristn/SuperSimpleTcp/commit/1e92103d7c5051f9e4308cddd932cd6d67cad360


eval.sh and create_ref_sys.sh disagree on tool names

In testing the test (more!) I came across this situation: I run eval.sh to get the usage, showing:
Usage: eval.sh <data> <system> <<optionalSAD>>
where data is the folder containing the data
and system is the system you want
to evaluate. Choices are:
  ldc_sad
  noisemes
  tocombosad
  opensmile
  diartk
  yunitate
If evaluating diartk, please give which flavour
of SAD you used to produce the diartk transcription
you want to evaluate

But then when I actually run it, and somewhere I didn't notice the output(?) it seems that an enclosed script create_ref_sys.sh is necessary to create reference .lab files for the scoring tool(s) to use. But it (internally, and does not list names via it's usage, just talks about "model prefix" which confuses me) is looking for different names:
if ! [[ $model_prefix =~ ^(ldc_sad|noisemes_sad|tocombo_sad|opensmile_sad|lena_sad|
                            diartk_ldcSad|diartk_noisemesSad|diartk_tocomboSad|diartk_opensmileSad|
                            diartk_goldSad|goldSad|yunitator|lena)$ ]]; then
    echo "You're trying to create folder containing the reference transcriptions, and the predicted ones."
    echo "However, you specified a wrong tool name."

Now that I re-read the usage for eval.sh I'm not sure the usage "If evaluating diartk, please give which flavour of SAD you used to produce the diartk transcription you want to evaluate" - where and how should a person do this, maybe by example?" is asking me to do. Do I create a compound name like diartk_noisemes maybe? Or maybe this is where "system name" comes into play, with names like "diartk_noisemesSad", "diartk_tocomboSad", "diartk_opensmile_Sad" etc. as specified farther down inside create_ref_sys.sh and evalDiar.sh and evalSAD.sh
So two points, really: the usage is confusing, and in the case of eval.sh when I give it noisemes, it fails to produce reference transcriptions because it wants noisemes_sad
AHA, it's starting to make more sense: inside of evalSAD.sh it maps it's arguments such as ldc_sad, noisemes, tocombo_sad, opensmile, lena_sad into the variable sys_name. This is an intermediate system name understood by create_ref_sys.sh, but lost in translation, because create_ref_sys.sh wants system names to have capitalization, as in the error message above ldcSad`, etc.  The changing of case names makes this really confusing (and in fact broken, I think?)

Ok fixed the bug! In create_ref_sys.sh it was creating reference files with .rttm.lab filenames. These were breaking the evaluation later on. The resulting behavior was that the code that tests for existence of ref and sys .lab files was not finding them (names were wrong) and ALWAYS outputting scores of "75.00%  0.00%   100.00%" rather than running score.py

My bad. I should have been more careful about the .lab files.
I wrote this script to refactor the code that was common between evalDiar.sh and evalSAD.sh
Now that you fixed that, I think the error messages should be clear enough and everything should work well.
The non-clarity comes from the model naming convention which is not consistent with itself + not consistent with the output rttm files. We need to improve that. :/


fixset operation's result type is wrong if decimal overflows

Proposed changes
select cast(1.0 as decimal(27,9))  union all select cast(2.0 as decimal(34,4));
the old result type is decimal(43, 9) which overflows. This pr limit the result type to decimal(38, 4).

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


Powercalc Group shows wrong Power Sensors / (counts Device Power instead of Power)

System Health details
System Information

version
core-2024.4.0

installation_type
Home Assistant OS

dev
false

hassio
true

docker
true

user
root

virtualenv
false

python_version
3.12.2

os_name
Linux

os_version
6.6.20-haos

arch
x86_64

timezone
Europe/Berlin

config_dir
/config

Home Assistant Community Store

GitHub API
ok

GitHub Content
ok

GitHub Web
ok

GitHub API Calls Remaining
5000

Installed Version
1.34.0

Stage
running

Available Repositories
1401

Downloaded Repositories
63

HACS Data
ok

AccuWeather

can_reach_server
ok

remaining_requests
41

Home Assistant Cloud

logged_in
true

subscription_expiration
1. Januar 2018 um 01:00

relayer_connected
false

relayer_region
null

remote_enabled
false

remote_connected
false

alexa_enabled
true

google_enabled
true

remote_server
null

certificate_status
null

instance_id
c936bf03d0884bf6a86c7b610dc1677b

can_reach_cert_server
ok

can_reach_cloud_auth
ok

can_reach_cloud
ok

Home Assistant Supervisor

host_os
Home Assistant OS 12.1

update_channel
stable

supervisor_version
supervisor-2024.03.1

agent_version
1.6.0

docker_version
24.0.7

disk_total
30.8 GB

disk_used
17.3 GB

healthy
true

supported
true

board
ova

supervisor_api
ok

version_api
ok

installed_addons
Mosquitto broker (6.4.0), Zigbee2MQTT (1.36.1-1), Studio Code Server (5.15.0), Let's Encrypt (5.0.15), Terminal & SSH (9.10.0), ZeroTier One (0.18.0), ledfx (d7e3146), Home Assistant Google Drive Backup (0.105.2), Node-RED (17.0.11), RPC Shutdown (2.4), AirCast (4.2.1), Glances (0.21.1), Log Viewer (0.17.0), Portainer (2.0.0), ESPHome (2022.3.1), Samba share (12.3.1), AirSonos (4.2.1), ESPHome (2024.3.1), EMQX (0.5.0), SQLite Web (4.1.2), Epic Games Free (debian-2024-03-17-2), wgeasy (12), File editor (5.8.0)

Dashboards

dashboards
4

resources
32

views
13

mode
storage

Recorder

oldest_recorder_run
29. März 2024 um 17:05

current_recorder_run
4. April 2024 um 22:02

estimated_db_size
574.86 MiB

database_engine
sqlite

database_version
3.44.2

Spotify

api_endpoint_reachable
ok

Checklist

[X] I have read the FAQ to see if there is a known solution to my problem.
[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..

Describe the issue
Severel Smart Plugs (Nous A1T, PlusPlugS), which are added through discovery in the GUI do not work correctly when using then in a Powercalc Group. They all Have Device Power Sensor, also when enabling Utilitymeter afterwards.
When i create a Group with theses Powercalc Sensors they only count the "Device Power" not the "Power".
Using self created virtual sensors which dont have Device Power it works flawlessly.
Reproduction steps

Add Shelly PlusPlugS from Autodiscovery
Create Powercalc Group "All Power" over Integrations GUI
Add Shelly "PlusPlugS 4" to powercalc sensors, leave everything else default and create the Group.
only sensor.power_all_power/ Watt sensor gets created but shows only the Device Power of 1,1W
Added a second powercalc sensor Tasmota NOUS A1T to Group "All Power"
Now the other kWh Sensors appeard. From the Tasmota device also only the Device Power is added to sensor.power_all_power
...

Debug logs
https://pastebin.com/h7506SDv

Diagnostics dump or YAML config
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2024.4.0",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.12.2",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Berlin",
"os_name": "Linux",
"os_version": "6.6.20-haos",
"supervisor": "2024.03.1",
"host_os": "Home Assistant OS 12.1",
"docker_version": "24.0.7",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"variable": {
"version": "3.4.2",
"requirements": [
"iso4217==1.11.20220401"
]
},
"tuya_local": {
"version": "2024.3.2",
"requirements": [
"tinytuya==1.13.2"
]
},
"virtual": {
"version": "<IP_ADDRESS>",
"requirements": []
},
"tuya_v2": {
"version": "1.5.0",
"requirements": [
"tuya-iot-py-sdk==0.4.1"
]
},
"localtuya": {
"version": "5.2.1",
"requirements": []
},
"better_thermostat": {
"version": "1.4.0",
"requirements": []
},
"pyscript": {
"version": "1.5.0",
"requirements": [
"croniter==1.3.8",
"watchdog==2.3.1"
]
},
"truenas": {
"version": "0.0.0",
"requirements": []
},
"spotcast": {
"version": "v3.6.30",
"requirements": []
},
"spook": {
"version": "2.2.4",
"requirements": []
},
"uptime_kuma": {
"version": "2.1.0",
"requirements": [
"pyuptimekuma-hass"
]
},
"climate_group": {
"version": "0.4.2",
"requirements": []
},
"alexa_media": {
"version": "4.9.2",
"requirements": [
"alexapy==1.27.10",
"packaging>=20.3",
"wrapt>=1.14.0"
]
},
"bosch": {
"version": "0.25.0",
"requirements": [
"bosch-thermostat-client==v0.25.0"
]
},
"powercalc": {
"version": "v1.11.4",
"requirements": [
"numpy>=1.21.1"
]
},
"alarmo": {
"version": "v1.9.15",
"requirements": []
},
"nodered": {
"version": "3.1.3",
"requirements": []
},
"openmediavault": {
"version": "0.0.0",
"requirements": []
},
"o365": {
"version": "v4.7.0",
"requirements": [
"O365==2.0.34",
"BeautifulSoup4>=4.10.0"
]
},
"sonoff": {
"version": "3.6.0",
"requirements": [
"pycryptodome>=3.6.6"
]
},
"switch_manager": {
"version": "1.3.3",
"requirements": []
},
"battery_notes": {
"version": "2.2.5",
"requirements": []
},
"bosch_shc": {
"version": "0.4.88",
"requirements": [
"boschshcpy==0.2.91"
]
},
"ui_lovelace_minimalist": {
"version": "v1.3.9",
"requirements": [
"aiofiles==0.8.0",
"aiogithubapi>=22.2.4"
]
},
"hacs": {
"version": "1.34.0",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"dwains_dashboard": {
"version": "3.6.0",
"requirements": []
},
"sleep_as_android": {
"version": "2.3.0",
"requirements": [
"pyhaversion"
]
}
},
"integration_manifest": {
"after_dependencies": [
"integration",
"utility_meter"
],
"codeowners": [
"@bramstroker"
],
"config_flow": true,
"dependencies": [
"light",
"group",
"template",
"select",
"utility_meter"
],
"documentation": "https://github.com/bramstroker/homeassistant-powercalc",
"domain": "powercalc",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/bramstroker/homeassistant-powercalc/issues",
"name": "Powercalc",
"requirements": [
"numpy>=1.21.1"
],
"version": "v1.11.4",
"is_built_in": false
},
"data": {
"entry": {
"entry_id": "25569d91b6b50cda79c0b7fad79d66ad",
"version": 2,
"minor_version": 1,
"domain": "powercalc",
"title": "PlusPlugS 4",
"data": {
"entity_id": "switch.plug_4",
"manufacturer": "shelly",
"model": "shelly plus plug s",
"unique_id": "pc_E465B8B5B2A8-switch:0",
"sensor_type": "virtual_power",
"name": "PlusPlugS 4",
"_power_entity": "sensor.plusplugs_4_device_power",
"_energy_entity": "sensor.plusplugs_4_device_energy"
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "integration_discovery",
"unique_id": "pc_E465B8B5B2A8-switch:0",
"disabled_by": null
}
}
}

This is actually working as expected.
The discovered smart plugs only provide a virtual power sensor for the self usage of the smart plug. They all consume a littlebit of energy, and Powercalc creates a power and energy sensor to get insights in these. These are called "Device power" by convention.
Entities for the actual power used by the connected appliance are already applied by the integration providing the smart plug.
To also include the existing power and energy sensors in your group (not the virtual "device power" ones) you can add the in Additional power sensors and Additional energy sensors options.
Hope this helps and clarifies things up for you.

Okay Thanks. then I guess I just use the Additional sensors for the non virtual Plugs..
My thought was, when I enable Utility Meter after adding the Shelly Plug through discovey dont I have Powercalc power sensor then?

Does this not work because the Shelly Integration power sensor still exist in Background?

When you toggle utility meter for the "discovered" shelly plug profile, it only applies to the virtual power and energy sensor created by powercalc.
As that whole GUI configuration entry is purely for the self usage / device power of the smart plug.
When you also would like to create the utility meters for the existing power and energy sensors provided by the smart plug itself you can use the "Real power" option, see here: https://homeassistant-powercalc.readthedocs.io/en/latest/sensor-types/real-power-sensor.html.
When you've done that you can also add it as a member sensor to the group, and you don't have to use Additional power sensors and Additional energy sensors options in that case.

I recreated 2 Sensors in GUI using Energy from real power sensor. One with utility meter enabled and one without.

When i create a group they both dont show up in the list of available members.
I also reloaded hassio

By recreated you mean you removed the ones added by powercalc and created manually using "Energy from real power" option?

Yes. I removed them and used this one:

I meant to say in my comment to add the "Energy from real power" additionally to the existing sensors from powercalc library.

Then i got one from library
and one from real power
Then I can select the one from library but this does not change behaivour.
or did I get it wrong?

You mean they are not selectable here?

Correct, the Energy from real power sensor ones from the screenshot dont show up there.

Could you share the diagnostics from the two integration entries you added?

And screenshot of what you see in the Member entities dropdown?
That might help finding the issue.

Sure
Plug 1: config_entry-powercalc-b911aa47e27e28bf6abee4b0828c60f9.json
Plug 4: config_entry-powercalc-a26ffec2a83a8a9f923ba3ca27a94a2d.json

PlusPlugS4 is the discovered one / from library : config_entry-powercalc-310939cde88624e10fadf695cadb5270.json

Fixed with #2187.
You can install the master branch with HACS to test.
Or wait until next release, but that will probably be next weekend.

Great 👍 I'm gonna test with next release update.


Add documentation for shifting from npm to yarn

we have recently shifted from "npm" package manager to "yarn" package manager and now need to update the documentation.

hey @Deepu178 can you assign me this task?


Buffer Data If Server Connection Failed

Problem: Lost data (didnt receive) from 18 hours due to server maintenance.
It would be a nice feature if the data would be stored locally when the connection to the server fails (connection failed) and then sent completely when a new connection is available (successful connection).

Closing the issue as data buffering is already available. If there are any other requests, please create a new issue.


Implement read status message on ChoiceGrid

From Paul:

There are a few ways we could do this. The simplest was is probably using the CSS visited psudo-class, though it might not be suitable if the html doesn't quite match up to what we'd need.
Otherwise, we could store the information of what pages you've viewed in local storage or something. Is this already built? If so, I can have a stab at hooking it up.

@ThePaulMcBride the homepage grid is setup now if you still fancy this one

Yea, I'll take a look at this later today!

Alright, turns out you can only change certain styles using the visited pseudo classes and it won't work for what we need. I'll need to build it with a local storage solution or something. I'll have another crack at it tomorrow.

It's working now! Not my best code, but it works!

Great stuff, I've now styled it. Closing


Visual regression testing

Short description of changes:

Visual regression tests for wavesurfer core library using gemini (See below for an explanation of what this is)
Added duration parameter to ws.load function in order to correctly render according to minPxPerSec when using WebAudio and peaks. (Wavesurfer doesn't know how long the audio is until it decodes – This allows us to explicitly pass the duration until the audio is decoded)
Both backends fire waveform-ready (when the waveform is visible) and ready (when the audio is decoded/playable)
Added ws.hasWave flag, analogous to the ws.isReady flag
Updated the regions and timeline plugin to initialise on the waveform-ready event and hasWave flag.
Fixed minor bugs that I discovered in the process in order to create correct reference screenshots:

Responsive

The responsive parameter didn't accept 0 because it is a falsey value. This meant that a debounce timeout of 0 was not possible.
Resizing function (when responsive is set) should only be called if scrollParent is not true
Progress was incorrectly scaled when the waveform was resized. This was fixed by using the redraw event

Other

Redraw was triggered at the end of drawBuffer – AFAIK this is wrong since in createDrawer we listen for this event and call drawBuffer when it is fired. (redraw is a "command" event, not a "notification" event) – If such an event is required we should add a new event redrew (or similiar)

Breaking in the external API:

There might be breakage due to the change of events. The events should behave like this:

waveform-ready a waveform has been drawn with a certain set of peaks. This is not called when scrolling or zooming, but is called when new peaks arrive, for example when the audio was decoded.
ready the audio has been decoded and is playable (webaudio) or the audio is playable because the media element has fired the canplay event

Breaking changes in the internal API:
See above.
Todos/Notes:

The testing workflow is documented in the readme, but I've also documented it at the bottom of this text.
Creating reference screenshots and testing sometimes fails for some reason (probably to do incomplete audio decoding etc.) – rerunning the tests fixes the issue. But this should be fixed before ...
We can write browserstack to incorporate this into our CI system
We should also write (visual) tests for the plugins

What is "Visual regression testing"

[…] it's a series of tests that run through your site, take screenshots of various components, compare those screenshots against a baseline, and alert you when things change.

(source)
Visual regression testing workflow
To set up visual regression testing do:
npm install -g gemini
npm install -g selenium-standalone
selenium-standalone install

Then to update reference images:
# start the selenium server (needs to run in a seperate tab)
selenium-standalone start

# start the webpack server (needs to run in a seperate tab)
npm start

# start the gemini ui
gemini-gui

PS: I know this is larger than PRs should be.

@mspae this branch has conflicts.

Wow, this is great!

Okay, so the status on this is:
I will split it up into smaller PRs (some of which are already open/merged) – also I will be a little more conservative with the whole "change rendering events etc." shenanigans.
Already open or merged part-PRs:

responsive bugs
redraw/redrew

TBD PRs:

Duration param for WebAudio
Tests

@katspaugh @thijstriemstra So once #1239 is merged I'll open a PR purely for the tests.

No feedback.
This pull request is heavily out of date and should be merged forward. Please do that or open a new pr.


Makefile generates circular assembly dependencies

Make doesn't like how we are doing assembly dependencies very much. I'm not quite sure why the circular dependencies exist, but they do:
make: Circular kernel/arch/x86/hal/wrappers.asm <- kernel/arch/x86/hal/wrappers.asm.o dependency dropped.
make: Circular kernel/arch/x86/hal/gdt_load.asm <- kernel/arch/x86/hal/gdt_load.asm.o dependency dropped.
make: Circular kernel/arch/x86/start.asm <- kernel/arch/x86/start.asm.o dependency dropped.

If anyone knows how to fix this, I'd appreciate it. The makefile can be found at kernel/Makefile.

Closed by fa2e7833f20b94f2e7ba8f7dd6d69a8be766c30f


Rearrange and clarify topology

Hey @marvinroger,
I've rearranged and rephrased a few things. Real changes are:

Rename weatherstation base to outdoor-probe to not be in conflict with "base topic"
Clarify "ID Format" section
Clarify "Topology" section
State that only homie/ is eligible for automatic discovery
Add the info that properties are published to the base topic

If you care about blame statistics, you could do a simple rearrange commit before merging my changes.
Let me know if anything is not to your liking.
Ping @kwave @bertmelis @euphi

That's perfect! 👍


Assets Handles

I am new to bevy and ran into a few issues today and both came back to be something with bevy_asset_loader, though maybe I am missing something.  Note that I am forked and using bevy_main, (no rev)

Assets Unloaded

So after adding a few *.wav files to an AssetCollection, I would have an issue where the state change state on load never happening, and the asset collections never got added as resources so panic.  Funny enough though if I ran in --release they would.  After some poking around got some info from  Res<LoadingAssetHandles>
AudioSource Collection - Not release
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - NotLoaded
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - Loading
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - Loading
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - Unloaded
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - Unloaded
...

Texture Collection- Not release
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - NotLoaded
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - Loading
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - Loading
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - Unloaded
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - Unloaded
...

Font Collection - Not release - Works
"bevy_asset::handle::Handle<bevy_text::font::Font>" - Loading
"bevy_asset::handle::Handle<bevy_text::font::Font>" - Loaded

With Release - All 3 works
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - NotLoaded
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - NotLoaded
"bevy_asset::handle::Handle<bevy_text::font::Font>" - Loading
"bevy_asset::handle::Handle<bevy_text::font::Font>" - Loaded
"bevy_asset::handle::Handle<bevy_kira_audio::source::AudioSource>" - Loaded
"bevy_asset::handle::Handle<bevy_render::texture::texture::Texture>" - Loaded

Wtf was going on with Asset LoadState.  It was at this point I ran across [bevy 2347]https://github.com/bevyengine/bevy/issues/2347)
Related?

Audio Handle Issue

I was working on adding auto with your bevy_kira_audio, (thanks for all you contribute btw)  while I couldn't get the sounds after the first few frames. I keep thinking I was using bevy_kira_audio wrong, and after refactored my code like 3 times, I finally tried removing bevy_asset_loader from the picture, and boom it works.
I set up a toy example to show the problem, am I missing something?
Thanks

It looks like I forgot to merge the bug fix of v0.2.1 back to bevy_main, sorry about that. And yes, you found the correct Bevy issue where this bug was found.
The problem was, that I wasn't keeping strong handles during the loading of the assets. That means Bevy will start unloading them again. In debug mode your code can be too slow to use the handles while they are loaded and assets don't appear at all while in release, the loading is usually quicker and thus the bug can have less effect.
I will merge main back into bevy_main. When you pull the changes into your fork this issue should be fixed.

... I should have realized that, thanks.


KAFKA-9947; Ensure proper shutdown of components in TransactionsBounceTest

This test case should ensure that clients and the bounce scheduler get shutdown properly.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

I changed the patch to set the request timeout the same as the delivery timeout for this test case, which was the old behavior.

Sounds good.


Segfault in dbgen

$ python util.py ssb 1 gen
SSBM (Star Schema Benchmark) Population Generator (Version 1.0.0)
Copyright Transaction Processing Performance Council 1994 - 2000
Segmentation fault (core dumped)

According to this, you can just change MAXAGG_LEN from 10 to 20, which works for me.
https://github.com/anilshanbhag/crystal/blob/f2179e607eb923f2053a706c1e30aa2b6161b9db/test/ssb/dbgen/shared.h#L120

From my experience, just use ssb-dbgen from https://github.com/eyalroz/ssb-dbgen instead of the official one.


Need Header styling param

Description
I have changed the layout to a bright style,
but there is a mismatch because there is no color parameter for the topbar.
If possible, I would like to have the topbar's color as an adjustable parameter.
Code example
No response
Method of implementation
No response

chart.win.style should do the trick.
Louis


Citations hovercards on touch devices

Two things on touch devices:

Should dismiss when you touch anything in the background, not just the small citation itself.

Bug when trying to reopen one after you have dismissed it. Seems intermittently responsive.

Fixed by #32.


Add specimen procedures from SLIMS Histology workflow

The procedures endpoint needs to integrate specimen procedures from the SLIMS Histology workflow.
Acceptance criteria

[ ] an API exists for fetching metadata from the SLIMS Histology workflow called slims_histology.
[ ] the procedures API integrates this information, mostly as specimen_procedures.

We should probably break this issue up:
(1) Get SLIMS response in aind-slims-api. Might need to add an operation class to collect information together
(2) Add endpoint 'specimen_procedures' that maps slims response to specimen procedures in aind-metadata-service
(3) Integrate this information in the procedures endpoint


Not HTTP but local images...

Greetings...
I would like to do something like this:
const [dimensions] = useImageSize("/public/imgs/picture.jpg");
in a NextJS/React context.

Hi
Thank you for the request.
I've just tested this issue and it works well for me.
Code:

and the result is:

Do you have some error? Or can you share the code where it doesn't work?

Thank you for this fast reply !
As I'm using this with NextJS I supposed that should use the full path to reach the img files:
as in '/public/imgs/photo.jpg'
But after your message, I tried like this: '/imgs/poho.jpg'  and then worked !
So the relative path is the correct, not the absolute.
Again: Thank you 8-)

It worked !!
I commented there about it...
Em sáb., 11 de nov. de 2023 às 16:12, Andrey Krupa @.***>
escreveu:

Hi
Thank you for the request.
I've just tested this issue and it works well for me.
Code:
[image: image]
https://user-images.githubusercontent.com/72908793/282261082-20ab66d2-b4fc-4d46-8929-c646ca40e197.png
and the result is:
[image: image]
https://user-images.githubusercontent.com/72908793/282261100-dfaf7ec5-11cd-4066-981d-d40d1951bbf7.png
Do you have some error? Or can you share the code where it doesn't work?
—
Reply to this email directly, view it on GitHub
https://github.com/andreyk1512/react-image-size/issues/21#issuecomment-1806895136,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKC5BYYJWK2ENXKGMBPC7V3YD7EZJAVCNFSM6AAAAAA7HN3YQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWHA4TKMJTGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

Just a path issue...


added generic bot matching terms and ua specific terms to regex list.…

Hi there.  I updated the list.js to match against generic bot terms ('spider', 'bot', 'scrape') and added 1291 new browsers and 2331 new crawlers to the test data files.  Sources are from:

www.user-agents.org
https://github.com/dillbyrne/random-agent-spoofer
my own server logs

Great, thanks


dbt-duckdb failing to run

probably something with duckdb 0.7.0

Runtime Error
  Binder Error: Catalog "main" does not exist!

cc @jwills I think i can fix this by upgrading the versions, but as an FYI it looks like a regression

@matsonj I am on it

Ok the fix is pinning duckdb==0.6.1 in the meltano.yml file, so that means I think the entire adapter could have an issue?

yah; the TL;DR here is that the new attach functionality in 0.7.0 means that the database part of the database.schema.relation naming scheme is now load-bearing as opposed to, well, not load-bearing. You could also work around it by updating the dbt profile to set the database field to e.g. memory if you are using the :memory: path; I have a PR to fix this by auto-setting the database property for you in the path: https://github.com/jwills/dbt-duckdb/pull/98

Yeah that makes sense, I have some general refactoring I need to do in this project so I will pick up the fix and support 0.7.0 in the next few days.


Consider whether to remove empty parens in Ruby snippets

Currently we use empty parens in Ruby snippets in the docs, a'la:
r.table('foo').max()

It seems to be common style in Ruby to elide empty parens like:
r.table('foo').max

ping @mlucy @mglukhovsky @gchpaco. If eliding the empty parens is pretty universal in Ruby code, I think we should do it. But if it's a "some people do, some people don't" then it's not worth bothering since most Ruby devs will be used to seeing empty parens regularly and it won't look off to them.
Note I'm just talking about eliding empty parens, not all parens in Ruby snippets.

Eliding empty parens is very, very normal.  The first style is quite unusual in Ruby.

I think it's not a high priority, but sounds like we should do it when there's time.

I agree, I'd remove the empty parentheses.


/github-webhook-server: no such file or directory: unknown. Helm chart 0.6.1

Deploying the helm chart 0.6.1 with githubwebjhookserver fails as /github-webhook-server is not found in the container
docker run --rm -it --entrypoint /github-webhook-server summerwind/actions-runner-controller:v0.17.0
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/github-webhook-server": stat /github-webhook-server: no such file or directory: unknown.

@Puneeth-n Thanks for reporting! In short - Could you try setting image.tag to canary on install?
I should have added a big note about that, but it requires the unreleased version of actions-runner-controller image, which is only available via canary tag today. Also see https://github.com/summerwind/actions-runner-controller/issues/366#issuecomment-789418036

@mumoshu latest tage works. BTW is there any health check route? I can't seem to find one. I am running on EKS and the root path seems to return 500

@Puneeth-n Thanks for confirming! Re: health check route, good point. We don't have one today. Probably the best thing you could do right now would be to use TCP check on the root path.

I'm assuming that you're trying to setup health-checking from ELB/ALB/NLB to the github webhook server, right?

At least we should add readinessProbe to the github-webhook-server pods, so that your NodePort service is able to stop flowing traffic to not ready pods.
Would you need another kind of health check, e.g. for setting up ELB?

I'm assuming that you're trying to setup health-checking from ELB/ALB/NLB to the github webhook server, right?

@mumoshu yea for ALB. May be I will use the /metrics endpoint and ovverride the healthcheck port for now.
https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/ingress/annotations/#health-check

I'm assuming that you're trying to setup health-checking from ELB/ALB/NLB to the github webhook server, right?

@mumoshu yea for ALB. May be I will use the /metrics endpoint and ovverride the healthcheck port for now.
https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/ingress/annotations/#health-check

never mind. does not work

@Puneeth-n #378 adds the universal GET handler thanks to @robwhitby, which can also be used for health checks from LBs.
Would you mind giving it a shot with the canary controller image? Currently, GET /, GET /ok, or whatever path works.


fix rdkafka stubs

Moved functions where needed, to reflect the the state of the extension:
https://github.com/arnaud-lb/php-rdkafka/blob/master/rdkafka.c#L726-L743

Is it possible that nested directories are not recognized?
I updated PhpStormStubsMap.php as per readme, but the result does not seem to differ (which in my case makes sense probably), but i was only able to find the files in the root of rdkafka

Well you haven't added or removed any files so I don't see why PhpStormStubsMap.php should change.

But you're right that classes from RdKafka are missing in the map.

So i moved all the classes to the root folder, so they are present in the stubs map, i hope that is ok

Might be worth fixing the generator script instead, shouldn't be hard. Maybe it finds other namespaces with the same problem.

Agreed, i fixed it accordingly :v:

Awesome, more stubs available :)

@slapoguzov @andrey-sokolov please let me know if any more changes / adjustments are needed :v:

thank you!


[Backport staging-23.11] stdenv: fix rare tar.xz decompression issues

(cherry-picked from commit 11a19109b687ea8f263870effe0513f2225771b1)
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

https://github.com/NixOS/nixpkgs/pull/288416

Oh, thanks.  Bit-for-bit same.


will support yoloX ?

this project is perfect for easy to use, I like it. will it support yolov5,yolox?

Maybe in the future if I got time.


ISSUE-1030: Add runtime event sampling support

New APIs and support for enabling and disabling sampling of events at runtime
Added APIs to fetch the sampled events

Get sampling status at topology level
GET http://HOST:PORT/api/v1/sampling/topologies/:TOPOLOGY_ID
{
    "topologyId": 3,
    "pct": 10,
    "enabled": false,
    "success": true
}

Enable sampling at topology level
POST http://HOST:PORT/api/v1/sampling/topologies/3/enable/100
{
    "topologyId": 3,
    "pct": 100,
    "success": true
}

Disable sampling at topology level
POST http://HOST:PORT/api/v1/sampling/topologies/3/disable
Get sampling status at component level
GET http://HOST:PORT/api/v1/sampling/topologies/3/component/28
Enable sampling at component level
POST http://HOST:PORT/api/v1/sampling/topologies/3/component/28/enable/100
Disable sampling at component level
POST http://HOST:PORT/api/v1/sampling/topologies/3/component/28/disable
Get sampled Events (returns the next 10 events)
http://HOST:PORT/api/v1/sampling/topologies/:TOPOLOGY_ID/component/:COMPONENT_ID/events
{
    "topologyId": 3,
    "componentId": 28,
    "success": true,
    "events": {
        "length": 51200,
        "next": 47008,
        "events": [
            {
                "time":<PHONE_NUMBER>000,
                "event": {
                    "dataSourceId": "28",
                    "fieldsAndValues": {
                        "user_id": "Sjb5e5-gKoLXueFDMc2R8Q",
                        "text": "...",
                        "review_id": "2_Ru_ASf75kU303rdQjFfQ",
                        "stars": 4,
                        "date": "2013-04-25",
                        "business_id": "KayYbHCt-RkbGcPdGOThNg",
                        "type": "review",
                        "votes": {
                            "funny": 0,
                            "useful": 0,
                            "cool": 0
                        }
                    },
                    "auxiliaryFieldsAndValues": {},
                    "header": {},
                    "id": "75d1eb87-cd98-43cf-9721-114337cea5ba",
                    "sourceStream": "default"
                }
            },
			..
			..
			]
		}
	}

Get the next set of sampled events
Use the next and length from the result of previous query
GET http://HOST:PORT/api/v1/sampling/topologies/:TOPOLOGY_ID/component/:COMPONENT_ID/events?start=47008&length=51200

Get sampled Events (returns the latest 10 events)
http://HOST:PORT/api/v1/sampling/topologies/:TOPOLOGY_ID/component/:COMPONENT_ID/events

@arunmahadevan Can we have the similar type of API but the one that returns event from all components?

@HeartSaVioR , thanks for the review, addressed the comments. I need to do some more testing but you can take a look again.

The code looks better.
I've done basic manual tests:

Getting status for sampling and enabling & disabiling event sample: OK
Retrieving events: OK

/api/v1/sampling/topologies/11/component/31/events?desc=false

{
    "topologyId": 11,
    "componentId": 31,
    "success": true,
    "events": {
        "length": 51200,
        "next": 9381,
        "events": [
            {
                "time":<PHONE_NUMBER>000,
                "event": {
                    "dataSourceId": "31",
                    "fieldsAndValues": {
                        "user_id": "PUFPaY9KxDAcGqfsorJp3Q",
                        "review_id": "Ya85v4eqdd6k9Od8HbQjyA",
                        "stars": 4,
                        "date": "2012-08-01",
                        "business_id": "5UmKMjUEUNdYWqANhGckJw",
                        "type": "review",
                        "votes": {
                            "funny": 0,
                            "useful": 0,
                            "cool": 0
                        }
                    },
                    "auxiliaryFieldsAndValues": {},
                    "header": {},
                    "id": "30c7c7b9-eaec-4cf3-91f3-7d77e3283bd2",
                    "sourceStream": "default"
                }
            },
...

/api/v1/sampling/topologies/11/component/31/events?desc=false&start=9381&length=51200

{
    "topologyId": 11,
    "componentId": 31,
    "success": true,
    "events": {
        "length": 51200,
        "next": 17730,
        "events": [
            {
                "time":<PHONE_NUMBER>000,
                "event": {
                    "dataSourceId": "31",
                    "fieldsAndValues": {
                        "user_id": "JPPhyFE-UE453zA6K0TVgw",
                        "review_id": "mjCJR33jvUNt41iJCxDU_g",
                        "stars": 4,
                        "date": "2014-11-28",
                        "business_id": "UsFtqoBl7naz8AVUBZMjQQ",
                        "type": "review",
                        "votes": {
                            "funny": 0,
                            "useful": 0,
                            "cool": 0
                        }
                    },
                    "auxiliaryFieldsAndValues": {},
                    "header": {},
                    "id": "928efcff-98fe-4555-82eb-6b7992c84f7b",
                    "sourceStream": "default"
                }
            },
...

/api/v1/sampling/topologies/11/component/31/events?desc=true

{
    "topologyId": 11,
    "componentId": 31,
    "success": true,
    "events": {
        "length": 51200,
        "next": 59276,
        "events": [
            {
                "time":<PHONE_NUMBER>000,
                "event": {
                    "dataSourceId": "31",
                    "fieldsAndValues": {
                        "user_id": "bcwr1bFov3PSa1FiGfpc9g",
                        "review_id": "UrukGX1emhSRe2fGdxdVPA",
                        "stars": 3,
                        "date": "2011-12-22",
                        "business_id": "KayYbHCt-RkbGcPdGOThNg",
                        "type": "review",
                        "votes": {
                            "funny": 0,
                            "useful": 0,
                            "cool": 0
                        }
                    },
                    "auxiliaryFieldsAndValues": {},
                    "header": {},
                    "id": "7f88308e-5f3e-47f3-b534-30309f16f0d9",
                    "sourceStream": "default"
                }
            },
...

/api/v1/sampling/topologies/11/component/31/events?desc=true&start=59276&length=51200

{
    "topologyId": 11,
    "componentId": 31,
    "success": true,
    "events": {
        "length": 51200,
        "next": 54546,
        "events": [
            {
                "time":<PHONE_NUMBER>000,
                "event": {
                    "dataSourceId": "31",
                    "fieldsAndValues": {
                        "user_id": "k0a-uii8yr__Rl-9ipl_RA",
                        "review_id": "e11K8g-0m66gDeRz3TgSIQ",
                        "stars": 5,
                        "date": "2015-11-06",
                        "business_id": "mVHrayjG3uZ_RLHkLj-AMg",
                        "type": "review",
                        "votes": {
                            "funny": 0,
                            "useful": 1,
                            "cool": 1
                        }
                    },
                    "auxiliaryFieldsAndValues": {},
                    "header": {},
                    "id": "37c44352-165d-4384-b3f1-ebde5a96275b",
                    "sourceStream": "default"
                }
            },
...

Btw, I'm assuming that topology.eventlogger.executors is set to 1. Does it work well if it is set to more than 1? Is there any chance for eventlogger executors to be distributed?
Also event logger is disabled by default, we may want to document that topology.eventlogger.executors should be set (1, or more if it doesn't break the funtionality).

I will set the default topology setting to topology.eventlogger.executors=1. If its set to more than 1, the logs will get spread out to multiple logs, but it should still work since we do fields grouping on the component name. So all samples from a component would always end up on a single log.

@HeartSaVioR , thanks for taking time to test out the API. I have added a SAM topology setting for number of event sampling tasks (default = 1).
@shahsank3t , right now the api is at component level since the storm samples the events based on the component. Theres no storm API to get events from all components. With topology level, we need to aggregate events from multiple component logs, but its not clear how to navigate it, which ones to display first and so on. These issues would be fixed when we develop event-correlation. Till then I think its better to have the user select a component first and view the samples for that component.

The new ask is to be able to group (or search) the samples based on a correlation Id. We have added correlation Id as a part of PR #1080 .
So the scope of this PR is now to find a grok pattern to parse the event sample log in the current format (or make changes to Storm to use a compatible format if not feasible). After that we need to provide APIs on top of log search to search the samples based on query string.

From the last comment on https://github.com/hortonworks/streamline/pull/1080#issuecomment-351533430
I filed issue on Storm side: https://issues.apache.org/jira/browse/STORM-2854 and will file issue for implementing custom IEventLogger on Streamline side.
Since new requirement and implementing custom IEventLogger is related, we can move the new requirement to new issue and handle them altogether.
@arunmahadevan
I guess we could remove the event fetch part on this patch (since it would be replaced to Solr query) and merge this sooner. You are also welcome to leave this as it is and handle the new approach of event fetching by yourself. Either is fine for me, and I can follow up your decision.

@HeartSaVioR , removed the part to fetch the events from storm event logs. I left a few placeholders so that it can be easily changed to match the new requirements. Please review and merge if it looks fine. The new logic can be submitted as a separate PR.


The highlighted links overlaps when the line-spacing is decreased.

When the line-spacing is decreased the highlighted links (in yellow color) overlaps with the text placed above and beneath it.

@aashimgarg, please follow the prescribed issue template for submitting issues. Following the template helps to keep track of these issues in the long run when 'obvious things' won't look so evident as the website changes. Not following the requisite template would then make it hard to understand why a particular commit is made in the future. I hope you'd take it as constructive criticism.

@sachin10101998, Thanks for your concern. Don't worry I'll do what's necessary.

I'm closing this as we are currently beginning a redesign process which will address this among other improvements. Thanks for reporting it!


Missing "initial snapshot in progress" status of last repo

At the moment unpacked.cern.ch is listed in repositories.json on oasis-replica-itb, but it is not showing up in the cvmfsmon api.  I see in access_log that it was probed and should have concluded that it was initial snapshot in progress but it is not listed.
<IP_ADDRESS> - - [15/Oct/2024:16:10:00 -0500] "GET /cvmfs/unpacked.cern.ch/.cvmfs_status.json HTTP/1.1" 404 196 "-" "Python-urllib/3.6"
<IP_ADDRESS> - - [15/Oct/2024:16:10:00 -0500] "GET /cvmfs/unpacked.cern.ch/.cvmfs_last_snapshot HTTP/1.1" 404 196 "-" "Python-urllib/3.6"
<IP_ADDRESS> - - [15/Oct/2024:16:10:00 -0500] "GET /cvmfs/unpacked.cern.ch/.cvmfs_is_snapshotting HTTP/1.1" 200 29 "-" "Python-urllib/3.6"
<IP_ADDRESS> - - [15/Oct/2024:16:10:00 -0500] "GET /cvmfs/unpacked.cern.ch/.cvmfswhitelist HTTP/1.1" 404 196 "-" "Python-urllib/3.6"

Nevermind.  It was listed in an excluderepo.


Not scrapping

Hey, I'm new to this, using the last version (1.95.1) I made the auth.json and config but when I launch the script, it download nothing, here's what I got.
I probably missed something but I don't know what, if you could help, thanks!
Using profile: main_profile
Status - UP
? Modify filters for your accounts list?
Some usage examples are scraping free accounts only or paid accounts without renewal No
Welcome, Xxxx | xxxxx
? Which models do you want to scrape: xxxx
                                                                                scraper.py:516
===========================
Script Finished
Run Time:  0:00:09
===========================

Can you rerun the same command but with --output debug append
1 Did you select all models
2 what type of media purchased timeline where you trying to scrape
3. You need to have access to the timeline on onlyfans.com for the scraper to work.
Otherwise only messages and paid content can be scraped

To answer you
1 -> I selected one model only
2 -> It doesnt offer me to chose what I want to scrape
3 -> It's a free model actually, I tried with a paid one but it's the same thing
Here's what I got with the --output debug :
Thanks!
PS D:\Program Files (x86)\Python\OF-Scraper-1.95.1> ofscraper --output debug
DEBUG    Namespace(username=None, daemon=None, log='OFF', discord='OFF', output='DEBUG',     scraper.py:59
         dupe=False, posts=[], letter_count=False, action=None, before=None, after=None,
         account_type=None, renewal=None, sub_status=None)
? What would you like to do? Download content from a user
DEBUG    final mp4decrypt path bin/mp4decrypt.exe                                           scraper.py:434
DEBUG    final ffmpeg path bin/ffmpeg.exe                                                   scraper.py:435
                                                                                scraper.py:505
==============================
starting script
==============================

Using profile: main_profile
Status - UP
? Modify filters for your accounts list?
Some usage examples are scraping free accounts only or paid accounts without renewal No
Welcome, Xxxxx | xxxxx
? Which models do you want to scrape: ailurful
TRACEBACK failed with exception: 'moder_username'                                           scraper.py:347
TRACEBACK Traceback (most recent call last):                                                scraper.py:348
            File "D:\Program Files (x86)\Python\lib\site-packages\ofscraper\scraper.py",
          line 337, in process_post
              create_tables(model_id,ele['name'])
            File "D:\Program Files (x86)\Python\lib\site-packages\ofscraper\scraper.py",
          line 489, in create_tables
              operations.create_post_table(model_id,username)
            File "D:\Program Files
          (x86)\Python\lib\site-packages\ofscraper\db\operations.py", line 56, in
          create_post_table
              datebase_path =databasePathHelper(model_id,username)
            File "D:\Program Files
          (x86)\Python\lib\site-packages\ofscraper\utils\paths.py", line 48, in
          databasePathHelper
              return pathlib.Path(formatStr.format(configpath=homeDir /
          constants.configPath,profile=profiles.get_current_profile(),model_username=userna
          me,username=username,model_id=model_id,sitename="Onlyfans",site_name="Onlyfans",f
          irst_letter=username[0],save_location=config_.get_save_location(config_.read_conf
          ig())),"user_data.db")
          KeyError: 'moder_username'

                                                                                scraper.py:516
===========================
Script Finished
Run Time:  0:00:26
===========================

I think it is your config file can you show it?

Here you go, I come from the DC scrapper, tried to put similar stuff but I probably did something wrong somewhere then I guess :p
{
    "config": {
        "main_profile": "main_profile",
        "save_location": "/OF Rip",
        "file_size_limit": 0,
        "dir_format": "{model_username}/{responsetype}/{mediatype}/",
        "file_format": "{filename} [{date}] {media_id}.{ext}",
        "textlength": 10,
        "date": "YYYY-MM-DD",
        "metadata": "{configpath}/{moder_username}/Metadata",
        "filter": [
            "Images",
            "Audios",
            "Videos"
        ],
        "mp4decrypt": "bin/mp4decrypt.exe",
        "ffmpeg": "bin/ffmpeg.exe",
        "discord": "",
        "responsetype": {
            "timeline": "posts",
            "message": "messages",
            "archived": "archived",
            "paid": "messages",
            "stories": "stories",
            "highlights": "stories",
            "profile": "profile",
            "pinned": "posts"
        }
    }
}

moder_username
Should be model_username
Spelling is important for the parser

I don't know how I could've missed that one, ugh, sorry and thanks for your help, it work fine now.
Do you plan on making it work for Fansly too in future? :)

Most likely
I don't have a timeline of when


Add Team Drive support

Redo of PR #296

This is definitely not a complete pull request. I'm just hoping to get the ball going by organizing what I could find on it.More work will need to be done to get support.
Essentially we can either request the list of team drives using the google credentials already provided and stored, or the user can input the team drive ID manually.
Here's the big commit to rclone v1.37 where team drive support was added. Glancing through it there are some indicators of how they implemented it there.
https://github.com/ncw/rclone/commit/a5cfdfd233b1598bde50c1ddd563bfdba274ba6f

Yeah, it works if I manually specify the node id of the team drive.
So it looks like the only thing missing is adding a flow that allows to select the team drive by name when setting up plexdrive.
However for power-users this is already usable.
@YipYup Do you mind updating the README section on Root-Node-Id in this PR to mention that it can also be used to point at a Team Drive root or shared folder (mentioned in #130).

I've used something pretty much like this. The issue I started to get is that there were nil change.File changes. I think these happen when you move files between different team drives.
I worked around it by adding a nil check and skip after "Log.Tracef("Change %v", change)", but I'm not sure if this is the correct way to do it. It works well for me so far.

@EchterAgo That's great input. Did the filesystem still report the proper state, if files where moved out of or into the mounted tream drive?

@YipYup If you're busy let me know and I can take care of the README updates myself.

I haven't noticed anything wrong so far. I think you can test it by just
moving a set of files to a different team drive using the web interface.
On Sat, May 19, 2018, 01:38 Felix Bünemann<EMAIL_ADDRESS>wrote:

@EchterAgo https://github.com/EchterAgo That's great input. Did the
filesystem still report the proper state, if files where moved out of or
into the mounted tream drive?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dweidenfeld/plexdrive/pull/297#issuecomment-390296088,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4SeXCRxQupAlbZuH7yOOzTqgX12agUks5tzxU2gaJpZM4Ty8rK
.

Yeah, tat would work.
Btw. do you have your additional changes for Team Drive support available in a fork somewhere?

Haven't pushed anything to github yet, maybe I'll do it tomorrow.
On Sat, May 19, 2018, 01:48 Felix Bünemann<EMAIL_ADDRESS>wrote:

Yeah, tat would work.
Btw. do you have your additional changes for Team Drive support available
in a fork somewhere?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dweidenfeld/plexdrive/pull/297#issuecomment-390298890,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4See7qqC7B0K9FtJlF_cF3ma8lMiOGks5tzxebgaJpZM4Ty8rK
.

Great!

Since I am unaware of any changes you have made to the fork, I will point out that there was an issue I encountered when I had tested it originally.
I experienced a Segmentation Fault when running it with my changes. It wasn't something I had time to really look into, and I had to move on to other things, but I figured it is worth pointing out as something to consider moving forward.

https://github.com/EchterAgo/plexdrive/commits/teamdrive

good  stuff yipyip

@EchterAgo Did you check wether the nil-check in change.File was still needed after you added the root-node-id filter?

No, I haven't. That's a good question though, it might not be needed.

@EchterAgo good work, what do you have to do to make it work? Just through the normal process of it?

You have to specify --root-node-id= on the command line. I copied my root node id from my rclone config file.

As I haven't been able to get the time for this, I am going to close this so that someone else can re-open / resubmit it. That way I'm not running point and holding it up.

How do you get a root-node-id?

@Nottt https://github.com/dweidenfeld/plexdrive#team-drive

@EchterAgo doesn't work for me... see https://github.com/dweidenfeld/plexdrive/issues/333.
What version you are using? My team drive ID should be 0AArHY_zU--mnUk9PVA but it doesn't work. I don't know if it's because of the _ or --

Are you even using git master? There is no released/binary version that has team drive support.

I don't know how to use "git master" you mean compile it from source? I tried, but it complained about a lot of go dependencies, so if any kind soul can give us a linux amd64 executable with teamdrive support :pray:

Any chance for making it up to date? I mean to release new version with working team drive?

I posted the solution on #333


#Issue_127: Implemented syntax highlighting in webview chat

@wadhia-yash This looks good. Two questions:

Is it possible to make the code blend in with the background?
Can we disable any copy code icon from the prism library if we have it.  We'd be having our custom implementations later.

Hi @samyakkkk

It should be possible since the Prismjs is being used via CDN. Need to install it locally and change the theme.
Yes, that should be possible

@wadhia-yash @samyakkkk  is it ready to merge?


Create r.yml

Trying out the proposed action for R

I'll close this and read up on r-lib/actions since this fails on installing with brew using old syntax

Like this: brew install --cask <thingtoinstall>