Code Monkey home page Code Monkey logo

kruiz-control's People

Contributors

caeyo avatar jorand avatar kruiser8 avatar richard4339 avatar timbtv avatar wiscokel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kruiz-control's Issues

Kruiz-Control Not Working

I set everything up following the guide on Youtube about two days ago and had everything set up and ready to go, but when I opened up OBS to set everything up for a stream I tested it out again and it didn't work. I'm using the OnChannelPoint and OnEveryChatMessage triggers and the Play action, the sfx is in the proper sound folder within the Kruiz-Control directory, the index.html has been placed within the browser source and I followed the steps for Obs on creating the password and logging in through a local host. Previously it worked with both commands and would play the sound file, now it's not working at all.

Tier NaN from OnSLTwitchSubNoSync / OnSLTwitchSub /OnSLTwitchGiftSubNoSync / OnSLTwitchGiftSub

Summary

The {tier} parameter of the events OnSLTwitchSubNoSync, OnSLTwitchSub, OnSLTwitchGiftSubNoSync, OnSLTwitchGiftSub all provided Tier NaN instead of the documented Prime, Tier 1, Tier 2, or Tier 3 options.

Included is documentation of this behavior in the case of a Prime resub,

Triggers

The relevant logging triggers used were:

OnSLTwitchGiftSub 
API GET "http://127.0.0.1:8001/write?filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchGiftSub:[data]"

OnSLTwitchGiftSubNoSync
API GET "http://127.0.0.1:8001/write?filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchGiftSubNoSync:[data]"

OnSLTwitchSub
API GET "http://127.0.0.1:8001/write?filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchSub:[data]"

OnSLTwitchSubNoSync
API GET "http://127.0.0.1:8001/write?filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchSubNoSync:[data]"

And

OnSLTwitchSubNoSync
API GET "http://127.0.0.1:8001/event?sub=self&name={user}&tier={tier}&months={months}&message={message}"

OnSLTwitchGiftSubNoSync
API GET "http://127.0.0.1:8001/event?sub=gift&gifter={gifter}&recipient={user}&tier={tier}&months={months}"

where at 127.0.0.1:8001 is a Python script I wrote that has both a logging endpoint (/write) and understanding of various Twitch events (/event).

This setup provides logging of both the data variable as well as all the other documented variables for the various StreamLabs subscription events. I also had similar logging setup for OnSLTwitchCommunityGiftSub and OnSLTwitchCommunityGiftSubNoSync, but those events did not fire despite community gift subs occurring. However I believe that is a separate issue.

Examples

Prime subscription

2021-08-15 07:01:19,823 - DEBUG - ParseResult(scheme='', netloc='', path='/write', params='', query='filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchSubNoSync:{%22name%22:%22shadowc64%22,%22display_name%22:%22ShadowC64%22,%22months%22:%2236%22,%22message%22:null,%22emotes%22:null,%22sub_plan%22:%22Prime%22,%22sub_plan_name%22:%22\\\\sChannel\\\\sSubscription\\\\s(generikb):\\\\s$4.99\\\\sSub%22,%22sub_type%22:%22resub%22,%22gifter%22:null,%22subscriber_twitch_id%22:%2223194604%22,%22streak_months%22:%2236%22,%22_id%22:%22d629714ffa02219dc4023cf402221241%22,%22event_id%22:%22d629714ffa02219dc4023cf402221241%22}', fragment='')
2021-08-15 07:01:19,824 - DEBUG - 'log_for_Numbers.txt' was appended with '2021-08-15T07:01:19.823016 - OnSLTwitchSubNoSync:{"name":"shadowc64","display_name":"ShadowC64","months":"36","message":null,"emotes":null,"sub_plan":"Prime","sub_plan_name":"\\sChannel\\sSubscription\\s(generikb):\\s$4.99\\sSub","sub_type":"resub","gifter":null,"subscriber_twitch_id":"23194604","streak_months":"36","_id":"d629714ffa02219dc4023cf402221241","event_id":"d629714ffa02219dc4023cf402221241"}
'
2021-08-15 07:01:19,824 - DEBUG - ParseResult(scheme='', netloc='', path='/event', params='', query='sub=self&name=shadowc64&tier=Tier%20NaN&months=36&message=null', fragment='')
2021-08-15 07:01:19,824 - INFO - 'shadowc64' subbed Tier NaN for 36 months (180 points): null
2021-08-15 07:01:19,825 - DEBUG - Timer info is now {"stream-start": "2021-08-15T07:00:00", "stream-end": "2021-08-15T19:00:00", "current-end": "2021-08-15T07:03:00.000", "points-funded": 180, "points-to-fully-fund": 32400, "time-adjust": 0}
2021-08-15 07:01:20,642 - DEBUG - ParseResult(scheme='', netloc='', path='/write', params='', query='filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchSub:{%22priority%22:10,%22_id%22:%227badaaf10afea8ce2b98645abf8635c55a497d1a%22,%22from%22:%22ShadowC64%22,%22from_display_name%22:%22ShadowC64%22,%22emotes%22:null,%22months%22:36,%22streak_months%22:%2236%22,%22message%22:%22%22,%22payload%22:{%22name%22:%22shadowc64%22,%22display_name%22:%22ShadowC64%22,%22months%22:%2236%22,%22message%22:null,%22emotes%22:null,%22sub_plan%22:%22Prime%22,%22sub_plan_name%22:%22\\\\sChannel\\\\sSubscription\\\\s(generikb):\\\\s$4.99\\\\sSub%22,%22sub_type%22:%22resub%22,%22gifter%22:null,%22subscriber_twitch_id%22:%2223194604%22,%22streak_months%22:%2236%22,%22_id%22:%22d629714ffa02219dc4023cf402221241%22,%22event_id%22:%22d629714ffa02219dc4023cf402221241%22},%22name%22:%22ShadowC64%22,%22display_name%22:%22ShadowC64%22,%22subPlan%22:%22Prime%22,%22sub_plan%22:%22Prime%22,%22subscriber_twitch_id%22:null,%22gifter%22:%22%22,%22gifter_display_name%22:null,%22count%22:1,%22repeat%22:false,%22isTest%22:false,%22createdAt%22:%222021-08-15%2000:01:19%22,%22createdAtTimestamp%22:1628985679820,%22platform%22:%22twitch_account%22,%22planName%22:%22%22,%22type%22:%22subscription%22,%22hash%22:%22subscription:shadowc64:%22,%22read%22:false,%22amount%22:null,%22membershipLevel%22:null,%22membershipLevelName%22:null,%22massSubGiftChildAlerts%22:[],%22isSubgiftExpanded%22:true,%22benefit_end_month%22:null}', fragment='')
2021-08-15 07:01:20,642 - DEBUG - 'log_for_Numbers.txt' was appended with '2021-08-15T07:01:20.642075 - OnSLTwitchSub:{"priority":10,"_id":"7badaaf10afea8ce2b98645abf8635c55a497d1a","from":"ShadowC64","from_display_name":"ShadowC64","emotes":null,"months":36,"streak_months":"36","message":"","payload":{"name":"shadowc64","display_name":"ShadowC64","months":"36","message":null,"emotes":null,"sub_plan":"Prime","sub_plan_name":"\\sChannel\\sSubscription\\s(generikb):\\s$4.99\\sSub","sub_type":"resub","gifter":null,"subscriber_twitch_id":"23194604","streak_months":"36","_id":"d629714ffa02219dc4023cf402221241","event_id":"d629714ffa02219dc4023cf402221241"},"name":"ShadowC64","display_name":"ShadowC64","subPlan":"Prime","sub_plan":"Prime","subscriber_twitch_id":null,"gifter":"","gifter_display_name":null,"count":1,"repeat":false,"isTest":false,"createdAt":"2021-08-15 00:01:19","createdAtTimestamp":1628985679820,"platform":"twitch_account","planName":"","type":"subscription","hash":"subscription:shadowc64:","read":false,"amount":null,"membershipLevel":null,"membershipLevelName":null,"massSubGiftChildAlerts":[],"isSubgiftExpanded":true,"benefit_end_month":null}
'

Tier 1 subscription

2021-08-15 07:02:36,953 - DEBUG - ParseResult(scheme='', netloc='', path='/write', params='', query='filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchSubNoSync:{%22name%22:%22ryklou12%22,%22display_name%22:%22Ryklou12%22,%22months%22:%223%22,%22message%22:null,%22emotes%22:null,%22sub_plan%22:%221000%22,%22sub_plan_name%22:%22\\\\sChannel\\\\sSubscription\\\\s(generikb):\\\\s$4.99\\\\sSub%22,%22sub_type%22:%22resub%22,%22gifter%22:null,%22subscriber_twitch_id%22:%22554896695%22,%22streak_months%22:null,%22_id%22:%22bc2ca4988f8538f3083f39585ae0e0c3%22,%22event_id%22:%22bc2ca4988f8538f3083f39585ae0e0c3%22}', fragment='')
2021-08-15 07:02:36,953 - DEBUG - 'log_for_Numbers.txt' was appended with '2021-08-15T07:02:36.953888 - OnSLTwitchSubNoSync:{"name":"ryklou12","display_name":"Ryklou12","months":"3","message":null,"emotes":null,"sub_plan":"1000","sub_plan_name":"\\sChannel\\sSubscription\\s(generikb):\\s$4.99\\sSub","sub_type":"resub","gifter":null,"subscriber_twitch_id":"554896695","streak_months":null,"_id":"bc2ca4988f8538f3083f39585ae0e0c3","event_id":"bc2ca4988f8538f3083f39585ae0e0c3"}
'
2021-08-15 07:02:36,953 - DEBUG - ParseResult(scheme='', netloc='', path='/event', params='', query='sub=self&name=ryklou12&tier=Tier%20NaN&months=3&message=null', fragment='')
2021-08-15 07:02:36,954 - INFO - 'ryklou12' subbed Tier NaN for 3 months (180 points): null
2021-08-15 07:02:36,954 - DEBUG - Timer info is now {"stream-start": "2021-08-15T07:00:00", "stream-end": "2021-08-15T19:00:00", "current-end": "2021-08-15T10:09:00.000", "points-funded": 540, "points-to-fully-fund": 32400, "time-adjust": 10800}
2021-08-15 07:02:46,322 - DEBUG - ParseResult(scheme='', netloc='', path='/write', params='', query='filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchSub:{%22priority%22:10,%22_id%22:%222345cdc3ae8bf70e8ea8794540e747022896bb38%22,%22from%22:%22Ryklou12%22,%22from_display_name%22:%22Ryklou12%22,%22emotes%22:null,%22months%22:3,%22streak_months%22:null,%22message%22:%22%22,%22payload%22:{%22name%22:%22ryklou12%22,%22display_name%22:%22Ryklou12%22,%22months%22:%223%22,%22message%22:null,%22emotes%22:null,%22sub_plan%22:%221000%22,%22sub_plan_name%22:%22\\\\sChannel\\\\sSubscription\\\\s(generikb):\\\\s$4.99\\\\sSub%22,%22sub_type%22:%22resub%22,%22gifter%22:null,%22subscriber_twitch_id%22:%22554896695%22,%22streak_months%22:null,%22_id%22:%22bc2ca4988f8538f3083f39585ae0e0c3%22,%22event_id%22:%22bc2ca4988f8538f3083f39585ae0e0c3%22},%22name%22:%22Ryklou12%22,%22display_name%22:%22Ryklou12%22,%22subPlan%22:%221000%22,%22sub_plan%22:%221000%22,%22subscriber_twitch_id%22:null,%22gifter%22:%22%22,%22gifter_display_name%22:null,%22count%22:1,%22repeat%22:false,%22isTest%22:false,%22createdAt%22:%222021-08-15%2000:02:36%22,%22createdAtTimestamp%22:1628985756948,%22platform%22:%22twitch_account%22,%22planName%22:%22%22,%22type%22:%22subscription%22,%22hash%22:%22subscription:ryklou12:%22,%22read%22:false,%22amount%22:null,%22membershipLevel%22:null,%22membershipLevelName%22:null,%22massSubGiftChildAlerts%22:[],%22isSubgiftExpanded%22:true,%22benefit_end_month%22:null}', fragment='')
2021-08-15 07:02:46,323 - DEBUG - 'log_for_Numbers.txt' was appended with '2021-08-15T07:02:46.322443 - OnSLTwitchSub:{"priority":10,"_id":"2345cdc3ae8bf70e8ea8794540e747022896bb38","from":"Ryklou12","from_display_name":"Ryklou12","emotes":null,"months":3,"streak_months":null,"message":"","payload":{"name":"ryklou12","display_name":"Ryklou12","months":"3","message":null,"emotes":null,"sub_plan":"1000","sub_plan_name":"\\sChannel\\sSubscription\\s(generikb):\\s$4.99\\sSub","sub_type":"resub","gifter":null,"subscriber_twitch_id":"554896695","streak_months":null,"_id":"bc2ca4988f8538f3083f39585ae0e0c3","event_id":"bc2ca4988f8538f3083f39585ae0e0c3"},"name":"Ryklou12","display_name":"Ryklou12","subPlan":"1000","sub_plan":"1000","subscriber_twitch_id":null,"gifter":"","gifter_display_name":null,"count":1,"repeat":false,"isTest":false,"createdAt":"2021-08-15 00:02:36","createdAtTimestamp":1628985756948,"platform":"twitch_account","planName":"","type":"subscription","hash":"subscription:ryklou12:","read":false,"amount":null,"membershipLevel":null,"membershipLevelName":null,"massSubGiftChildAlerts":[],"isSubgiftExpanded":true,"benefit_end_month":null}
'

Tier 1 Gift

2021-08-15 07:02:32,594 - DEBUG - ParseResult(scheme='', netloc='', path='/write', params='', query='filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchGiftSubNoSync:{%22name%22:%22bga_insanity%22,%22display_name%22:%22BGA_Insanity%22,%22months%22:%222%22,%22message%22:null,%22emotes%22:null,%22sub_plan%22:%221000%22,%22sub_plan_name%22:%22\\\\sChannel\\\\sSubscription\\\\s(generikb):\\\\s$4.99\\\\sSub%22,%22sub_type%22:%22subgift%22,%22gifter%22:%22ryklou12%22,%22gifter_display_name%22:%22Ryklou12%22,%22streak_months%22:null,%22gifter_twitch_id%22:%22554896695%22,%22subscriber_twitch_id%22:%2239601375%22,%22_id%22:%2270e87252f35d29e07532d6bebb1a5698%22,%22event_id%22:%2270e87252f35d29e07532d6bebb1a5698%22}', fragment='')
2021-08-15 07:02:32,595 - DEBUG - 'log_for_Numbers.txt' was appended with '2021-08-15T07:02:32.595882 - OnSLTwitchGiftSubNoSync:{"name":"bga_insanity","display_name":"BGA_Insanity","months":"2","message":null,"emotes":null,"sub_plan":"1000","sub_plan_name":"\\sChannel\\sSubscription\\s(generikb):\\s$4.99\\sSub","sub_type":"subgift","gifter":"ryklou12","gifter_display_name":"Ryklou12","streak_months":null,"gifter_twitch_id":"554896695","subscriber_twitch_id":"39601375","_id":"70e87252f35d29e07532d6bebb1a5698","event_id":"70e87252f35d29e07532d6bebb1a5698"}
'
2021-08-15 07:02:32,595 - DEBUG - ParseResult(scheme='', netloc='', path='/event', params='', query='sub=gift&gifter=Ryklou12&recipient=bga_insanity&tier=Tier%20NaN&months=2', fragment='')
2021-08-15 07:02:32,595 - INFO - 'Ryklou12' gifted Tier NaN to 'bga_insanity' who now has 2 months (180 points)
2021-08-15 07:02:32,595 - DEBUG - Timer info is now {"stream-start": "2021-08-15T07:00:00", "stream-end": "2021-08-15T19:00:00", "current-end": "2021-08-15T10:06:00.000", "points-funded": 360, "points-to-fully-fund": 32400, "time-adjust": 10800}
2021-08-15 07:02:33,320 - DEBUG - ParseResult(scheme='', netloc='', path='/write', params='', query='filename=log_for_Numbers.txt&mode=a&log=true&data=OnSLTwitchGiftSub:{%22priority%22:10,%22_id%22:%22cc9ade34077f700c97ff0ed46fcf05ea232f8939%22,%22from%22:%22BGA_Insanity%22,%22from_display_name%22:%22BGA_Insanity%22,%22emotes%22:null,%22months%22:2,%22streak_months%22:null,%22message%22:%22%22,%22payload%22:{%22name%22:%22bga_insanity%22,%22display_name%22:%22BGA_Insanity%22,%22months%22:%222%22,%22message%22:null,%22emotes%22:null,%22sub_plan%22:%221000%22,%22sub_plan_name%22:%22\\\\sChannel\\\\sSubscription\\\\s(generikb):\\\\s$4.99\\\\sSub%22,%22sub_type%22:%22subgift%22,%22gifter%22:%22ryklou12%22,%22gifter_display_name%22:%22Ryklou12%22,%22streak_months%22:null,%22gifter_twitch_id%22:%22554896695%22,%22subscriber_twitch_id%22:%2239601375%22,%22_id%22:%2270e87252f35d29e07532d6bebb1a5698%22,%22event_id%22:%2270e87252f35d29e07532d6bebb1a5698%22},%22name%22:%22BGA_Insanity%22,%22display_name%22:%22BGA_Insanity%22,%22subPlan%22:%221000%22,%22sub_plan%22:%221000%22,%22subscriber_twitch_id%22:null,%22gifter%22:%22ryklou12%22,%22gifter_display_name%22:%22Ryklou12%22,%22count%22:1,%22repeat%22:false,%22isTest%22:false,%22createdAt%22:%222021-08-15%2000:02:32%22,%22createdAtTimestamp%22:1628985752590,%22platform%22:%22twitch_account%22,%22planName%22:%22%22,%22type%22:%22subscription%22,%22hash%22:%22subscription:bga_insanity:%22,%22read%22:false,%22amount%22:null,%22membershipLevel%22:null,%22membershipLevelName%22:null,%22massSubGiftChildAlerts%22:[],%22isSubgiftExpanded%22:true,%22benefit_end_month%22:null}', fragment='')
2021-08-15 07:02:33,321 - DEBUG - 'log_for_Numbers.txt' was appended with '2021-08-15T07:02:33.320014 - OnSLTwitchGiftSub:{"priority":10,"_id":"cc9ade34077f700c97ff0ed46fcf05ea232f8939","from":"BGA_Insanity","from_display_name":"BGA_Insanity","emotes":null,"months":2,"streak_months":null,"message":"","payload":{"name":"bga_insanity","display_name":"BGA_Insanity","months":"2","message":null,"emotes":null,"sub_plan":"1000","sub_plan_name":"\\sChannel\\sSubscription\\s(generikb):\\s$4.99\\sSub","sub_type":"subgift","gifter":"ryklou12","gifter_display_name":"Ryklou12","streak_months":null,"gifter_twitch_id":"554896695","subscriber_twitch_id":"39601375","_id":"70e87252f35d29e07532d6bebb1a5698","event_id":"70e87252f35d29e07532d6bebb1a5698"},"name":"BGA_Insanity","display_name":"BGA_Insanity","subPlan":"1000","sub_plan":"1000","subscriber_twitch_id":null,"gifter":"ryklou12","gifter_display_name":"Ryklou12","count":1,"repeat":false,"isTest":false,"createdAt":"2021-08-15 00:02:32","createdAtTimestamp":1628985752590,"platform":"twitch_account","planName":"","type":"subscription","hash":"subscription:bga_insanity:","read":false,"amount":null,"membershipLevel":null,"membershipLevelName":null,"massSubGiftChildAlerts":[],"isSubgiftExpanded":true,"benefit_end_month":null}
'

Summary

Clearly the data contains the correct sub_plan information and it is getting converted into the wrong value.

At first glance, it appears the problem in js/streamlabs/streamlabsHandler.js is that it refers to message.subPlan in several cases when it probably should be message.sub_plan. However I could be missing something with this analysis.

Unfortunately I did not capute any occurences where sub_plan was 2000 or 3000. Nor did I capture any events of types OnSLTwitchCommunityGiftSub or OnSLTwitchCommunityGiftSubNoSync, even though community gift subs occurred.

In addition to the obvious problem of Tier NaN, in the case of a gift sub there is an inconsistency. Note that gifter_display_name was used for the gifter, but name was used for the recipient.

OnSLOBSSwitchScenes is not triggered

The OnSLOBSSwitchScenes trigger does not appear to work. I did a little digging and it seems changing line 35 of slobsHandler.js from:

this.onSwitchTrigger[scene] = triggerId;

to

this.onSwitchTrigger[scene].push(triggerId);

appears to fix things.

Get subscription tier of subscriber in chat trigger

Hi,

in chat, I can see what tier a user subscribed to. Is that information available in any form in chat triggers? I would like to have certain commands only for tier 3 subscribers, and I would like to avoid having to write an application for the twitch api

Thank You

Christian

P.S since I got my first payout, I am now a patreon!

Is it possible to call sub-routines?

Basically the title.

I have a couple scripts that are quite complex and lengthy, but I would like them to trigger also from another trigger, is this possible?

This is my use-case: channel point redemption for "randomise vfx", which executes a long script to generate and send some API values, but at the end, I want to also Chat Send the result of the randomisation which is another long script triggered with !chain. I could Chat Send '!chain' which would trigger the command via chat, but was wondering if there's a nicer way of doing that from within the script.

I read about the Action section but didnt really understand how it's used or if it would help in my use-case.

Cheers!

Integration: LiveSplit? (and/or TheRun.gg?)

Would love to use Livesplit as a trigger for events, and I know many other speedrunners would as well.

If I'm reading this right, it looks like LiveSplit's native server function might only allow for other programs to control LiveSplit, and not the other way around.

I might instead reccomend prioritizing TheRun.gg support, since it appears to have a more comprehensive API (and better documentation) allowing for LiveSplit to be used as the trigger, rather than only accepting events.

Fwiw, they both appear to work with streamer.bot, so it feels like this should work too, but I'm not a dev, I'm an amateur code-reader at best, so I'll let y'all figure out what's actually feasible to integrate into KC.

Thanks for looking this over!

StreamLabs, Refreshing Casche makes Bot Unresponsive.

I redid the process from scratch to find what made the bot unresponsive was when I hit the "Refresh cache of current page" button on the Browser source. The tutorial advises to do so when you make changes and save on your trigger doc.

The bot was working and responding up until this point using !example.

Please advise, thank you!

Multiple instances not working for channelpoint redemptions

Using multiple instances of OBS open at the same time. Kruiz control fails each time I !kcreset with multiple errors.

I'm using two different twitch accounts (oauth.txt)
... two different ports in address.txt
... two different clientId.txt & clientSecret.txt & code.txt

My whole reason for why I want multiple instances is because I have different settings for the "Monitoring Device" (an audio setting)

error messages seems to have something to do with cooldowns or getAuth so far as I can tell...?

my OnCommand's works (works on both instances)
my OnTWChannelPoint's does not work (only the first instance I have started up works for this)

OBS Source can no longer be used to change the visibility of sources that are in a group/folder in v1.6.0

Hello! As of Kruiz Control v1.6.0, we are unable to change the visibility of sources in a group/folder. I realized this is working as intended, as it is noted in the notes section of that release. However, this can be very difficult for those of us who have multiple sources that we need controlled. This results in multiple entries and bloats up the sources panel in OBS.

Is there any particular reason why this feature has this limitation? Is there any possibility of it returning? Thank you so much!

ulencode # in api call

Problem:

I am trying to pass chat text via API GET. I noticed that when texts contain #, they are cut off, because of # works obviously.

Possible solutions:

Is there a way to replace # by %23 so it gets passed as the query string? Since we are talking about an API call, having a local part of the URL makes no sense anyways.

Alternatively, having API POST could work around the issue as well.

Add support for follower only chat commands

As a twitch streamer, I would like the ability to limit the use of certain commands to those who are following the channel. Currently based on the documentation, this isn't available.

Issue with sound sources

I was setting up some channel point redemptions to play sounds, and I'm running into an issue with 2 channel point redemption for playing sounds. I've been able to add 2 other sounds no problem, but the issue might be due to file format or something, because this is clearly not reading the file format that it's capable of reading, and as I read MP3, WAV and OGG supported formats yes?

Log:

04:44:37.064: obs-browser: Uncaught (in promise) ReferenceError: SockJS is not defined (source: file:///home/alkaris/Kruiz-Control/js/slobs/slobs-websocket.js:10)
04:44:37.078: [obs-websocket] new client connection from [::1]:40292
04:44:37.085: obs-browser: Error reading the triggers/triggers.txt file! Please open the html in Microsoft Edge or your broadcasting software. (source: file:///home/alkaris/Kruiz-Control/js/utils/utils.js:61)
04:44:37.099: obs-browser: Uncaught [object Object] (source: https://code.jquery.com/jquery-3.4.1.min.js:2)
04:44:37.955: obs-browser: Error connecting to streamlabs socket: Incorrect token or connection error (source: file:///home/alkaris/Kruiz-Control/js/streamlabs/streamlabs-socket.js:17)
04:44:38.004: obs-browser: Invalid Password or Permission Scopes (channel:read:redemptions, user:read:email) (source: https://cdn.jsdelivr.net/npm/comfy.js@latest/dist/comfy.min.js:1)
04:44:49.243: obs-browser: Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found. (source: file:///home/alkaris/Kruiz-Control/index.html:0)

triggers.txt

OnChannelPoint Hydration
Play 45 nowait water_splash01.mp3

OnChannelPoint Pop
Play 75 nowait pop.ogg

OnChannelPoint "Just A Box"
Play 75 just_a_box.wav

OnChannelPoint "Nice Shot"
Play 45 nice_shot.wav

SO the 2 sounds that I've been able to add already that DO work play fine, one of them is MP3 and the other is OGG, and the other 2 sounds I'm trying to get to work is WAV format, it's just a standard 16-bit PCM WAV format, and it fails to load as the error indicates that there's no supported source found.

Also can't help notice the other errors that show when its reading the triggers.txt file, the file itself appears fine, it follows the documentation examples clearly, but thinks there's an issue with the file when there's not. Also probably be a good idea to have the script skip over trying to use non-configured sockets with StreamLabs there, I use StreamElements, and that the only one I've configured this with, so I shouldn't be seeing errors relating to StreamLabs.

I did make sure that encasing Channel Point names in Double Quotations, so I don't see why it can't play these 2 WAV files. I can preview them on my system and they work fine I can play them in any audio player/editor just fine.

Shoutout doesn't work

Hi there,
i have created an OnSETwitchRaid event with a message and shoutout command, but the shoutout does not work! The streamelements connection works fine.

OnSETwitchRaid
Chat Send "/shoutout {user}"
Chat Send "{user} just raided the channel with {raiders} viewers PogChamp"

The second message appears in chat but the shoutout is not executed.

Check OBS connection and reset

Hey,
is there a way to check the OBS connection status on command?

For example something like this:

OnCommand bm 0 !check
If OBSConnected = true
Chat Send "Connected to websocket"
Else
Chat Send "Not connected to websocket"

Or alternative output an connection error at OnInit event?

For Example:

OnInit
If OBSConnected = false
Chat Send "Websocket connection error"

Thanks!

Add a way to list commands

Bot often have a !help or !commands command that can list all the commands it knows.
I know KC is more than a command bot but it can be nice to be able to create this sort of command on KC. I am expecting a configuration on the line of:

OnCommand a 0 !example
Chat Send _CommandList_

Not sure of the syntax but I wanted to show that I do not want KC to hardcode the command, just give the possibility to have it or not on a stream.

Note: I wanted to implement it myself to get into the code... but I did not have a lot of time recently. And I am not sure how to enter the project code wise.
I have the feeling that the CommandList variable will be generated by the this.commandsInfo (or not info one ? not sure) from https://github.com/Kruiser8/Kruiz-Control/blob/master/js/chat/chatHandler.js
But I am not sure if Chat Send refers to the line 147 of the same file (where there is an if/else send/whisper.

Invalid Password of Permission Scopes Error

This appears to be a bug because I've set valid password and permission scopes, but when I use a channel redeem on Twitch it doesn't work when it should. It was working previously, never changed anything, but then suddenly it decides it doesn't want to work because it claims invalid password or permissions scope. I tried changing to a new OAuth Token to see if that fixed the issue, but the issue remains, but like I said nothing WAS changed, it's been fine until now. Perhaps it's a change on Twitch side that broke the API that Kruiz-Control interacts with.

14:43:51.367: [obs-browser: 'Kruiz_Control'] Error: Kruiz Control v1.6.2 Initialized (http://absolute//home/alkaris/Kruiz-Control/js/index.js:4)
14:43:51.382: [obs-websocket] [WebSocketServer::onOpen] New WebSocket client has connected from [::ffff:127.0.0.1]:47852
14:43:51.389: [obs-websocket] [WebSocketServer::onClose] WebSocket client `[::ffff:127.0.0.1]:47852` has disconnected with code `4009` and reason: Authentication failed.
14:43:51.392: [obs-browser: 'Kruiz_Control'] Error: {"code":4009} (http://absolute//home/alkaris/Kruiz-Control/js/obs/obs-wrapper.js:22)
14:43:52.097: [obs-browser: 'Kruiz_Control'] Error: Invalid Password or Permission Scopes (channel:read:redemptions, user:read:email) (https://cdn.jsdelivr.net/npm/comfy.js@latest/dist/comfy.min.js:1)
14:43:55.764: [obs-browser: 'Kruiz_Control'] Error: Kruiz Control: Too many inputs provided for API.
14:43:55.764: Expected (2 inputs): ["action","url"]

It has valid password set, and has valid permission scopes set, but as the above error shows it seems to think otherwise.

tts folder doesnt exist

im going through changing the settings files and there isnt a tts folder or responsive voice script. how would i fix that?

Kruiz-Control on other computer

I'm trying to replicate some kind of streamdeck but with Open Source software, a Raspberry PI with its official screen and a case.

So I came across your project that seems really fiting to add to my "raspi-deck". You have a great documentation and even some videos (that may be too much to create a video for each minor/patch release but if you like to do so ^^).

Since I want my raspi to hold everything related to automate my stream, I wanted to install Kruiz-Control on it. I have 2 questions related to that:

  1. If I want to add the source from my PI in my OBS on my streaming PC, do I need nginx or something like that so OBS can access the file?
  2. Wouldn't Kruiz-Control work exactly the same if it is open from the browser on my Raspberry PI? (I'm already having the browser opened with https://github.com/t2t2/obs-tablet-remote on full screen, so a background tab won't annoy me).

Thank you for this project (and Mrgregles for the discovery).

Suggestion: Ad Break Trigger

New trigger for when midroll ads begin. Twitch added it to their API in October and it's out of beta. Documentation here

OnTWAdBreak Could be used to trigger chat messages (prompts to subscribe, get prime, thank viewers for supporting with ads, etc), make countdown timers visible on stream to show how far stream is into ad break, etc

<duration> would probably be the most useful parameter here (change chat messages or trigger different timers), though <is_automatic> could also be neat for conditional "Streamer is taking a break now so you don't miss the action!" or "Streamer had no control, ads have to run sometime" messages, etc

ResponsiveVoice not working properly

ResponsiveVoice does not seem to work properly unless you manually add the script tag to Kruiz-Control's index.html. I followed the instructions for setting it up to the letter (create account, add script tag to settings/tts/tag.txt, add TTS action to triggers.txt) and could not get it to do anything, not even play a preset welcome message, which implies that the script was not running at all. I'm running OBS 27.2.3; is it possible that the recent CEF update broke something? I hadn't tried using TTS actions until tonight, so I can't verify whether it worked in previous versions or not.

OBS Volume doc

In the Documentation, this sentence is... not complete:

Note, volume stands for the is not a percentage.
Maybe change it to something like the following:
Note: the volume stands for a value that does not look like a percentage to the human hear.

For your information and a better phrasing, apparently OBS is made with Qt, and the Qt doc around volume is explained here: https://doc.qt.io/qt-5/qml-qtmultimedia-video.html#volume-prop. I did not check OBS code to confirm but apparently the volume you have is a percentage, but the human hear works logarithmically, not in a percentage manner.

Add Mqtt Client

can you add a mqtt client so we can control WLED or Tasmota devices or connect it to oibroker or openhab ?

Multiple users for command

Hi there,

i want a command to be used by multiple users. is there a way to put multiple usernames instead of only one?
currently i have copied that action for every user but that fills the triggers.txt very much. maybe something like this:

OnCommand u [user1,user2,user3,user4] 0 !command

And then i want the same thing in the opposite way, like a command for everyone except a few users, like so:

OnCommand e 0 !command
If {user} in [user1,user2,user3,user4]
Chat Send "You have no permission for this command"
Else
Chat Send "Cool Command"

Is something possible with Kruiz?

Thanks!

Nested Actions cause `triggerParams` to be mapped incorrectly

Here's a simplified version of what I'm trying to accomplish:

OnAction ReadListFromDisk
    Variable Set _listData_ '["Hello","World"]'

OnAction ImportListFromDisk
    ReadListFromDisk {in1}
    Variable Load _listData_
    Chat Send "ImportListFromDisk Params: {in1} {in2}"
    List Import {in2} {_listData_}

OnAction PickRandomFromList
    ImportListFromDisk {in1} _RandomList_
    List Remove _RandomList_
    Variable Set _randomPicked_ {value}

OnCommand e 0 !test
    # 'greetings_responses' is bogus for now, but simulates a param passed in
    PickRandomFromList "greetings_responses"
    Chat Send {_randomPicked_}

Flow goes from !test Command -> PickRandomFromList -> ImportListFromDisk -> ReadListFromDisk

For some reason, it seems that the parameters all the way down after !test Command are identical.

I've been trying to debug this and leaving my findings in the Discord, but not getting anywhere (the async.js stuff isn't making it easy to follow).

Available here or on Discord if anyone wants to discuss more.

Add Follower as parameter?

I recently changed my mind on using Channel Points for playing a sound, since they are limited to a certain amount.
I'd like to set my sounds to be played on commands.
Unfortunately you can only set permission for subscriber, VIP, moderators etc.
Is it possible to include followers as well?
I don't like the idea of permitting everyone to use these commands.

Video playback

Heya!

First of all, this seems to be really cool.

Second, can Kruiz Control play some videos or show some images when an user uses bits, for example?

Thank you!

List to write to file, not to buffer

Hi,

I am trying to use the List functionality to create a quote list for my Twitch Channel, wanting to move completely from Streamlabs bot. The issue I have discovered is everytime the bot is reloaded or SLOBS is restarted, the list gets removed. I'll assume this is because the list is buffered as opposed to written to a file. Is there any chance this could be written to files so we can achieve this?

Thanks in advance,
Jake

Channel Point

Have you moved where the channel point functionality is stored? In your tutorial video, it had its own setting folder, but now it seems to not have dedicated settings folder.

Unable to find trigger for input

I just recently updated to new version of Kruiz Control but I'm running into an issue now where it can't find trigger for input when triggering a channel point with sound file.

I'm getting this spammed over and over in the console log

14:12:48.093: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: onchannelpoint (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.093: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: play (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.093: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: chat (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.093: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: onchannelpoint (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.093: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: chat (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: onchannelpoint (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: play (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: onchannelpoint (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: play (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: onchannelpoint (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: play (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: onchannelpoint (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:48.106: [obs-browser: 'Kruiz_Control'] Error: Unable to find trigger for input: play (http://absolute//home/alkaris/Kruiz-Control/js/controller.js:86)
14:12:49.128: [obs-browser: 'Kruiz_Control'] Error: Invalid Password or Permission Scopes (channel:read:redemptions, user:read:email) (https://cdn.jsdelivr.net/npm/comfy.js@latest/dist/comfy.min.js:1)

I haven't changed anything in the triggers.txt file it's always just been like this;

image

Do I have to change the format in the trigger.txt file by putting full path where the sound file is now?

Permission Check for u-Flag is not Case Insensitive

The documentation for Chat Triggers states the username for the u flag is case insensitive.

However, with v1.5.1 at least, any username given with uppercase characters does not cause the trigger to fire.

# This works
OnCommand u gambloide 0 "!testa"
Log "Test A works"

#This does not work
OnCommand u Gambloide 0 "!testb"
Log "Test B works"

The cause is in checkPermissions in chatHandler.js. While the user parameter is transformed to lower case, the info parameter given in the trigger is not transformed to lower case.

/**
   * Register trigger from user input.
   * @param {string} user twich username that sent message
   * @param {object} flags permission flags for the user
   * @param {string} permissions usability of the command or keyword
   * @param {string} info extra information for the usability
   */
  checkPermissions(user, flags, permissions, info) {
    user = user.toLowerCase();
    if (
      (permissions.includes('e')) ||
      (permissions.includes('s') && flags.subscriber) ||
      (permissions.includes('v') && flags.vip) ||
      (permissions.includes('f') && flags.founder) ||
      (permissions.includes('m') && flags.mod) ||
      (permissions.includes('b') && this.channel === user) ||
      (permissions.includes('n') && !flags.founder && !flags.subscriber && !flags.vip && !flags.mod && this.channel !== user) ||
      (permissions.includes('u') && info && user === info)
    ){
      return true;
    }
    return false;
  }

Adding info = info.toLowerCase(); before the permissions check fixes the issue.

Obs Source not working

I have a source set up where a channel point redeem can be bought to give my avatar headpats. It has worked perfectly up until the last 2 days, where the set source isn't triggering on.
I haven't changed anything amongst the code, and nothing in my streams has changed, the headpats just no longer trigger and I'm not sure why.

This is what I have set up (I've cut out the chat sends because there are a lot)
OnChannelPoint "Headpats!"
OBS Source headpats on
Random Equal "Chat Send
Delay 5
OBS Source headpats off

Any help would be amazing to help me get this back up and running!

random tts

i'm trying to have an onspeak of a specific user trigger a random tts speech line which 95% works, however, the voice variable is ignored and the default voice is used, additionally you cannot use the wait/nowait option as it will read that as part of the tts as well

random "TTS 'Microsoft James - English (Australia)' - - - [line1]" "TTS 'Microsoft James - English (Australia)' - - - [line2]" "TTS 'Microsoft James - English (Australia)' - - - [line3]"

OnChannelPoint triggers sources on other scenes similar to OnCommand and OnSpeak (I don't know how to label things as enhancement)

I use the "downstream keyer" plugin by Exeldro.
Combining this plugins features with the downstream keyer would keep things organized. Allowing alerts that you want to show at all times to be on a single scene but still show when you switch scenes during stream so you dont need to remake the same source over and over or copy it with "source copy" also by Exeldro.

I want to make sure no matter what Im doing all channel point redemptions will show and this functionality would solve that issue :)

User name is not recognized in OnCommand when Non-Alphabet characters is used as DisplayName.

Hi @Kruiser8, thank you for developing great plugin!
I'm using KC for about 3 months, and recently tried to add Chat Trigger command for me and my mods.

OnCommand bm 10 !example

but it didn't work, although my other commands are working e.g. OnInit/OnChannelPoint/OnSETwitchRaid

Reading through the code, I've found out that KC is matching the users' name by lower-casing the DisplayName.
But Twitch allows users to set DisplayName to non-alphabet characters like Kanji (Japanese/Chinese characters) and Hankul (Korian characters).

When you open your Twitch Settings page (https://www.twitch.tv/settings/profile),

  1. If your language settings is Alphabet based, your DisplayName can only customize capitalization.
  2. If you change the language settings to e.g. Japanese, your DisplayName can be customized to Japanese/Korean/Chinese characters.

You don't have to live in these countries! You just need to change the language settings from Twitch upper-right menu.

So users can have ChannelName test and set DisplayName テスト ("test" written in Japanese).

In these cases, commands like OnCommand b 10 !example doesn't work because lower-cased DisplayName doesn't match ChannelName so テスト is not recognized as a broadcaster.

I've tested and OnCommand u テスト 10 !example works in this case.

We need a way to distinguish DisplayName and ChannelName in the code to actually fix this issue.

YouTube integration

Loved using Kruiz-Control on my twitch stream and wanted to switch over to using it with YouTube also.

I was reading over the (YT docs)[https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list#pollingIntervalMillis] and it seems like the API would be polling instead of websockets.

Curious if you had any thoughts on this or how the integration would look? I'd be willing to do my own PR just figured I'd check-in to see if you had given this any other thought.

How to use Conditionals

How does one properly use an "If" statement? I had tried a few different ways to do this, but to no avail. The documentation doesn't help much either. I tried it both like this:

OnChannelPoint e "Retro Mode"
If {OBS CurrentScene} = "Main"
Play 100 nowait "Retro Mode.wav"
OBS Scene CRT
Delay 60
OBS Scene Main

And like this:

OnChannelPoint e "Retro Mode"
If OBS CurrentScene = "Main"
Play 100 nowait "Retro Mode.wav"
OBS Scene CRT
Delay 60
OBS Scene Main

Yet it seems to still not trigger, despite being in the "Main" scene. What exactly am I doing wrong here?

OnSETwitchBulkGiftSub not triggering

OnSETwitchBulkGiftSub doesn't seem to trigger anything. I've attempted the below trigger with no success.

OnSETwitchBulkGiftSub
Chat Send "Gift sub"

I've got OnSETwitchGiftSub and others working so hopefully that can rule out user error :)

[feature request] Add support for choosing what channel(s) the chat messages are sent to

I today started tweaking a bit with the chatHandler to allow for my bot account to send messages to my streaming account.
What i ended up doing was to add a third txt-file into the settings folder called "channel.txt" and read it in the chatHandlerExport, and passed the value when initializing:

async function chatHandlerExport() {
  var chat = new ChatHandler();
  var user = await readFile('settings/chat/user.txt');
  var oauth = await readFile('settings/chat/oauth.txt');
  var channel = await readFile('settings/chat/channel.txt'); // Can be empty? Also, comma separated channels here?
  chat.init(user.trim(), oauth.trim(), channel.trim());
}

And then in the initialization:

init(user, oauth, channel) {
  this.channel = user.toLowerCase();
  ComfyJS.onConnected = ( address, port, isFirstConnect ) => {
    if (isFirstConnect) {
      this.success();
    }
  }
  if (user) {
    if (oauth) {
      // Needs proper null/undefined/falsy check for channel here
      ComfyJS.Init(user, oauth, channel);
    } else {
      ComfyJS.Init(user);
    }
  }
}

This of course works fine and dandy for myself, but for the other people out there, maybe they want the option to do this as well. I suggest adding something like this, with comma-separation in "channel.txt" for multiple channels if wanted, and some null/undefined/falsy checks in the initialization.

Found the solution to connect to another channel via https://github.com/instafluff/ComfyJS#joining-a-different-channel.

If this feature request is denied, maybe this could help others out there.

The check for falsy could of course be replaced with something like ComfyJS.Init(user, oauth, (channel || user)); if you wanna do something quick and dirty however. Not sure what i think about that solution though.

Cheers, and thank you for awesome software!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.