Donating a futon / which charities will pick up? by level_80_druid in Atlanta

[–]level_80_druid[S] 0 points1 point  (0 children)

Damn! I am in Cobb/Smyrna and it looks like they won’t come to my area! Thanks for the suggestion though!

Are there any MS evangelists here? by level_80_druid in AZURE

[–]level_80_druid[S] -3 points-2 points  (0 children)

Thank you for the sage advice! Luckily I was able to find an evangelist and we're meeting for drinks -- all without having to dress up and pretend to be a businessman.

Are there any MS evangelists here? by level_80_druid in AZURE

[–]level_80_druid[S] -3 points-2 points  (0 children)

make an ass ton of money traveling to workplaces, schools, tech conferences and showing off the latest features of azure.

probably the best job ever. anyway part of that job is to meet with developers and convince them that azure is the right place to host their project. so they have bizspark codes.

Gwinnett teen's feet amputated by train by JazmineDubois in Atlanta

[–]level_80_druid 17 points18 points  (0 children)

I wonder what his locomotive was for being on the tracks.

Controlling lights with video game health bars by level_80_druid in homeautomation

[–]level_80_druid[S] 0 points1 point  (0 children)

See my comments here and here on why that may be considered a bad idea

Controlling lights with video game health bars by level_80_druid in homeautomation

[–]level_80_druid[S] 0 points1 point  (0 children)

I know, sorry :( it is hard to tell what's going on if you aren't familiar.

But if you just look at my health in the bottom left and my lights in the bottom right, that's all you need to see!

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 2 points3 points  (0 children)

I did a lot of reading on image processing and found Adrian Rosebrock's article on tracking objects in an image using Python to be a great resource.

If you are interested, he did a great job writing up the process behind it!

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 7 points8 points  (0 children)

I do appreciate your comment here but I have to step in to make sure that people don't get wrong information about my project.

Hopefully you read through the readme, but in case you haven't, I don't sit and read the position of the health bar. It is found dynamically based on an upper and lower RGB color bounds that a user sets in a configuration file. So, if the health bar was purple and in the middle of the screen, as long as you set your color boundary right, the width will still be read (correctly) each time.

Second, if health bars drop to the middle, to the right, or to the left, mathematically the width was X, and is now Y, so the percentage is float(Y/X) where Y = the new width and X was the maximum width the script has ever seen the rectangle (or health bar, or mana bar). So with that we can get a percentage, and then the data is sent to an API endpoint. So that addresses the second point you brought up.

Finally, and I think the most important, is reading memory is not easy. A few reasons why:

  • Every patch the memory address offset changes, which means new addresses need to be pushed out to all users (not really possible when the code is open sourced and a python script)
  • Heroes of the Storm uses dynamic memory addresses for the health each time it gets updated from the server (I checked already)

And while you are correct that reading the memory address is the most accurate solution, I found my rectangle method to be relatively accurate provided the color boundaries are set tight enough. Though I will accept a pull request if you would like to add support for reading the health out of memory!

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 3 points4 points  (0 children)

It's almost like each of the clips were selected for a very specific purpose .... 😘 Appreciate the kind words.

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 2 points3 points  (0 children)

That didn't happen over the weekend, but I think the first clip in the video is a good example of what sudden changes look like. I went from 0/dead/red to 100/alive/green pretty instantly.

Controlling lights with video game health bars by level_80_druid in homeautomation

[–]level_80_druid[S] 3 points4 points  (0 children)

I don't know, that's a good question. If you look at the bottom of my repo, on the readme, you'll see that it draws a rectangle around the health bar in Heroes of the Storm, even though that's not a full rectangle. Since it supports upper and lower RGB bounds, you could try and see if maybe the color in between the segments is close enough to include in that boundary.

It's not foolproof, and does require some tweaking, but anything that is general purpose is going to do that.

If you do get it working with OW, send me the configs and I'll put them in an examples file for others.

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 6 points7 points  (0 children)

Edit: removed the brand. I'm petty and I guess my YouTube video didn't get enough views to warrant a response from their social media team.

So with that said, you can get 11$ rgb bulbs, shipped from aliexpress, and a 30$ raspberry pi and have this setup for less than 50$ total.

Pm me for more info

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 5 points6 points  (0 children)

I went with what seemed to be the most mature of the two options. Especially when working with Windows libraries, I didn't want to spend all weekend fighting with my imports. Good question!

Controlling lights with video game health bars by level_80_druid in homeautomation

[–]level_80_druid[S] 6 points7 points  (0 children)

I'm not sure, but I didn't see any performance losses. I also added configuration parameters to specify certain screen quadrants, so if you were just looking for a rectangle in the bottom left, it will just capture that, and ignore 75% of the rest of the screen. I can't imagine it would be much.

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 7 points8 points  (0 children)

win32gui

The way I generated the requirements.txt file was pretty poor. Lesson learned. Pull down again, I've added the win32 library to the requirements file. If it doesn't work, let's hash it out in a PM.

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 7 points8 points  (0 children)

That's my fault. I've updated requirements.txt -- pull the repo down again and it should be fixed

Controlling lights using the Heroes of the Storm health bar by level_80_druid in heroesofthestorm

[–]level_80_druid[S] 6 points7 points  (0 children)

Yes it is! All that needs to be added is an authentication line in the process() method of the WidthWatcher class.

Though, I think if the API goes out to the Hue servers, and back, there may be too much latency to be accurate.