Maybe we can help when you describe your issue.
Do the events get fired?
Could you create a Dota2 version of this integration if it’s not much work?
Unfortunately I’m neither playing that game nor do I know if they provide the required integration. So I’m definitely not the right person to do so.
Do you just need to replace The light.exsampel with The right id of your bulb?
And install and set up the integration as explained on https://github.com/lociii/homeassistant-csgo/
The CS:GO gamestate integration got replaced by the far more capable Overwolf webhook integration. See Overwolf game event integration
Just wanted to say thank for for this integration.
As i don’t use Windows but Linux for playing CS:GO this is most helpful for i can not use Overwolf.
It would be awesome if someone could take over the maintenance of this version <3
Hey Stefan,
I won’t mark the repository archived as this would force HACS to remove it from the available integrations.
I’m also happily looking forward to integrate pull requests and release new versions. I will just not actively continue development of the integration.
Cheers, Jens
Thanks a lot - this helps a lot of linux user (I am currently spreading the info about this in certain circles )
I somehow have problem getting the scripts to fire though. I added your scripts to the automation.yaml and scripts.yaml and added the cfg in csgo.
Do you have an idea what i could have missed here?
Did you make sure that the webhooks arrive at HA?
Go to Developer Tools
=> Events
, subscribe to csgo_*
and check if any event is triggered by the extension.
Yup - confirmed - no events are fired
Any chance that you can let CSGO send the events to an echo-webserver? I’d like to make sure that the extension is responsible and webhooks are received by HA. If it fails before that, you would need to debug that issue first.
I get those in the log if it helps:
2023-02-06 10:13:32.862 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘CSGO - Freezetime starts’ could not be validated and has been disabled: expected str for dictionary value @ data[‘condition’][0][‘device_id’]. Got 12345
2023-02-06 10:13:32.871 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘CSGO - Round starts or game ends’ could not be validated and has been disabled: expected str for dictionary value @ data[‘condition’][0][‘device_id’]. Got 12345
2023-02-06 10:13:32.883 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘CSGO - Bomb planted’ could not be validated and has been disabled: expected str for dictionary value @ data[‘condition’][0][‘device_id’]. Got 12345
2023-02-06 10:13:32.885 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘CSGO - Bomb exploded’ could not be validated and has been disabled: expected str for dictionary value @ data[‘condition’][0][‘device_id’]. Got 12345
2023-02-06 10:13:32.888 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘CSGO - Bomb defused’ could not be validated and has been disabled: expected str for dictionary value @ data[‘condition’][0][‘device_id’]. Got 12345
Will try to setup an echo server - whatever that is. I am currently ingame
Should i have edited the Device ID as well? When i trigger the script by hand the light is changed (rgb bulb arrives tomorrow - especially bought for your integration ).
So that configuration works.
Okay - i set up a docker container with ealenn.github.io/Echo-Server in it. Changed the URI-IP to that webserver and started CS.
I get responses:
Listening on port 80.
{“name”:“echo-server”,“hostname”:“a9b847fabbf6”,“pid”:1,“level”:30,“host”:{“hostname”:“192.168.178.66”,“ip”:"::ffff:192.168.178.56",“ips”:[]},“http”:{“method”:“POST”,“baseUrl”:"",“originalUrl”:"/ap
i/webhook/4618f7e1f9559b806083f92969cb20560e9ab34d60ebfc2c87d9b0e607ef41d9",“protocol”:“http”},“request”:{“params”:{},“query”:{},“cookies”:{},“body”:{},“headers”:{“user-agent”:“Valve/Steam HTTP Cli
ent 1.0 (730)”,“content-type”:“application/json”,“host”:“192.168.178.66:3111”,“accept”:“text/html,/;q=0.9”,“accept-encoding”:“gzip,identity,;q=0",“accept-charset”:"ISO-8859-1,utf-8,;q=0.7”,“con
tent-length”:“4”}},“environment”:{“PATH”:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",“HOSTNAME”:“a9b847fabbf6”,“NODE_VERSION”:“16.16.0”,“YARN_VERSION”:“1.22.19”,“HOME”:"/root"},"
msg":“Mon, 06 Feb 2023 20:13:46 GMT | [POST] - http://192.168.178.66:3111/api/webhook/4618f7e1f9559b806083f9c2c87d9b0e607ef41d9",“time”:“2023-02-06T20:13:46.726Z”,"v”:0}
(I shortened the webhoock-ID )
Ok. That means that the automation code is not working. As it complains about device id 12345, you just 1:1 copied the example. However you need to adjust it to your setup.
Please only take it as an inspiration.
Alright - so its a newbie problem
So the device IDs in the automations.yaml have to be changed to the device ID of the lights I want to control.
Now it becomes clear - i was just not smart enough to grasp the concept behind it…
To avoid this maybe you could change the code for the automations.yaml to
"12345 #change this to your ID from the lights you want to control (or similar)
(just a suggestion to make the instruction more foolproof )
I am sorry to have wasted your time - i am sure that it will work once i change the device-ID.
Sorry to bother you a last time…
I changed the IDs and entities that concern my light to trigger accordingly to my setup, I can fire freezetime, bomb, explode and defuse by hand or firing the event in the developer tools just fine.
It does not work ingame though - although the event and scripts and automations are triggered ingame the light sadly does not change.
I think it is because the “Round start/end” is triggered continuously throughout the round. so the light stays the same at all times. Do you have any idea how to circumvent that?
When i deactivate the round start/end automation, the freezetime, bomb explode and defuse are triggered normally.
Bomb planted doesn’t work for me either, but that might be a limitation of my chosen light - i will figure that one out
What i didn’t get so far is why there is a delay of one hour in the Flashloop2 - or should this be 1 second? And accordingly 10 seconds in Flashloop1?
It might be that valve changed how and what events are sent. I didn’t play CSGO nor use the extension for quite some time.
As there is a viable alternative for gaming on windows (as I do), my interest of debugging and fixing it is quite low.
However, feel free to ask on GitHub as there were other people contributing to the integration that might help.
I can understand you completely - no bad feelings.
I will try to get this fixed in github.
Hey did you fix everything in your setup?
I just saw this integration and don’t know how to set it up. How to listen to the events sended through webhook? Maybe you can help me in German. I want to flash lights with WLED Integration.