Repository: Edgenesis/shifu

Issue:
Feature Request: Remove PLC4x Module from Shifu

## Summary
Remove the PLC4x integration module from Shifu as it has become redundant with the development of custom internal drivers that provide better performance and maintainability.

## Background
The PLC4x module was initially integrated into Shifu to provide support for multiple industrial protocols (S7, ADS, BACnet, CBus, EIP, KNX, Modbus variants). However, with the evolution of our architecture and the development of custom internal drivers, this dependency has become unnecessary and adds complexity to the codebase.

## Current PLC4x Implementation
The current PLC4x integration includes:
- **Go module dependency**: `github.com/apache/plc4x/plc4go v0.0.0-20220929155823-14e7d8450c87` (go.mod:6)
- **Core implementation**: `pkg/deviceshifu/deviceshifuplc4x/` directory with ~200 lines of code
- **Docker image**: `edgehub/deviceshifu-http-plc4x:v0.79.0`
- **Example deployments**: Complete deployment files in `examples/plc4xDeviceShifu/`
- **Build infrastructure**: `dockerfiles/Dockerfile.deviceshifuPLC4X`
- **Protocol support**: S7, ADS, BACnet, CBus, EIP, KNX, ModbusAscii, ModbusRTU, ModbusTcp

## Rationale for Removal

1. **Low Usage**: The PLC4x module is not actively used and adds unnecessary complexity to the codebase.

2. **Build Complexity**: Recent issues with PLC4x arm64 builds (noted in CHANGELOG-v0.55.0.md:23) demonstrate the maintenance burden.

3. **Outdated Dependency**: The PLC4x dependency dates back to October 2022 and may contain security vulnerabilities or performance issues.

4. **Architectural Simplification**: Removing unused components aligns with keeping the codebase lean and maintainable.

5. **Resource Optimization**: Removing PLC4x reduces binary size, build time, and dependency management overhead.

6. **On-Demand Implementation**: Protocol support can be implemented on-demand when there is actual user need, allowing for more targeted and modern solutions.

## Implementation Plan

### Phase 1: Deprecation (Next Release)
- [ ] Mark PLC4x module as deprecated in documentation
- [ ] Add deprecation warnings to PLC4x deviceshifu logs
- [ ] Notify users about the planned removal

### Phase 2: Removal (Target: v0.81.0)
- [ ] Remove PLC4x Go module dependency from `go.mod`
- [ ] Delete `pkg/deviceshifu/deviceshifuplc4x/` directory
- [ ] Remove `cmd/deviceshifu/cmdplc4x/` command
- [ ] Delete `examples/plc4xDeviceShifu/` directory
- [ ] Remove `dockerfiles/Dockerfile.deviceshifuPLC4X`
- [ ] Update build scripts and Makefile
- [ ] Remove PLC4x protocol types from `pkg/k8s/api/v1alpha1/edgedevice_types.go`
- [ ] Update Azure pipeline configuration
- [ ] Clean up any references in documentation

### Phase 3: Future Implementation
- [ ] Implement protocol support on-demand based on community requests
- [ ] Design modern, targeted solutions for specific protocol needs
- [ ] Maintain documentation for future protocol implementation guidelines

## Breaking Changes
- **Protocol Support**: `v1alpha1.ProtocolPLC4X` will no longer be supported
- **Docker Images**: `deviceshifu-http-plc4x` images will be discontinued
- **CRD Changes**: PLC4x-specific protocol settings will be removed from EdgeDevice CRD

## Migration Path
Users currently using PLC4x deviceshifu should:
1. Evaluate their protocol requirements and usage
2. Contact the development team if continued PLC protocol support is needed
3. Plan for alternative solutions or custom implementations if required
4. Test existing functionality before upgrading to the release containing this removal

## Files to be Modified/Removed
```
go.mod (remove PLC4x dependency)
pkg/deviceshifu/deviceshifuplc4x/ (delete directory)
cmd/deviceshifu/cmdplc4x/ (delete directory)
examples/plc4xDeviceShifu/ (delete directory)
dockerfiles/Dockerfile.deviceshifuPLC4X (delete file)
pkg/k8s/api/v1alpha1/edgedevice_types.go (remove PLC4x types)
pkg/k8s/crd/config/edgedevice/bases/shifu.edgenesis.io_edgedevices.yaml (update CRD)
azure-pipelines/azure-pipelines.yml (remove PLC4x builds)
Makefile (remove PLC4x targets)
```

## Timeline
- **v0.80.0**: Deprecation warnings and documentation updates
- **v0.81.0**: Complete removal of PLC4x module

## Testing Requirements
- Verify that existing non-PLC4x functionality remains unaffected
- Ensure that build processes work correctly without PLC4x dependencies
- Confirm that removal doesn't break any existing integrations or workflows

## Additional Context
- PLC4x was temporarily removed from arm64 builds in v0.55.0 due to Go 1.23.3 compatibility issues
- The module has not seen active development or usage within the current architecture
- Removal will simplify the codebase and reduce maintenance overhead
- Future protocol implementations will be designed based on actual user requirements and modern best practices

Hints from issue comments:

Solution patch:
diff --git a/Makefile b/Makefile
index 0b1b76e..b8e026e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -
 # This is automatically detected from the sigs.k8s.io/controller-runtime version in go.mod
 ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
 
-DEVICESHIFU_CMDS := deviceshifu/cmdhttp deviceshifu/cmdmqtt deviceshifu/cmdopcua deviceshifu/cmdplc4x deviceshifu/cmdsocket
+DEVICESHIFU_CMDS := deviceshifu/cmdhttp deviceshifu/cmdmqtt deviceshifu/cmdopcua deviceshifu/cmdsocket
 HTTPSTUB_CMDS := httpstub/powershellstub httpstub/sshstub
 SHIFUCTL_CMD := shifuctl
 TELEMETRYSERVICE_CMD := telemetryservice
@@ -62,11 +62,6 @@ buildx-push-image-deviceshifu-http-opcua:
 		--build-arg PROJECT_ROOT="${PROJECT_ROOT}" ${PROJECT_ROOT} \
 		-t edgehub/deviceshifu-http-opcua:${IMAGE_VERSION} --push
 
-buildx-push-image-deviceshifu-http-plc4x:
-	docker buildx build --platform=linux/amd64,linux/arm64 -f ${PROJECT_ROOT}/dockerfiles/Dockerfile.deviceshifuPLC4X \
-		--build-arg PROJECT_ROOT="${PROJECT_ROOT}" ${PROJECT_ROOT} \
-		-t edgehub/deviceshifu-http-plc4x:${IMAGE_VERSION} --push
-
 buildx-push-image-deviceshifu-tcp-tcp:
 	docker buildx build --platform=linux/amd64,linux/arm64,linux/arm -f ${PROJECT_ROOT}/dockerfiles/Dockerfile.deviceshifuTCP\
 		--build-arg PROJECT_ROOT="${PROJECT_ROOT}" ${PROJECT_ROOT} \
@@ -136,7 +131,6 @@ buildx-push-image-deviceshifu: \
 	buildx-push-image-deviceshifu-http-mqtt \
 	buildx-push-image-deviceshifu-http-socket \
 	buildx-push-image-deviceshifu-http-opcua \
-	buildx-push-image-deviceshifu-http-plc4x \
 	buildx-push-image-deviceshifu-tcp-tcp \
 	buildx-push-image-deviceshifu-http-lwm2m \
 	buildx-push-image-gateway-lwm2m
@@ -176,11 +170,6 @@ buildx-build-image-deviceshifu-http-opcua:
 		--build-arg PROJECT_ROOT="${PROJECT_ROOT}" ${PROJECT_ROOT} \
 		-t edgehub/deviceshifu-http-opcua:${IMAGE_VERSION} --load
 
-buildx-build-image-deviceshifu-http-plc4x:
-	docker buildx build --platform=linux/$(shell go env GOARCH) -f ${PROJECT_ROOT}/dockerfiles/Dockerfile.deviceshifuPLC4X\
-		--build-arg PROJECT_ROOT="${PROJECT_ROOT}" ${PROJECT_ROOT} \
-		-t edgehub/deviceshifu-http-plc4x:${IMAGE_VERSION} --load
-
 buildx-build-image-deviceshifu-tcp-tcp:
 	docker buildx build --platform=linux/$(shell go env GOARCH) -f ${PROJECT_ROOT}/dockerfiles/Dockerfile.deviceshifuTCP\
 		--build-arg PROJECT_ROOT="${PROJECT_ROOT}" ${PROJECT_ROOT} \
@@ -233,7 +222,6 @@ buildx-build-image-deviceshifu: \
 	buildx-build-image-deviceshifu-http-mqtt \
 	buildx-build-image-deviceshifu-http-socket \
 	buildx-build-image-deviceshifu-http-opcua \
-	buildx-build-image-deviceshifu-http-plc4x \
 	buildx-build-image-deviceshifu-tcp-tcp \
 	buildx-build-image-deviceshifu-http-lwm2m \
 	buildx-build-image-gateway-lwm2m
diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml
index 5190e2e..19a89f9 100644
--- a/azure-pipelines/azure-pipelines.yml
+++ b/azure-pipelines/azure-pipelines.yml
@@ -442,18 +442,6 @@ stages:
               kubectl delete -f $(System.DefaultWorkingDirectory)/examples/deviceshifu/customized/humidity_detector/configuration
             displayName: "Shifu demo humidity_detector deviceshifu E2E test"
 
-      - job: build_test_plc4x
-        steps:
-          - task: GoTool@0
-            inputs:
-              version: $(goVersion)
-          - script: |
-              tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag"
-            displayName: Set the tag name as an environment variable
-          - script: |
-              make buildx-build-image-deviceshifu-http-plc4x
-            displayName: build edgehub/deviceshifu-http-plc4x
-
       - job: docker_e2e_test_telemetryservice
         steps:
           - task: GoTool@0
@@ -649,24 +637,6 @@ stages:
               make buildx-push-image-gateway-lwm2m
             displayName: build gateway-lwm2m
 
-      - job: docker_push_deviceshifu_http_plc4x
-        steps:
-          - task: GoTool@0
-            inputs:
-              version: $(goVersion)
-          - task: Docker@2
-            displayName: Login to DockerHub
-            inputs:
-              command: login
-              containerRegistry: dockerhub-connection
-          - script: |
-              docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
-              docker buildx create --use
-            displayName: configure multi-arch and buildx
-          - script: |
-              make buildx-push-image-deviceshifu-http-plc4x
-            displayName: build deviceshifu-http-plc4x
-
       - job: docker_push_deviceshifu_tcp_tcp
         steps:
           - task: GoTool@0
@@ -973,4 +943,3 @@ stages:
               runOptions: "inline"
               inline: "sudo cp -R /home/ubuntu/demo-files/* /var/www/demo-site/demo-content"
               readyTimeout: "20000"
-
diff --git a/cmd/deviceshifu/cmdplc4x/main.go b/cmd/deviceshifu/cmdplc4x/main.go
deleted file mode 100644
index 3cc77f9..0000000
--- a/cmd/deviceshifu/cmdplc4x/main.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package main
-
-import (
-	"os"
-
-	"github.com/edgenesis/shifu/pkg/deviceshifu/deviceshifubase"
-	"github.com/edgenesis/shifu/pkg/deviceshifu/deviceshifuplc4x"
-	"github.com/edgenesis/shifu/pkg/logger"
-
-	"k8s.io/apimachinery/pkg/util/wait"
-)
-
-func main() {
-	deviceName := os.Getenv("EDGEDEVICE_NAME")
-	namespace := os.Getenv("EDGEDEVICE_NAMESPACE")
-
-	deviceShifuMetadata := &deviceshifubase.DeviceShifuMetaData{
-		Name:           deviceName,
-		ConfigFilePath: deviceshifubase.DeviceConfigmapFolderPath,
-		KubeConfigPath: deviceshifubase.KubernetesConfigDefault,
-		Namespace:      namespace,
-	}
-
-	ds, err := deviceshifuplc4x.New(deviceShifuMetadata)
-	if err != nil {
-		panic(err.Error())
-	}
-
-	err = ds.Start(wait.NeverStop)
-	if err != nil {
-		logger.Errorf("Error starting deviceshifu: %v", err)
-		panic(err.Error())
-	}
-	select {}
-}
diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X
deleted file mode 100644
index c5e6c14..0000000
--- a/dockerfiles/Dockerfile.deviceshifuPLC4X
+++ /dev/null
@@ -1,30 +0,0 @@
-# Build the manager binary
-FROM golang:1.24.2-alpine AS builder
-
-WORKDIR /shifu
-
-ENV GO111MODULE=on
-
-COPY go.mod go.mod
-COPY go.sum go.sum
-COPY pkg/k8s pkg/k8s
-COPY cmd/deviceshifu/cmdplc4x cmd/deviceshifu/cmdplc4x
-COPY pkg/deviceshifu pkg/deviceshifu
-COPY pkg/logger pkg/logger
-
-RUN apk add --no-cache gcc musl-dev libpcap-dev
-
-RUN go mod download
-
-# Build the Go app
-ARG TARGETOS
-ARG TARGETARCH
-
-RUN CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_LDFLAGS="-static" go build -a -v -o /output/deviceshifu  cmd/deviceshifu/cmdplc4x/main.go
-
-FROM gcr.io/distroless/static-debian11
-WORKDIR /
-COPY --from=builder /output/deviceshifu deviceshifu
-
-USER 65532:65532
-ENTRYPOINT ["/deviceshifu"]
diff --git a/docs/WOT_technical.md b/docs/WOT_technical.md
index 160456a..665ad6f 100644
--- a/docs/WOT_technical.md
+++ b/docs/WOT_technical.md
@@ -9,7 +9,7 @@
 This is done by writing a YAML file to describe the device and its capabilities. We'd like to switch our definition to TD defined in WoT.
 
 Currently, If the device supports public protocols, we can support it seamlessly with our framework.
-We currently support: **MQTT, OPCUA, HTTP, Socket, TCP, Modbus, Simens s7 and all the protocl supported by plc4x (AB-Ethernet, ADS /AMS, BACnet/IP, CANopen, DeltaV, DF1, EtherNet/IP, Firmata, KNXnet/IP, Modbus, OPC-UA, S7)**
+We currently support: **MQTT, OPCUA, HTTP, Socket, TCP, Modbus, Simens s7, PLC4X** *(PLC4X DeviceShifu is deprecated as of v0.81.0 and scheduled for removal in a future release; see https://github.com/Edgenesis/shifu/issues/1271 for details.)*
 If the device only supports proprietary protocols, we would create a reusable driver for the device to abstract its capabilities and package it into a docker container, and then make the container a completely reusable digital twin called *deviceShifu*. Whenever you have a new project, you can just mix&match *deviceShifu* and configure it with the necessary parameters, just like how you play with lego blocks.
 
 An example for this scenario can be found [here](https://github.com/Edgenesis/shifu/tree/main/examples/rtspDeviceShifu):
@@ -142,7 +142,6 @@ type ProtocolSettings struct {
 	MQTTSetting   *MQTTSetting   `json:"MQTTSetting,omitempty"`
 	OPCUASetting  *OPCUASetting  `json:"OPCUASetting,omitempty"`
 	SocketSetting *SocketSetting `json:"SocketSetting,omitempty"`
-	PLC4XSetting  *PLC4XSetting  `json:"PLC4XSetting,omitempty"`
 	TCPSetting    *TCPSetting    `json:"TCPSetting,omitempty"`
 }
 
diff --git a/docs/design/deviceshifu/design-deviceShifu-plc4x.md b/docs/design/deviceshifu/design-deviceShifu-plc4x.md
deleted file mode 100644
index d06478e..0000000
--- a/docs/design/deviceshifu/design-deviceShifu-plc4x.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# DeviceShifu PLC4X Design
-
-DeviceShifu-PLC4X allows shifu utilize [apache plc4x](https://plc4x.apache.org/) project to integrate PLC devices with various protocols such as S7, Modbus, etc.
-
-## Goal
-- Create a deviceShifu-PLC4X type using PLC4X library and allow user to connect PLC devices with all the [supported protocols](https://plc4x.apache.org/users/protocols/index.html) with only this single deviceShifu-PLC4X.
-
-## General Design
-
-deviceShifu-PLC4X will receive RESTful style request like other, then transfer the request into valid PLC4X method calls and send it to connected devices.
-
-## Detailed Design
-
-### Protocol Specification
-PLC4X can support various protocols, thus when initializing deviceShifu-PLC4X, user should specify which protocol to use. In order to support protocol specification,
-we can add new settings to edgedevice_types.go to support it.
-
-```go
-type ProtocolSettings struct {
-	MQTTSetting   *MQTTSetting   `json:"MQTTSetting,omitempty"`
-	OPCUASetting  *OPCUASetting  `json:"OPCUASetting,omitempty"`
-	SocketSetting *SocketSetting `json:"SocketSetting,omitempty"`
-+	PLC4XSetting  *PLC4XSetting  `json:"PLC4XSetting,omitempty"`
-}
-
-// PLC4XSetting defines PLC4X specific settings when connecting to an EdgeDevice
-type PLC4XSetting struct {
-    //DrvierType is an enum of all the supported protocols
-    DriverType *DriverType `json:"driverType,omitempty"`
-}
-```
-DeviceShifu-PLC4X will maintain an enum of protocols and match the driver base on the setting:
-```go
- swtich plc4xSetting.DrvierType:
-	 case S7:
-		 drviers.RegsiterS7(drvierManager)
-		 ...
-```
-
-### Serving requests
-deviceShifu-PLC4X would take RESTful-style requests just as other deviceShifu do. 
-PLC4X supports both `read` and `write` requests. 
-
-For read, the method signature looks like:
-```go
-// Prepare a read-request
-readRequest, err := connection.ReadRequestBuilder().
-	AddQuery("field", "holding-register:26:REAL").
-	AddQuery("field", "holding-register:3:REAL").
-	Build()
-```
-For write, the method signature looks like:
-```go
-// Prepare a write-request
-writeRequest, err := connection.WriteRequestBuilder().
-	AddQuery("field", "holding-register:26:REAL", 2.7182818284).
-	AddQuery("field", "holding-register:3:REAL", 3.141592657).
-	Build()
-```
-
-Thus, we can construct the REST request as the following format:
-```
-For read:
-http://device-plc/read?${field1}?${field2}
-e.g: http://device-plc/read?holding-register:26:REAL?holding-register:3:REAL
-For write:
-http://device-plc/write?${field1}=${value1}?${field2}=${value2}
-e.g: http://device-plc/write?holding-register:26:REAL=2.7182818284?holding-register:3:REAL=3.141592657
-```
-The `read` , `write` after `http://device-plc/` will be served as an instruction router.
-`?` would be served as query delimiter, whatever comes between `?` will be seen as the query.
-
-For `read`, the query would only contain the fields requests reading from. 
-For `write`, the query would contain the fields requests trying to write and the value it tries to write. 
-
-## Testing Plan
-We can use existing mock-plc device, create a deviceShifu-PLC4X image add a e2e test to current azure-pipeline to run test against deviceShifu-PLC4X.
-
diff --git a/docs/development/develop-deviceshifu.md b/docs/development/develop-deviceshifu.md
index 68c0bbf..5b7fe47 100644
--- a/docs/development/develop-deviceshifu.md
+++ b/docs/development/develop-deviceshifu.md
@@ -306,4 +306,4 @@ For mockdevice you can check `pkg/deviceshifu/mockdevice` and for how to write e
 
 ## Miscellaneous
 
-If you are interested in more detailed guides on how to develop a `deviceshifu`, you can reference to the commit [65e124d9](https://github.com/Edgenesis/shifu/commit/65e124d9823afeca9640a7514c893224f67508a0) on how we created `deviceshifuplc4x`, a deviceshifu that utilizes plc4x library.
+If you are interested in more detailed guides on how to develop a `deviceshifu`, you can reference the historical commit [65e124d9](https://github.com/Edgenesis/shifu/commit/65e124d9823afeca9640a7514c893224f67508a0) that introduced the now-retired `deviceshifuplc4x` implementation.
diff --git a/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_configmap.yaml b/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_configmap.yaml
deleted file mode 100644
index c20c194..0000000
--- a/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_configmap.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: plc4x-configmap
-  namespace: deviceshifu
-data:
-  driverProperties: |
-    driverSku: testPlc4x
-    driverImage: 
-  instructions: |
-    instructions:
-  telemetries: |
-    telemetrySettings:
diff --git a/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_deployment.yaml b/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_deployment.yaml
deleted file mode 100644
index 5430830..0000000
--- a/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_deployment.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  labels:
-    app: deviceshifu-plc4x-deployment
-  name: deviceshifu-plc4x-deployment
-  namespace: deviceshifu
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: deviceshifu-plc4x-deployment
-  template:
-    metadata:
-      labels:
-        app: deviceshifu-plc4x-deployment
-    spec:
-      containers:
-      - image: edgehub/deviceshifu-http-plc4x:nightly
-        name: deviceshifu-http
-        ports:
-        - containerPort: 8080
-        volumeMounts:
-        - name: deviceshifu-config
-          mountPath: "/etc/edgedevice/config"
-          readOnly: true
-        env:
-        - name: EDGEDEVICE_NAME
-          value: "edgedevice-plc4x"
-        - name: EDGEDEVICE_NAMESPACE
-          value: "devices"
-      volumes:
-      - name: deviceshifu-config
-        configMap:
-          name: plc4x-configmap
-      serviceAccountName: edgedevice-sa
diff --git a/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_service.yaml b/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_service.yaml
deleted file mode 100644
index db34cdd..0000000
--- a/examples/plc4xDeviceShifu/deployment/plc4x_deviceshifu_service.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: deviceshifu-plc4x-deployment
-  name: deviceshifu-plc4x
-  namespace: deviceshifu
-spec:
-  ports:
-  - port: 80
-    protocol: TCP
-    targetPort: 8080
-  selector:
-    app: deviceshifu-plc4x-deployment
-  type: LoadBalancer
-  
\ No newline at end of file
diff --git a/examples/plc4xDeviceShifu/deployment/plc4x_edgedevice.yaml b/examples/plc4xDeviceShifu/deployment/plc4x_edgedevice.yaml
deleted file mode 100644
index 60b8fc5..0000000
--- a/examples/plc4xDeviceShifu/deployment/plc4x_edgedevice.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-apiVersion: shifu.edgenesis.io/v1alpha1
-kind: EdgeDevice
-metadata:
-  name: edgedevice-plc4x
-  namespace: devices
-spec:
-  sku: "testPlc4x" 
-  connection: Ethernet
-  address: 192.168.0.1 #change this accordingly
-  protocol: PLC4X
-  protocolSettings:
-    PLC4XSetting:
-      protocol: s7
diff --git a/go.mod b/go.mod
index 8252a76..5ef79ab 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,6 @@ module github.com/edgenesis/shifu
 go 1.24.2
 
 require (
-	github.com/apache/plc4x/plc4go v0.0.0-20220929155823-14e7d8450c87
 	github.com/eclipse/paho.mqtt.golang v1.5.0
 	github.com/gopcua/opcua v0.8.0
 	gopkg.in/yaml.v3 v3.0.1
@@ -102,7 +101,6 @@ require (
 )
 
 require (
-	github.com/IBM/netaddr v1.5.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cespare/xxhash/v2 v2.3.0 // indirect
 	github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
@@ -115,15 +113,11 @@ require (
 	github.com/go-openapi/swag v0.23.0 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
 	github.com/google/go-cmp v0.7.0 // indirect
-	github.com/google/gopacket v1.1.19 // indirect
 	github.com/google/uuid v1.6.0 // indirect
 	github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
-	github.com/icza/bitio v1.1.0 // indirect
 	github.com/imdario/mergo v0.3.16
-	github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4 // indirect
 	github.com/josharian/intern v1.0.0 // indirect
 	github.com/json-iterator/go v1.1.12 // indirect
-	github.com/libp2p/go-reuseport v0.2.0 // indirect
 	github.com/mailru/easyjson v0.9.0 // indirect
 	github.com/mattn/go-colorable v0.1.12 // indirect
 	github.com/mattn/go-isatty v0.0.16 // indirect
@@ -135,11 +129,10 @@ require (
 	github.com/prometheus/client_model v0.6.2 // indirect
 	github.com/prometheus/common v0.66.1 // indirect
 	github.com/prometheus/procfs v0.17.0 // indirect
-	github.com/rs/zerolog v1.28.0 // indirect
 	github.com/spf13/pflag v1.0.10 // indirect
 	go.uber.org/multierr v1.11.0 // indirect
 	go.uber.org/zap v1.27.0
-	golang.org/x/net v0.44.0
+	golang.org/x/net v0.44.0 // indirect
 	golang.org/x/oauth2 v0.30.0 // indirect
 	golang.org/x/sync v0.17.0 // indirect
 	golang.org/x/sys v0.36.0 // indirect
diff --git a/go.sum b/go.sum
index 297bc22..35d9e62 100644
--- a/go.sum
+++ b/go.sum
@@ -16,14 +16,10 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJ
 github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
 github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
 github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
-github.com/IBM/netaddr v1.5.0 h1:IJlFZe1+nFs09TeMB/HOP4+xBnX2iM/xgiDOgZgTJq0=
-github.com/IBM/netaddr v1.5.0/go.mod h1:DDBPeYgbFzoXHjSz9Jwk7K8wmWV4+a/Kv0LqRnb8we4=
 github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
 github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
 github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
 github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
-github.com/apache/plc4x/plc4go v0.0.0-20220929155823-14e7d8450c87 h1:3Qgdn6NIyukxmdX7mDIgKtIvV9gv8/9cZNknTiByo50=
-github.com/apache/plc4x/plc4go v0.0.0-20220929155823-14e7d8450c87/go.mod h1:NTdwTrKa2hdaFj3Z05SefUe5haJ5eOgCePo84DCxhjU=
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
@@ -36,7 +32,6 @@ github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7
 github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
 github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
 github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -83,7 +78,6 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v
 github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
 github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
 github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
-github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
 github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
@@ -105,8 +99,6 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
 github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
-github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
 github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
 github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
 github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -119,16 +111,10 @@ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w7
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww=
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90=
 github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/icza/bitio v1.1.0 h1:ysX4vtldjdi3Ygai5m1cWy4oLkhWTAi+SyO6HC8L9T0=
-github.com/icza/bitio v1.1.0/go.mod h1:0jGnlLAx8MKMr9VGnn/4YrvZiprkvBelsVIbA9Jjr9A=
-github.com/icza/mighty v0.0.0-20180919140131-cfd07d671de6 h1:8UsGZ2rr2ksmEru6lToqnXgA8Mz1DP11X4zSJ159C3k=
-github.com/icza/mighty v0.0.0-20180919140131-cfd07d671de6/go.mod h1:xQig96I1VNBDIWGCdTt54nHt6EeI639SmHycLYL7FkA=
 github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
 github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
 github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
-github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4 h1:G2ztCwXov8mRvP0ZfjE6nAlaCX2XbykaeHdbT6KwDz0=
-github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4/go.mod h1:2RvX5ZjVtsznNZPEt4xwJXNJrM3VTZoQf7V6gk0ysvs=
 github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
 github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
 github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
@@ -149,8 +135,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
-github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560=
-github.com/libp2p/go-reuseport v0.2.0/go.mod h1:bvVho6eLMm6Bz5hmU0LYN3ixd3nPPvtIlaURZZgOY4k=
 github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
 github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
 github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
@@ -213,11 +197,8 @@ github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7D
 github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
 github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
 github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
-github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
 github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
 github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
-github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY=
-github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
 github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
@@ -231,7 +212,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
 github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
-github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
@@ -298,8 +278,6 @@ golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
 golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
 golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo7yrN4mVcnkHDYz5vvs=
 golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
 golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
@@ -337,7 +315,6 @@ golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
 golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
 golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
diff --git a/pkg/deviceshifu/deviceshifuplc4x/configmap_snippet.yaml b/pkg/deviceshifu/deviceshifuplc4x/configmap_snippet.yaml
deleted file mode 100644
index 550115a..0000000
--- a/pkg/deviceshifu/deviceshifuplc4x/configmap_snippet.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-data:
-  driverProperties: |
-    driverSku: Edgenesis Mock Device
-    driverImage: edgenesis/mockdevice:v0.0.1
-    driverExecution: python mock_driver.py
-  instructions: |
-    instructions:
-      get_reading:
-      get_status:
-      set_reading:
-        argumentPropertyList:
-        - valueType: "Int32"
-          readWrite: "W"
-          defaultValue: null
-      start:
-      stop:
-  telemetries: |
-    telemetrySettings:
-      telemetryUpdateIntervalInMilliseconds: 1000
diff --git a/pkg/deviceshifu/deviceshifuplc4x/deviceshifuplc4x.go b/pkg/deviceshifu/deviceshifuplc4x/deviceshifuplc4x.go
deleted file mode 100644
index c1e1953..0000000
--- a/pkg/deviceshifu/deviceshifuplc4x/deviceshifuplc4x.go
+++ /dev/null
@@ -1,218 +0,0 @@
-package deviceshifuplc4x
-
-import (
-	"encoding/json"
-	"fmt"
-	"net/http"
-	"time"
-
-	plc4go "github.com/apache/plc4x/plc4go/pkg/api"
-	"github.com/apache/plc4x/plc4go/pkg/api/drivers"
-	"github.com/edgenesis/shifu/pkg/deviceshifu/deviceshifubase"
-	"github.com/edgenesis/shifu/pkg/deviceshifu/utils"
-	"github.com/edgenesis/shifu/pkg/k8s/api/v1alpha1"
-	"github.com/edgenesis/shifu/pkg/logger"
-	"golang.org/x/net/context"
-)
-
-// DeviceShifu deviceshifu and socketConnection for Socket
-type DeviceShifu struct {
-	base *deviceshifubase.DeviceShifuBase
-	conn *plc4go.PlcConnectionConnectResult
-}
-
-// New new socket deviceshifu
-func New(deviceShifuMetadata *deviceshifubase.DeviceShifuMetaData) (*DeviceShifu, error) {
-	base, mux, err := deviceshifubase.New(deviceShifuMetadata)
-	if err != nil {
-		return nil, err
-	}
-
-	ds := &DeviceShifu{base: base}
-
-	var connectionResult plc4go.PlcConnectionConnectResult
-	if deviceShifuMetadata.KubeConfigPath != deviceshifubase.DeviceKubeconfigDoNotLoadStr {
-		if *base.EdgeDevice.Spec.Protocol != v1alpha1.ProtocolPLC4X {
-			return nil, fmt.Errorf("Protocol not support in plc4x")
-		}
-
-		protocol := base.EdgeDevice.Spec.ProtocolSettings.PLC4XSetting.Protocol
-
-		driverManager := plc4go.NewPlcDriverManager()
-
-		switch *protocol {
-		case v1alpha1.Plc4xProtocolS7:
-			drivers.RegisterS7Driver(driverManager)
-		case v1alpha1.Plc4xProtocolADS:
-			drivers.RegisterAdsDriver(driverManager)
-		case v1alpha1.Plc4xProtocolBACnet:
-			drivers.RegisterBacnetDriver(driverManager)
-		case v1alpha1.Plc4xProtocolCBus:
-			drivers.RegisterCBusDriver(driverManager)
-		case v1alpha1.Plc4xProtocolEip:
-			drivers.RegisterEipDriver(driverManager)
-		case v1alpha1.Plc4xProtocolKnx:
-			drivers.RegisterKnxDriver(driverManager)
-		case v1alpha1.Plc4xProtocolModbusAscii:
-			drivers.RegisterModbusAsciiDriver(driverManager)
-		case v1alpha1.Plc4xProtocolModbusRTU:
-			drivers.RegisterModbusRtuDriver(driverManager)
-		case v1alpha1.Plc4xProtocolModbusTcp:
-			drivers.RegisterModbusTcpDriver(driverManager)
-		}
-
-		address := string(*protocol) + "://" + *base.EdgeDevice.Spec.Address
-
-		connectionRequestChanel := driverManager.GetConnection(address)
-
-		// Wait for the driver to connect (or not)
-		connectionResult = <-connectionRequestChanel
-
-		// Check if something went wrong
-		if connectionResult.GetErr() != nil {
-			logger.Errorf("Error connecting to PLC: %s", connectionResult.GetErr().Error())
-			return nil, err
-		}
-
-		// If all was ok, get the connection instance
-		connection := connectionResult.GetConnection()
-
-		if !connection.IsConnected() {
-			logger.Errorf("Cannot Connected to %v", *base.EdgeDevice.Spec.Address)
-			return nil, fmt.Errorf("Cannot Connect to %v", *base.EdgeDevice.Spec.Address)
-		}
-
-		ds.conn = &connectionResult
-
-		logger.Infof("Connected to '%v'", *base.EdgeDevice.Spec.Address)
-		mux.HandleFunc("/read", ds.readCommandHandlerPlc4x())
-		mux.HandleFunc("/write", ds.writeCommandHandlerPlc4x())
-
-	}
-	deviceshifubase.BindDefaultHandler(mux)
-
-	ds.base.UpdateEdgeDeviceResourcePhase(v1alpha1.EdgeDevicePending)
-	return ds, nil
-}
-
-func (ds *DeviceShifu) writeCommandHandlerPlc4x() http.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) {
-		timeout := time.Duration(*ds.base.DeviceShifuConfig.Instructions.InstructionSettings.DefaultTimeoutSeconds)
-
-		params, err := utils.ParseHTTPGetParams(r.URL.String())
-		if err != nil {
-			logger.Errorf("Error when parse request url, error: %v", err)
-			http.Error(w, "Error when parse request url, error: "+err.Error(), http.StatusBadRequest)
-			return
-		}
-		request := (*ds.conn).GetConnection().WriteRequestBuilder()
-
-		for key, value := range params {
-			fieldId := fmt.Sprintf("field_%s", key)
-			request = request.AddQuery(fieldId, key, value)
-		}
-
-		plc4xRequest, err := request.Build()
-		if err != nil {
-			logger.Errorf("Error when build request by params, error: %v", err)
-			http.Error(w, "Error when build request with params, error: "+err.Error(), http.StatusBadRequest)
-			return
-		}
-
-		ctx, cancel := context.WithTimeout(context.Background(), time.Second*timeout)
-		defer cancel()
-		resultData := <-plc4xRequest.ExecuteWithContext(ctx)
-
-		if err := resultData.GetErr(); err != nil {
-			logger.Errorf("Got Error on execute request, error: %v", err)
-			http.Error(w, "Got Error on execute request, error: "+err.Error(), http.StatusInternalServerError)
-			return
-		}
-	}
-}
-
-func (ds *DeviceShifu) readCommandHandlerPlc4x() http.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) {
-		logger.Infof("Url: %v", r.RequestURI)
-		timeout := time.Duration(*ds.base.DeviceShifuConfig.Instructions.InstructionSettings.DefaultTimeoutSeconds)
-
-		params, err := utils.ParseHTTPGetParams(r.RequestURI)
-		if err != nil {
-			logger.Errorf("Error when parse request url, error: %v", err)
-			http.Error(w, "Error when parse request url, error: "+err.Error(), http.StatusBadRequest)
-			return
-		}
-		request := (*ds.conn).GetConnection().ReadRequestBuilder()
-
-		logger.Infof("Params: %v", params)
-
-		for key := range params {
-			fieldId := fmt.Sprintf("field_%s", key)
-			request = request.AddQuery(fieldId, key)
-		}
-
-		plc4xRequest, err := request.Build()
-		if err != nil {
-			logger.Errorf("Error when build request by params, error: %v", err)
-			http.Error(w, "Error when build request with params, error: "+err.Error(), http.StatusBadRequest)
-			return
-		}
-
-		ctx, cancel := context.WithTimeout(context.Background(), time.Second*timeout)
-		defer cancel()
-		resultData := <-plc4xRequest.ExecuteWithContext(ctx)
-
-		if err := resultData.GetErr(); err != nil {
-			logger.Errorf("Got Error on execute request, error: %v", err)
-			http.Error(w, "Got Error on execute request, error: "+err.Error(), http.StatusInternalServerError)
-			return
-		}
-
-		resultMap := make(map[string]string, len(params))
-		for _, field := range resultData.GetResponse().GetFieldNames() {
-			value := resultData.GetResponse().GetValue(field).String()
-			resultMap[field] = value
-		}
-
-		result, err := json.Marshal(resultMap)
-		if err != nil {
-			logger.Errorf("Error when marshal result to []byte, error: ", err)
-			http.Error(w, "Error when marshal result to []byte, error:"+err.Error(), http.StatusInternalServerError)
-			return
-		}
-
-		_, err = w.Write(result)
-		if err != nil {
-			logger.Errorf("Error when write data into response, error: %v", err)
-			http.Error(w, "Error when write data into response, error: "+err.Error(), http.StatusInternalServerError)
-		}
-	}
-}
-
-func (ds *DeviceShifu) collectPLC4XTelemetry() (bool, error) {
-	timeout := time.Duration(*ds.base.DeviceShifuConfig.Telemetries.DeviceShifuTelemetrySettings.DeviceShifuTelemetryTimeoutInMilliseconds)
-
-	conn := (*ds.conn).GetConnection()
-	pingResult := conn.Ping()
-
-	select {
-	case <-time.After(timeout * time.Millisecond):
-		return false, fmt.Errorf("timeout ping to device")
-	case result := <-pingResult:
-		if err := result.GetErr(); err != nil {
-			return false, err
-		}
-	}
-
-	return true, nil
-}
-
-// Start start socket telemetry
-func (ds *DeviceShifu) Start(stopCh <-chan struct{}) error {
-	return ds.base.Start(stopCh, ds.collectPLC4XTelemetry)
-}
-
-// Stop stop http server
-func (ds *DeviceShifu) Stop() error {
-	return ds.base.Stop()
-}
diff --git a/pkg/k8s/api/v1alpha1/edgedevice_types.go b/pkg/k8s/api/v1alpha1/edgedevice_types.go
index 603ad6f..bb0ee0b 100644
--- a/pkg/k8s/api/v1alpha1/edgedevice_types.go
+++ b/pkg/k8s/api/v1alpha1/edgedevice_types.go
@@ -55,24 +55,6 @@ type OPCUASetting struct {
 	ConnectionTimeoutInMilliseconds *int64  `json:"ConnectionTimeoutInMilliseconds,omitempty"`
 }
 
-type PLC4XSetting struct {
-	Protocol *Plc4xProtocol `json:"protocol,omitempty"`
-}
-
-type Plc4xProtocol string
-
-const (
-	Plc4xProtocolS7          Plc4xProtocol = "s7"
-	Plc4xProtocolADS         Plc4xProtocol = "ads"
-	Plc4xProtocolBACnet      Plc4xProtocol = "bacnet"
-	Plc4xProtocolCBus        Plc4xProtocol = "cbus"
-	Plc4xProtocolEip         Plc4xProtocol = "eip"
-	Plc4xProtocolKnx         Plc4xProtocol = "knx"
-	Plc4xProtocolModbusAscii Plc4xProtocol = "modbus-ascii"
-	Plc4xProtocolModbusRTU   Plc4xProtocol = "modbus-rtu"
-	Plc4xProtocolModbusTcp   Plc4xProtocol = "modbus-tcp"
-)
-
 // SocketSetting defines Socket specific settings when connecting to an EdgeDevice
 type SocketSetting struct {
 	// +kubebuilder:default="utf-8"
@@ -160,7 +142,6 @@ type ProtocolSettings struct {
 	MQTTSetting   *MQTTSetting   `json:"MQTTSetting,omitempty"`
 	OPCUASetting  *OPCUASetting  `json:"OPCUASetting,omitempty"`
 	SocketSetting *SocketSetting `json:"SocketSetting,omitempty"`
-	PLC4XSetting  *PLC4XSetting  `json:"PLC4XSetting,omitempty"`
 	TCPSetting    *TCPSetting    `json:"TCPSetting,omitempty"`
 	LwM2MSetting  *LwM2MSetting  `json:"LwM2MSetting,omitempty"`
 }
@@ -223,7 +204,6 @@ const (
 	ProtocolLwM2M           Protocol = "LwM2M"
 	ProtocolMQTT            Protocol = "MQTT"
 	ProtocolOPCUA           Protocol = "OPCUA"
-	ProtocolPLC4X           Protocol = "PLC4X"
 	ProtocolSocket          Protocol = "Socket"
 	ProtocolTCP             Protocol = "TCP"
 	ProtocolUSB             Protocol = "USB"
diff --git a/pkg/k8s/api/v1alpha1/zz_generated.deepcopy.go b/pkg/k8s/api/v1alpha1/zz_generated.deepcopy.go
index 9982c7f..e52599f 100644
--- a/pkg/k8s/api/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/k8s/api/v1alpha1/zz_generated.deepcopy.go
@@ -404,26 +404,6 @@ func (in *OPCUASetting) DeepCopy() *OPCUASetting {
 	return out
 }
 
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PLC4XSetting) DeepCopyInto(out *PLC4XSetting) {
-	*out = *in
-	if in.Protocol != nil {
-		in, out := &in.Protocol, &out.Protocol
-		*out = new(Plc4xProtocol)
-		**out = **in
-	}
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PLC4XSetting.
-func (in *PLC4XSetting) DeepCopy() *PLC4XSetting {
-	if in == nil {
-		return nil
-	}
-	out := new(PLC4XSetting)
-	in.DeepCopyInto(out)
-	return out
-}
-
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *ProtocolSettings) DeepCopyInto(out *ProtocolSettings) {
 	*out = *in
@@ -442,11 +422,6 @@ func (in *ProtocolSettings) DeepCopyInto(out *ProtocolSettings) {
 		*out = new(SocketSetting)
 		(*in).DeepCopyInto(*out)
 	}
-	if in.PLC4XSetting != nil {
-		in, out := &in.PLC4XSetting, &out.PLC4XSetting
-		*out = new(PLC4XSetting)
-		(*in).DeepCopyInto(*out)
-	}
 	if in.TCPSetting != nil {
 		in, out := &in.TCPSetting, &out.TCPSetting
 		*out = new(TCPSetting)
diff --git a/pkg/k8s/crd/config/edgedevice/bases/shifu.edgenesis.io_edgedevices.yaml b/pkg/k8s/crd/config/edgedevice/bases/shifu.edgenesis.io_edgedevices.yaml
index e5a6cf2..e34c445 100644
--- a/pkg/k8s/crd/config/edgedevice/bases/shifu.edgenesis.io_edgedevices.yaml
+++ b/pkg/k8s/crd/config/edgedevice/bases/shifu.edgenesis.io_edgedevices.yaml
@@ -184,11 +184,6 @@ spec:
                       Username:
                         type: string
                     type: object
-                  PLC4XSetting:
-                    properties:
-                      protocol:
-                        type: string
-                    type: object
                   SocketSetting:
                     description: SocketSetting defines Socket specific settings when
                       connecting to an EdgeDevice
diff --git a/pkg/k8s/crd/install/config_crd.yaml b/pkg/k8s/crd/install/config_crd.yaml
index 2ddfa79..f242bcd 100644
--- a/pkg/k8s/crd/install/config_crd.yaml
+++ b/pkg/k8s/crd/install/config_crd.yaml
@@ -183,11 +183,6 @@ spec:
                       Username:
                         type: string
                     type: object
-                  PLC4XSetting:
-                    properties:
-                      protocol:
-                        type: string
-                    type: object
                   SocketSetting:
                     description: SocketSetting defines Socket specific settings when
                       connecting to an EdgeDevice
diff --git a/pkg/k8s/crd/install/config_default.yaml b/pkg/k8s/crd/install/config_default.yaml
index 53c1898..6586e19 100644
--- a/pkg/k8s/crd/install/config_default.yaml
+++ b/pkg/k8s/crd/install/config_default.yaml
@@ -190,11 +190,6 @@ spec:
                       Username:
                         type: string
                     type: object
-                  PLC4XSetting:
-                    properties:
-                      protocol:
-                        type: string
-                    type: object
                   SocketSetting:
                     description: SocketSetting defines Socket specific settings when
                       connecting to an EdgeDevice
diff --git a/pkg/k8s/crd/install/shifu_install.yml b/pkg/k8s/crd/install/shifu_install.yml
index bb3b4c1..0896e72 100644
--- a/pkg/k8s/crd/install/shifu_install.yml
+++ b/pkg/k8s/crd/install/shifu_install.yml
@@ -190,11 +190,6 @@ spec:
                       Username:
                         type: string
                     type: object
-                  PLC4XSetting:
-                    properties:
-                      protocol:
-                        type: string
-                    type: object
                   SocketSetting:
                     description: SocketSetting defines Socket specific settings when
                       connecting to an EdgeDevice



Test patch:
diff --git a/pkg/deviceshifu/deviceshifuplc4x/deviceshifuplc4x_test.go b/pkg/deviceshifu/deviceshifuplc4x/deviceshifuplc4x_test.go
deleted file mode 100644
index cbe0c2d..0000000
--- a/pkg/deviceshifu/deviceshifuplc4x/deviceshifuplc4x_test.go
+++ /dev/null
@@ -1,99 +0,0 @@
-package deviceshifuplc4x
-
-import (
-	"os"
-	"path"
-	"testing"
-
-	"github.com/edgenesis/shifu/pkg/deviceshifu/deviceshifubase"
-	"github.com/edgenesis/shifu/pkg/logger"
-	"gopkg.in/yaml.v3"
-
-	"k8s.io/apimachinery/pkg/util/wait"
-)
-
-// Str and default value
-const (
-	MockDeviceCmStr              = "configmap_snippet.yaml"
-	MockDeviceWritFilePermission = 0644
-	MockDeviceConfigPath         = "etc"
-)
-
-var MockDeviceConfigFolder = path.Join("etc", "edgedevice", "config")
-
-type ConfigMapData struct {
-	Data struct {
-		DriverProperties string `yaml:"driverProperties"`
-		Instructions     string `yaml:"instructions"`
-		Telemetries      string `yaml:"telemetries"`
-	} `yaml:"data"`
-}
-
-func TestMain(m *testing.M) {
-	err := GenerateConfigMapFromSnippet(MockDeviceCmStr, MockDeviceConfigFolder)
-	if err != nil {
-		logger.Errorf("error when generateConfigmapFromSnippet,err: %v", err)
-		os.Exit(-1)
-	}
-	m.Run()
-	err = os.RemoveAll(MockDeviceConfigPath)
-	if err != nil {
-		logger.Fatal(err)
-	}
-}
-
-func TestStart(t *testing.T) {
-	deviceShifuMetadata := &deviceshifubase.DeviceShifuMetaData{
-		Name:           "TestStart",
-		ConfigFilePath: "etc/edgedevice/config",
-		KubeConfigPath: deviceshifubase.DeviceKubeconfigDoNotLoadStr,
-	}
-
-	mockds, err := New(deviceShifuMetadata)
-	if err != nil {
-		t.Errorf("Failed creating new deviceshifu")
-	}
-
-	if err := mockds.Start(wait.NeverStop); err != nil {
-		t.Errorf("DeviceShifu.Start failed due to: %v", err.Error())
-	}
-
-	if err := mockds.Stop(); err != nil {
-		t.Errorf("unable to stop mock deviceShifu, error: %+v", err)
-	}
-}
-
-func GenerateConfigMapFromSnippet(fileName string, folder string) error {
-	snippetFile, err := os.ReadFile(fileName)
-	if err != nil {
-		return err
-	}
-
-	var cmData ConfigMapData
-	err = yaml.Unmarshal(snippetFile, &cmData)
-	if err != nil {
-		logger.Fatalf("Error parsing ConfigMap %v, error: %v", fileName, err)
-		return err
-	}
-
-	var MockDeviceConfigMapping = map[string]string{
-		path.Join(MockDeviceConfigFolder, deviceshifubase.ConfigmapDriverPropertiesStr): cmData.Data.DriverProperties,
-		path.Join(MockDeviceConfigFolder, deviceshifubase.ConfigmapInstructionsStr):     cmData.Data.Instructions,
-		path.Join(MockDeviceConfigFolder, deviceshifubase.ConfigmapTelemetriesStr):      cmData.Data.Telemetries,
-	}
-
-	err = os.MkdirAll(MockDeviceConfigFolder, os.ModePerm)
-	if err != nil {
-		logger.Fatalf("Error creating path for: %v", MockDeviceConfigFolder)
-		return err
-	}
-
-	for outputDir, data := range MockDeviceConfigMapping {
-		err = os.WriteFile(outputDir, []byte(data), MockDeviceWritFilePermission)
-		if err != nil {
-			logger.Fatalf("Error creating configFile for: %v", outputDir)
-			return err
-		}
-	}
-	return nil
-}
diff --git a/test/scripts/deviceshifu-demo-aio.sh b/test/scripts/deviceshifu-demo-aio.sh
index 57076e0..9acf049 100644
--- a/test/scripts/deviceshifu-demo-aio.sh
+++ b/test/scripts/deviceshifu-demo-aio.sh
@@ -24,7 +24,6 @@ SHIFU_IMG_LIST=(
     'edgehub/deviceshifu-http-socket'
     'edgehub/deviceshifu-http-mqtt'
     'edgehub/deviceshifu-http-opcua'
-    'edgehub/deviceshifu-http-plc4x'
     'edgehub/shifu-controller'
     'edgehub/mockdevice-thermometer'
     'edgehub/mockdevice-robot-arm'