/MS-Teams.Bot.Inxton.TwinCAT

Repository for a live coding session

Primary LanguageC#

How to control PLC from MS TEAMS

This a repository from a live coding session.

Demonstrates how to use Inxton, TcOpen and Beckhoff TwinCAT 3 PLC to interact with MS Teams Bot.

plc ms teams

Sample that I used to get started - https://docs.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration

How to run the bot

  1. Open Visual Studio
  2. Run the project TeamsConversationBot
  3. Run ngrog : ngrok http -host-header=rewrite 3978
  4. Create Bot Framework registration resource in Azure
  5. Update the appsettings.json configuration for the bot to use the Microsoft App Id and App Password from the Bot Framework registration. (Note the App Password is referred to as the "client secret" in the azure portal and you can always create a new client secret anytime.)
  6. Download the PLC project to localhost
    • If you don't have TcOpen.Core installed, install it from TwinTeams\lib folder.
  7. Get the free inxton licence at inxton.com
  8. Use the url from the Teams channel to open the bot in MS Teams and enjoy!