Skip to content

Edgenesis/shifu-function-calling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shifu Function Calling Demo

Video

Shifu Function Calling Demo

Prepare

Before running the demo, you need to install the following tools:

Make sure Docker is running before proceeding by running the following command.

docker ps

Setup deviceShifu

Create a Kind cluster and deploy the Ingress controller and Shifu.

kind create cluster --config=config.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/Edgenesis/shifu/v0.52.0/pkg/k8s/crd/install/shifu_install.yml

Deploy deviceShifu for Camera (RTSP), Siemens PLC (S7) and LED (OPC UA).

kubectl create secret -n deviceshifu generic camera-secret  --from-literal=IP_CAMERA_PASSWORD={CAMERA_PASSWORD}
kubectl apply -f deviceshifu
kubectl apply -f ingress.yaml

To view the camera stream, open the following URL in the browser.

http://localhost:30080/deviceshifu-camera/stream?timeout=0

To send a single bit to the PLC, run the following command.

curl "localhost:30080/deviceshifu-plc/sendsinglebit?rootaddress=Q&address=0&start=0&digit=1&value=0"; echo
curl "localhost:30080/deviceshifu-plc/sendsinglebit?rootaddress=Q&address=0&start=0&digit=1&value=1"; echo

To read from LED, run the following command.

curl "localhost:30080/deviceshifu-led/number"

To write to LED, run the following command.

curl -XPOST -d '{"value":2999}' "localhost:30080/deviceshifu-led/number"

Run function calling demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published