ActiveWindow name parsing issue
Picture says 1000 words
Not really sure what's going on at the moment with all the parsing issuing
50 Replies
Help us Help Others!
To help others find answers, you can mark your question as solved via
Right click solution message -> Apps -> ✅ Mark Solution
Help us Help You!
Please don't delete messages or posts because it makes it impossible to understand what happened. If you don't want your messages to be seen then don't post here.
Make sure to provide detailed reports of bugs.
Please include error log uploads and info about the bug.
Call of Duty® HQ
- Call of Duty® HQ
- C?a?l?l? ?o?f? ?D?u?t?y?®? ?H?Q?????????????????????????????????????????????????????????????????????????????????????????
- C?a?l?l? ?o?f? ?D?u?t?y?®? ?H?Q????????????????????????????????????????????????????????????????????????????????????????????????
- ?C?a?l?l? ?o?f? ?D?u?t?y?®? ?H?Q??????????????????????????????????????????????????????????????????????????????????????????
Discord - This server in off-topic
- #??·off-topic | HASS.Agent - Discord
That's because of the actual windows not because of Hass.agent
The discord server uses an emoji for that channels that hass.agent doesn't parse and gets ??
So similar thing for call of duty
I reckon whitespace chars are getting added
But considering it was okay one time for CoD maybe @Amadeo knows why it's doing that
HASS.Agent is just grabing the info from the windows
but there may be some encoding shenanigans going on
I don't have new CODs (and ain't gonna get one xD) so won't test on that but I can test with the discord
looks about right on windows itself
You sure you don't want 200+ GB of game files?
don't get me started xD
Yeah but I've had this issue before I'm pretty sure. It's because windows backend uses a different fontface to the one chosen by you for your UI. It's really dumb. When I made a python script it used to do this. I just had to filter out the question marks
reproduced at least 😄
now it makes me wonder, what kind of bullshittery does cod do with the window name
that it has so many "?"
?, is there something in the code I'm missing 😂
it just grabs the text not even trying the decoding + it grabs is from the user32.dll (not visible on sc)
but there is another issue
even the debbuger gets "??"
google it is then
😂
Maybe windows uses some non standard encoding for its UI? And visual studio uses something else?
Makes no sense to me
Oh wait no
@Amadeo , it is being converted to ? When you do .toString() right?
yesn't
string can be encoded in various formats
utf-8, unicode'n'shit
Does that method support all of them 😂
yesn't 2 😄
Doesn't support m$?😂
deducing the encoding is another science by itself
at least in my head
Nah there's a tool for that surely
Just copy paste the buffer and send it here and we could find something
if you have "bytes" it's not so easy to deduce it
since there is no marker or anything how they are encoded
M$ docs aren't exactly helpful
fixed it tho
In what bit did you change the encoding 😂 is that not passed to the toString method?
Ohh you are actually important the dll
Okay
the charset thingy was the fix
Auto exists!?
Where has it been my entire life
lol
I doubt it's in python tho 😭
most likely auto = current system one xD
but it's a guess
Good point
So 2.0.somethinf or you going to add this one to the 2.1.0?
Solution
2.1.0
since the beta1 will be "this week(TM)" 😄
👍
now, does anyone remember max payload for HA?
the current implementation retrieves only 256 chars, we can do better than this
Home Assistant Community
Large payload in MQTT sensor
Dear All, I am trying to display a list of dhcp clients from my router. The list of clients is coming in an MQTT message in a payload in the following format (this is an actual sample, made shorter): [ { "field1": "1648269597", "field2": "50:02:91:65:ac:a8", "field3": "192.168.1.103", "field4": "officedoor-3240", "field5"...
nvm
looks like I need to decrease it to 255 to make it future proof lol
here are good intentions for you
Surely we don't hit 255 😂
apparently windows can handle even more
#todayILearned
@Evostance do you have a github handle?
GitHub
Fix: active window title encoding by amadeo-alex · Pull Request #50...
This PR fixes window title sensor encoding issue reported by Evostance.
Before:
After:
In addition, changes were made to ensure the window title length sent to HA will not exceed 255 characters -...
Yeah it's just greghesp
I'll have a look when I'm back on my pc
I'll edit the PR once home 😄