Solar energy control methods, systems, and related equipment based on OpenWrt and UBUS communication

By building energy management, device control, policy coordination, and remote communication agents in the OpenWrt system, collaborative management of the solar power supply system and business equipment was achieved, solving the problem of insufficient information interaction in the existing system, improving the system's endurance and reliability, and supporting remote operation and maintenance.

CN121357229BActive Publication Date: 2026-03-13SHENZHEN SCODENO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing solar power systems, there is a lack of effective information exchange channels between various business devices, making it difficult to achieve collaborative management and optimized use of energy status.

Method used

The OpenWrt system is equipped with energy management services, device control services, policy coordination engine, UBUS bus service, and remote communication agent. These services enable the periodic collection of energy status data, policy rule matching, and the issuance of device control commands. The remote communication agent is used to report key status data to the cloud platform.

Benefits of technology

It achieves deep synergy between the solar power system and business equipment, improves the system's endurance and reliability in severe weather, reduces operation and maintenance costs, supports remote monitoring and fault early warning, and has high scalability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121357229B_ABST
    Figure CN121357229B_ABST
Patent Text Reader

Abstract

This invention provides a solar energy control method, system, and related equipment based on OpenWrt and UBUS communication. The method includes building an energy management service, a device control service, a policy coordination engine, a UBUS bus service, and a remote communication agent within the OpenWrt system; periodically acquiring energy status data from the solar controller through the energy management service and publishing it to the UBUS bus service; subscribing to and receiving energy status data through the policy coordination engine, and generating control instructions for one or more service devices according to predefined policy rules, and publishing them to the UBUS bus service; subscribing to and receiving control instructions through the device control service and executing control operations on one or more service devices; and reporting key status data from the UBUS bus service to a cloud platform for remote viewing by users through the remote communication agent. This invention utilizes the modularity of the OpenWrt system to configure service functions and leverages UBUS communication to manage data transmission and reception, achieving coordination between solar power supply and service devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of solar power management technology, and in particular to a solar power control method, system and related equipment based on OpenWrt and UBUS communication. Background Technology

[0002] Currently, outdoor surveillance equipment (such as cameras and environmental sensors) typically uses independent solar power systems. These systems generally include solar panels, batteries, and a solar controller for managing charging and discharging. In traditional solar power solutions, the solar controller only manages basic battery charging and discharging. The energy status information it acquires, such as power and voltage, is isolated from the monitoring cameras, environmental sensors, and other operational devices. There is a lack of effective information exchange between supply and demand, and the various operational devices cannot coordinate based on energy status, thus hindering the full potential of solar power.

[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0004] This invention provides a solar energy control method, system, and related equipment based on OpenWrt and UBUS communication. The main objective of this invention is to solve the technical problems mentioned in the background section of the prior art.

[0005] The first aspect of this invention provides a solar energy control method based on OpenWrt and UBUS communication, comprising:

[0006] Build energy management services, device control services, policy coordination engine, UBUS bus services, and remote communication agents in the OpenWrt system;

[0007] The energy management service periodically obtains energy status data from the solar controller, and publishes the structured energy status data to the UBUS bus service. The energy status data includes solar panel voltage, charging current, battery voltage, battery charge, and controller temperature.

[0008] The strategy collaboration engine subscribes to and receives the energy status data on the UBUS bus service, and generates control instructions for one or more service devices according to predefined policy rules before publishing them to the UBUS bus service.

[0009] The device control service subscribes to and receives control commands on the UBUS bus service, and performs control operations on one or more of the service devices according to the control commands. The service devices include one or more of the following: surveillance cameras, fill lights, environmental sensors, cooling fans, and perimeter alarms.

[0010] The remote communication agent reports key status data from the UBUS bus service to the cloud platform for remote viewing by users.

[0011] In an optional embodiment of the first aspect of the present invention, the step of periodically acquiring energy status data from the solar controller through the energy management service, and publishing the structured energy status data to the UBUS bus service includes:

[0012] The energy status data of the solar controller is periodically read via serial port using the Modbus protocol. The frame format of the energy status data includes a 1-byte address code, a 1-byte function code, N bytes of data, and a 2-byte check code.

[0013] The energy status data is formatted as JSON structured data, which includes an energy field, a voltage field, a temperature field, and a power field.

[0014] The JSON structured data is published as an energy status topic message on the UBUS bus service.

[0015] In an optional embodiment of the first aspect of the present invention, the step of subscribing to and receiving the energy status data on the UBUS bus service through the policy coordination engine, and generating control instructions for one or more service devices according to predefined policy rules and then publishing them to the UBUS bus service includes:

[0016] Subscribe to the energy status topic messages on the UBUS bus service;

[0017] When energy status data is received, the key parameters in the energy status data are matched with predefined policy rules. The predefined policy rules include power threshold instruction matching rules, temperature control instruction matching rules, and load priority instruction matching rules.

[0018] The matched control commands are structured into JSON format and published as a device control topic message on the UBUS bus service.

[0019] In an optional embodiment of the first aspect of the present invention, the power threshold instruction matching rule includes: when the battery power is lower than a first threshold, generating a control instruction to cause one or more service devices to enter a low power mode;

[0020] The temperature control command matching rule includes: when the controller temperature is higher than the second threshold, generating a control command to activate one or more service devices related to heat dissipation;

[0021] The load priority instruction matching rule includes: when the total load power exceeds the limit, control instructions are generated to shut down one or more service devices with lower priority according to port priority.

[0022] In an optional embodiment of the first aspect of the present invention, the step of subscribing to and receiving control instructions on the UBUS bus service through the device control service, and performing control operations on one or more of the service devices according to the control instructions, includes:

[0023] Subscribe to device control topic messages on the UBUS bus service;

[0024] When a control command is received, the control command is parsed to determine the target service device and operation type;

[0025] Control operations are performed via a hardware interface, including adjusting the device's operating mode, starting and stopping the device, and adjusting the device's power.

[0026] The obtained device execution results are structured into JSON and published as an execution feedback topic message on the UBUS bus service for the policy collaboration engine to subscribe to.

[0027] In an optional embodiment of the first aspect of the present invention, the step of reporting key status data on the UBUS bus service to the cloud platform via the remote communication agent for remote viewing by the user includes:

[0028] Subscribe to the energy status topic messages, device control topic messages, and execution feedback topic messages on the UBUS bus service;

[0029] When a topic message data update is received, the topic message update data is encapsulated into a structured message;

[0030] A triple authentication mechanism is established to establish an MQTT connection with the cloud platform, which includes username and password authentication, device token authentication, and SSL / TLS certificate authentication.

[0031] The structured message is sent to the cloud platform through periodic reporting or event-triggered reporting.

[0032] When the MQTT connection is lost, a reconnection with the cloud platform is automatically triggered by a reconnection timer.

[0033] In an optional embodiment of the first aspect of the present invention, the solar energy control method based on OpenWrt and UBUS communication further includes:

[0034] Receive remote instructions from the cloud platform through the remote communication agent;

[0035] The API type in the remote command is identified by the command parser;

[0036] Based on the identified API type, the corresponding system service is invoked, and specific business processing is performed through the corresponding system service;

[0037] The response result of the business processing is obtained and fed back to the cloud platform through the remote communication agent.

[0038] A second aspect of the present invention provides a solar energy control system based on OpenWrt and UBUS communication, the solar energy control system based on OpenWrt and UBUS communication comprising:

[0039] The system service configuration module is used to build energy management services, device control services, policy coordination engine, UBUS bus services, and remote communication agents in the OpenWrt system.

[0040] The data acquisition and publishing module is used to periodically acquire energy status data from the solar controller through the energy management service, and publish the energy status data to the UBUS bus service after structuring the energy status data.

[0041] The control command generation module is used to subscribe to and receive the energy status data on the UBUS bus service through the policy coordination engine, and generate control commands for one or more service devices according to predefined policy rules and then publish them to the UBUS bus service.

[0042] A business device control module is used to subscribe to and receive control commands on the UBUS bus service through the device control service, and to perform control operations on one or more business devices according to the control commands. The business devices include one or more of a surveillance camera, a fill light, an environmental sensor, and a perimeter alarm.

[0043] The remote data reporting module is used to report key status data on the UBUS bus service to the cloud platform through the remote communication agent so that users can view it remotely.

[0044] A third aspect of the present invention provides a solar energy control device based on OpenWrt and UBUS communication, the solar energy control device based on OpenWrt and UBUS communication comprising: a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected via a line;

[0045] The at least one processor invokes the instructions in the memory to cause the solar control device based on OpenWrt and UBUS communication to execute the solar control method based on OpenWrt and UBUS communication as described in any one of the first aspects of the present invention.

[0046] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the solar energy control method based on OpenWrt and UBUS communication as described in any one of the first aspects of the present invention.

[0047] Beneficial Effects: This invention provides a solar energy control method, system, and related equipment based on OpenWrt and UBUS communication. The method includes building an energy management service, a device control service, a policy coordination engine, a UBUS bus service, and a remote communication agent within the OpenWrt system; periodically acquiring energy status data from the solar controller and publishing it to the UBUS bus service through the energy management service; subscribing to and receiving energy status data through the policy coordination engine, and generating control instructions for one or more business devices according to predefined policy rules, and publishing them to the UBUS bus service; subscribing to and receiving control instructions through the device control service and executing control operations on one or more business devices; and reporting key status data from the UBUS bus service to a cloud platform for remote viewing by users through the remote communication agent. This invention utilizes the modularity of the OpenWrt system to configure service functions and leverages UBUS communication to manage data transmission and reception, achieving coordination between solar power supply and business devices. Attached Figure Description

[0048] Figure 1 This is a schematic diagram illustrating an embodiment of the main steps of a solar energy control method based on OpenWrt and UBUS communication according to the present invention;

[0049] Figure 2 This is a schematic diagram of an embodiment of the core architecture of a solar power supply system according to the present invention;

[0050] Figure 3 This is a schematic diagram of an embodiment of a solar energy control system based on OpenWrt and UBUS communication according to the present invention;

[0051] Figure 4 This is a schematic diagram of an embodiment of a solar energy control device based on OpenWrt and UBUS communication according to the present invention. Detailed Implementation

[0052] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0053] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The first aspect of this invention provides a solar energy control method based on OpenWrt and UBUS communication, comprising:

[0054] S100. An energy management service, device control service, policy coordination engine, UBUS bus service, and remote communication agent are constructed within the OpenWrt system. In this invention, the Energy Management Service (EMS) is the core of the system, responsible for obtaining real-time data such as solar panel voltage, charging current, battery voltage, battery level, and controller temperature from the solar controller. The Device Control Service (DCS) manages all business devices connected to the system, receives control commands through the UBUS interface, and executes operations on the devices. The Policy Coordination Engine (PCE) has built-in predefined policy rules (e.g., if SOC < 20%, then the camera is switched to low-power mode), monitors energy and device status messages published on UBUS in real time, and automatically generates control commands based on these policies and publishes them through UBUS. The Cloud Communication Agent (CCA) encapsulates key status information (e.g., battery.voltage, camera.status) from UBUS into MQTT messages and reports them to the cloud platform via a network communication module. Simultaneously, it receives remote control commands from the cloud and forwards them to the UBUS bus.

[0055] See Figure 2At the hardware level, the architecture of the solar power supply system of this invention mainly includes solar panels, a solar controller, a lithium battery pack, an OpenWrt main control board (integrating a UBUS communication bus), various controlled business devices (such as cameras, displays, and sensors), network communication modules (such as 4G modules and Ethernet modules), and a cloud platform. Four core services running as independent processes are deployed on the OpenWrt main control board of this invention: Energy Management Service (EMS): the solarController process, responsible for communicating with the solar controller; Device Control Service (DCS): the deviceManager process, responsible for controlling business devices; Policy Coordination Engine (PCE): the policyEngine process, responsible for decision-making; and Remote Communication Agent (CCA): the cloudAgent process, responsible for communicating with the cloud. These four service processes register with the UBUS bus service daemon of the OpenWrt system at startup and expose their respective service methods, enabling them to call and send / receive messages through the UBUS bus. For example, data such as the current, voltage, and power of the solar panel can be obtained by calling solarControllerSolarPanelInformationGet via `ubus call solarControllerSolarPanelInformationGet`.

[0056] S200. Through the energy management service, energy status data is periodically obtained from the solar controller, and the energy status data is structured and published to the UBUS bus service. The energy status data includes solar panel voltage, charging current, battery voltage, battery charge and controller temperature.

[0057] In this invention, step S200 may specifically include: periodically reading the energy status data of the solar controller via a serial port using the Modbus protocol, wherein the frame format of the energy status data includes a 1-byte address code, a 1-byte function code, N bytes of data, and a 2-byte checksum; formatting the energy status data into JSON structured data, wherein the JSON structured data includes an energy field, a voltage field, a temperature field, and a power field; and publishing the JSON structured data as an energy status topic message on the UBUS bus service.

[0058] For example, in this invention, the Energy Management Service (EMS) process periodically (e.g., every 10 seconds) sends a data read command to the solar controller via the corresponding serial port of the OpenWrt main control board using the Modbus RTU protocol. The solar controller returns a data frame containing real-time energy status data. The Energy Management Service (EMS) parses the data frame and extracts key energy status data, such as: solar panel voltage (solar_voltage: 18.5V), battery charge (battery_soc: 85%), battery voltage (battery_voltage: 12.6V), and controller temperature (controller_temp: 35℃). Subsequently, the Energy Management Service (EMS) formats this data and publishes it to the UBUS bus by calling the UBUS interface. Other service processes that have subscribed to the relevant topic can receive this data immediately. For example, the Energy Management Service (EMS) can publish a notification event named energy.update (i.e., an energy status topic message) with a message body in JSON format: {"soc": 85, "solar_v": 18.5, "battery_v": 12.6}.

[0059] S300: Subscribes to and receives energy status data from the UBUS bus service through the policy coordination engine, and generates control instructions for one or more service devices according to predefined policy rules before publishing them to the UBUS bus service. The predefined policies of the policy coordination engine are stored in corresponding configuration files. For example, PoE power control prevents the load connected to a device from exceeding the device's power limit. Another example is when the total power of the load connected to the device exceeds the predefined policy, the relevant load ports will be shut down according to the current port priority and battery level to maintain normal and stable device operation. Temperature control automatically turns on the fan to cool the device when the temperature is higher than the set predefined temperature, and turns off the fan when the temperature drops to a certain value. The on / off switch and temperature range can be manually controlled.

[0060] In this invention, step S300 may specifically include: subscribing to energy status topic messages on the UBUS bus service; when energy status data is received, matching key parameters in the energy status data with predefined policy rules, the predefined policy rules including power threshold instruction matching rules, temperature control instruction matching rules, and load priority instruction matching rules; the power threshold instruction matching rules include: when the battery power is lower than a first threshold, generating a control instruction to put one or more service devices into a low-power mode; the temperature control instruction matching rules include: when the controller temperature is higher than a second threshold, generating a control instruction to enable one or more service devices related to heat dissipation; the load priority instruction matching rules include: when the total load power exceeds a limit, generating a control instruction to disable one or more service devices with lower priority according to port priority. The matched control instructions are then structured into JSON and published as device control topic messages on the UBUS bus service.

[0061] Specifically, in this invention, the Policy Coordination Engine (PCE) loads a preset cooperative control policy rule file upon startup, which defines a series of rules in the form of "IF-THEN". The PCE process continuously listens for (subscribes to) the energy.update event on the UBUS bus. For example, assuming a policy is: "IF battery_soc < 20% THEN setcamera_mode to low-power", when the PCE listens for an energy status update published by the Energy Management Service (EMS) and finds that the value of battery_soc is 19, the policy is triggered. The PCE then generates a control command for controlling the camera and publishes the corresponding control command through the UBUS bus service. The format of the control command can be a call to the corresponding UBUS method, for example: ubus call deviceManager set_mode {"device": "camera", "mode": "low-power"}.

[0062] S400. Subscribe to and receive the control instructions on the UBUS bus service through the device control service, and perform control operations on one or more of the service devices according to the control instructions. The service devices include one or more of the following: surveillance camera, fill light, environmental sensor, cooling fan and perimeter alarm.

[0063] In this invention, step S400 may specifically include: subscribing to device control topic messages on the UBUS bus service; upon receiving a control command, parsing the control command to determine the target service device and operation type; executing control operations through a hardware interface, the control operations including adjusting the device operating mode, starting and stopping the device, and adjusting the device power; and publishing the obtained device execution results in JSON structure as execution feedback topic messages on the UBUS bus service for the policy collaboration engine to subscribe to.

[0064] Specifically, in this invention, the Device Control Service (DCS) process is responsible for managing and controlling all connected business devices (such as cameras and fill lights). The Device Control Service (DCS) registers several callable methods with the UBUS bus service, such as set_mode and switch_power. When the Policy Coordination Engine (PCE) issues the above control instructions, the Device Control Service (DCS) receives the method call, parses the instruction content, and learns that the device mode named camera needs to be set to low-power. The Device Control Service (DCS) sends specific serial commands or controls the GPIO level to the camera through its own hardware driver layer, so that it enters the preset low-power working mode (such as reducing the frame rate and turning off the infrared night vision function). This completes an intelligent collaborative control operation based on energy status. For example, another policy is "IFbattery_soc>50% AND camera_detects_motion is true THEN switchled_lightto on". This can achieve fine-grained coordination, where the fill light is only turned on when the camera detects a moving object when the energy is sufficient.

[0065] S500: The key status data on the UBUS bus service is reported to the cloud platform via the remote communication agent for remote viewing by the user. In this invention, this step may include: subscribing to energy status topic messages, device control topic messages, and execution feedback topic messages on the UBUS bus service; when topic message data updates are received, the topic message update data is encapsulated into a structured message; establishing an MQTT connection with the cloud platform based on a triple authentication mechanism, the triple authentication mechanism including username and password authentication, device token authentication, and SSL / TLS certificate authentication; sending the structured message to the cloud platform through periodic reporting or event-triggered reporting; when the MQTT connection is disconnected, automatically triggering reconnection with the cloud platform through a reconnection timer.

[0066] Specifically, in this invention, the Remote Communication Agent (CCA) process subscribes to key data such as energy.update (energy status topic message) and device.status.update (device control topic message) on the UBUS bus service. The Remote Communication Agent (CCA) encapsulates the received energy status and device status data according to the MQTT protocol format agreed with the cloud platform. For example, the data is packaged into a JSON data payload and published to a specific topic, such as devices / SN123456 / status. After receiving this message, the cloud platform can display the real-time status of the device to the operation and maintenance personnel on the web interface.

[0067] In an optional embodiment of the present invention, the remote communication broker (CCA) can specifically encapsulate key status information on the UBUS (such as battery.voltage, camera.status) into MQTT messages and report them to the cloud platform via a 4G module / Ethernet module. Simultaneously, it receives remote control commands from the cloud and forwards them to the UBUS bus. The cloud platform address (brokerAddr) is managed through the UCI configuration system, where configuration items include brokerAddr (address) and sslTls (whether to use SSL / TLS). The default address is "127.0.0.1". The address used by the MQTT client connecting in the remote communication broker (CCA) is obtained by loading the UCI configuration file, and the default is "127.0.0.1". It also supports SSL / TLS connections, selecting different SSL encryption methods (no encryption, one-way authentication, two-way authentication, etc.) according to the configuration. MQTT connection authentication uses a username and password, set in the MQTT connection information; the client ID used for Token authentication of the MQTT connection is an MD5 value generated from the device model and MAC address, in the form of "solarBox_ <md5>Certificate authentication provides multiple SSL / TLS authentication methods: certificateless authentication (no verification required), one-way authentication (client verifies server certificate), and two-way authentication (client and server mutually verify certificates). The certificate path is hard-coded in the code, for example, the CA certificate path is " / etc / Self.signed / cacert.pem". The client certificate and private key paths are similar. Regarding data reporting frequency, the remote communication agent MQTT client periodically performs reporting tasks while running, for example, checking for reports (such as device status) every 60 seconds (60000 milliseconds). Additionally, when the configuration changes (such as enabling time configuration), a report is immediately triggered. For MQTT connection retries, when the remote communication agent MQTT client disconnects, a reconnection timer is set, attempting to reconnect after 10 seconds. During service connection retries, if the service connection fails, it enters a service connection failure state and retryes the connection after 20 seconds.

[0068] In an optional embodiment of the first aspect of the present invention, the solar energy control method based on OpenWrt and UBUS communication further includes: receiving remote instructions from the cloud platform through the remote communication proxy; identifying the API type in the remote instructions through an instruction parser; calling the corresponding system service based on the identified API type; performing specific business processing through the corresponding system service; obtaining the response result of the business processing and feeding it back to the cloud platform through the remote communication proxy.

[0069] Specifically, in this invention, after receiving remote instructions from the cloud platform, the remote communication agent parses the API type based on the topic of the instruction message. The instruction parsing topic format is "sys / service / ". <clientid> / <api>"or" sys / service / equipment_management_platform /

[0070] <api>Based on the `api` string in the topic, a predefined list of API names (`REQUEST_API_NAMES`, `REPLY_API_NAMES`, etc.) is used to match the corresponding API type. For example, for issuing commands, if the topic contains "command", it matches the `MSG_SUBTYPE_COMMAND` type. For command type (`COMMAND`) messages, the `serviceApiUbusInvoke` function is called to forward the JSON-formatted command data to other services via UBUS. The Remote Communication Agent (CCA) receives the command issued by the cloud platform to the topic `devices / SN123456 / command`. When the operations and maintenance personnel click the "Reboot Now" button on the cloud platform, the cloud platform will issue a command to this topic, such as `{"action": "reboot"}`. After receiving the MQTT message, the Remote Communication Agent (CCA) parses the message and converts it into a local UBUS call command: `ubuscall system reboot`. This command is received and executed by the system service, thereby realizing remote reboot control of the device.

[0071] In summary, the core steps of the solar energy control method based on OpenWrt and UBUS communication in this invention mainly include the following:

[0072] 1. Data Acquisition: The Energy Management Service (EMS) periodically reads data from the solar controller and publishes the formatted data (such as {"battery_soc": 85, "solar_voltage": 12.5}) ​​to the UBUS bus service.

[0073] 2. Status Publishing and Subscription: The Policy Collaboration Engine (PCE) subscribes to UBUS topic messages related to energy status (such as energy.update). When the Energy Management Service (EMS) publishes new data, the Policy Collaboration Engine (PCE) automatically receives this information.

[0074] 3. Cooperative Control: The Policy Cooperative Engine (PCE) obtains the matching result according to the predefined policy rules, generates control commands (such as {"device": "camera", "action": "set_mode", "mode": "low-power"}), and publishes the commands through the UBUS bus.

[0075] 4. Command Execution: The Device Control Service (DCS) that has subscribed to the control command topic message receives the command and executes the specific operation through the corresponding hardware interface (such as GPIO, serial port) to control the target device to enter the specified state.

[0076] 5. Remote Interaction: The Remote Communication Agent (CCA) continuously reports key status data from the UBUS to the cloud platform for remote viewing by users. Users can also issue commands from the cloud; these commands are received by the Remote Communication Agent (CCA) and converted into UBUS messages, thereby enabling remote control of the system.

[0077] In summary, the main technical points of this invention are as follows: At the method level: a method for applying the UBUS internal communication bus to the monitoring and collaborative control of a solar power supply system, specifically including: realizing energy data publishing, device status subscription, and automatic collaborative control processes based on predefined strategies through UBUS; At the system architecture level: based on the OpenWrt system, a software system architecture is constructed in which multiple independent processes, such as Energy Management Service (EMS), Policy Collaboration Engine (PCE), Device Control Service (DCS), and Remote Communication Agent (CCA), communicate loosely through the UBUS bus; At the collaborative strategy level: the intelligent decision-making logic built into the Policy Collaboration Engine (PCE) based on "IF-THEN" rules, which takes real-time energy data as input and device control commands as output, realizing automated mapping from energy status to device behavior; At the solution integration level: the overall technical solution integrates the OpenWrt system, UBUS bus, intelligent solar controller, and outdoor monitoring equipment into a unified and intelligent solar power supply monitoring and management system.

[0078] This invention's solar energy control method based on OpenWrt and UBUS communication brings the following technical benefits: Intelligence and Collaboration: It achieves deep collaboration between the energy system and business equipment, enabling business equipment to adaptively adjust its operating mode according to energy status, greatly improving the system's endurance and reliability in severe weather and preventing unexplained equipment downtime; Efficient Operation and Maintenance: Through the UBUS bus and remote communication agent, all critical data is centrally reported to the cloud platform, allowing maintenance personnel to remotely and in real-time monitor the overall system's operational health, achieving precise operation and maintenance and fault early warning, significantly reducing on-site maintenance costs and frequency; High Scalability and Flexibility: Based on the modular design of OpenWrt and UBUS, adding new business equipment only requires developing the corresponding driver and registering it on UBUS, without modifying the core system framework, enabling rapid response to diverse customer needs.

[0079] See Figure 3 The second aspect of the present invention provides a solar energy control system based on OpenWrt and UBUS communication, the solar energy control system based on OpenWrt and UBUS communication comprising:

[0080] System service configuration module 10 is used to build energy management services, device control services, policy coordination engine, UBUS bus services and remote communication agent in the OpenWrt system;

[0081] The data acquisition and publishing module 20 is used to periodically acquire energy status data from the solar controller through the energy management service, and publish the energy status data to the UBUS bus service after structuring the energy status data.

[0082] The control instruction generation module 30 is used to subscribe to and receive the energy status data on the UBUS bus service through the policy coordination engine, and generate control instructions for one or more service devices according to predefined policy rules and then publish them to the UBUS bus service.

[0083] The business device control module 40 is used to subscribe to and receive the control instructions on the UBUS bus service through the device control service, and to perform control operations on one or more of the business devices according to the control instructions. The business devices include one or more of the following: a surveillance camera, a fill light, an environmental sensor, and a perimeter alarm.

[0084] The remote data reporting module 50 is used to report key status data on the UBUS bus service to the cloud platform through the remote communication agent so that users can view it remotely.

[0085] In an optional embodiment of the second aspect of the present invention, the data acquisition and publishing module includes:

[0086] The data reading unit is used to periodically read the energy status data of the solar controller via the serial port using the Modbus protocol. The frame format of the energy status data includes a 1-byte address code, a 1-byte function code, N bytes of data, and a 2-byte check code.

[0087] The data structuring unit is used to format the energy status data into JSON structured data, which includes an energy field, a voltage field, a temperature field, and a power field.

[0088] The data publishing unit is used to publish the JSON structured data as an energy status topic message on the UBUS bus service.

[0089] In an optional embodiment of the second aspect of the present invention, the control command generation module includes:

[0090] An energy status message subscription unit is used to subscribe to energy status topic messages on the UBUS bus service;

[0091] The control command matching unit is used to match key parameters in the energy status data with predefined strategy rules when energy status data is received. The predefined strategy rules include power threshold command matching rules, temperature control command matching rules, and load priority command matching rules.

[0092] The control command publishing unit is used to publish the matched control commands in JSON format as a device control topic message on the UBUS bus service.

[0093] In an optional embodiment of the second aspect of the present invention, the power threshold instruction matching rule includes: when the battery power is lower than a first threshold, generating a control instruction to cause one or more service devices to enter a low power mode;

[0094] The temperature control command matching rule includes: when the controller temperature is higher than the second threshold, generating a control command to activate one or more service devices related to heat dissipation;

[0095] The load priority instruction matching rule includes: when the total load power exceeds the limit, control instructions are generated to shut down one or more service devices with lower priority according to port priority.

[0096] In an optional embodiment of the second aspect of the present invention, the service equipment control module includes:

[0097] A control message subscription unit is used to subscribe to device control topic messages on the UBUS bus service;

[0098] The instruction parsing unit is used to parse the control instruction received to determine the target service device and operation type.

[0099] The equipment control unit is used to perform control operations through a hardware interface, including adjusting the equipment operating mode, starting and stopping the equipment, and adjusting the equipment power.

[0100] The execution feedback unit is used to publish the obtained device execution results in JSON structure as an execution feedback topic message on the UBUS bus service for the policy collaboration engine to subscribe to.

[0101] In an optional embodiment of the second aspect of the present invention, the remote data reporting module includes:

[0102] The key message subscription unit is used to subscribe to energy status topic messages, device control topic messages, and execution feedback topic messages on the UBUS bus service.

[0103] The message encapsulation unit is used to encapsulate the updated topic message data into a structured message when a topic message data update is received.

[0104] The remote connection unit is used to establish an MQTT connection with the cloud platform based on a triple authentication mechanism, which includes username and password authentication, device token authentication, and SSL / TLS certificate authentication.

[0105] The message reporting unit is used to send the structured message to the cloud platform through periodic reporting or event-triggered reporting.

[0106] The interruption and reconnection unit is used to automatically trigger a reconnection with the cloud platform via a reconnection timer when the MQTT connection is disconnected.

[0107] In an optional embodiment of the second aspect of the present invention, the solar energy control system based on OpenWrt and UBUS communication further includes:

[0108] A remote instruction receiving module is used to receive remote instructions from the cloud platform through the remote communication agent;

[0109] A remote instruction parsing module is used to identify the API type in the remote instruction through an instruction parser;

[0110] The system service invocation module is used to invoke the corresponding system service based on the identified API type, and to perform specific business processing through the corresponding system service;

[0111] The system response feedback module is used to obtain the response result of the business processing and feed it back to the cloud platform through the remote communication agent.

[0112] Figure 4 This is a schematic diagram of a solar energy control device based on OpenWrt and UBUS communication, provided by an embodiment of the present invention. This solar energy control device based on OpenWrt and UBUS communication can vary significantly due to different configurations or performance characteristics. It may include one or more processors 60 (central processing units, CPUs) (e.g., one or more processors) and memory 70, and one or more storage media 80 (e.g., one or more mass storage devices) for storing applications or data. The memory and storage media can be temporary or persistent storage. The program stored in the storage media may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the solar energy control device based on OpenWrt and UBUS communication. Furthermore, the processor may be configured to communicate with the storage media to execute the series of instruction operations in the storage media on the solar energy control device based on OpenWrt and UBUS communication.

[0113] The solar control device based on OpenWrt and UBUS communication of this invention may further include one or more power supplies 90, one or more wired or wireless network interfaces 100, one or more input / output interfaces 110, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 4 The illustrated structure of a solar control device based on OpenWrt and UBUS communication does not constitute a limitation on solar control devices based on OpenWrt and UBUS communication. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0114] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the solar energy control method based on OpenWrt and UBUS communication.

[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system or system / unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0116] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0117] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.< / api> < / api> < / clientid>

Claims

1. A solar control method based on OpenWrt and UBUS communication, characterized in that, The method comprises the following steps: building an energy management service, a device control service, a policy coordination engine, a UBUS bus service and a remote communication agent in an OpenWrt system; acquiring energy state data from a solar controller periodically through the energy management service, and publishing the structured energy state data to the UBUS bus service, wherein the energy state data includes solar panel voltage, charging current, battery voltage, battery capacity and controller temperature; subscribing to and receiving the energy state data on the UBUS bus service through the policy coordination engine, and generating control instructions for one or more business devices according to predefined policy rules and publishing the control instructions to the UBUS bus service; subscribing to and receiving the control instructions on the UBUS bus service through the device control service, and performing control operations on one or more business devices according to the control instructions, wherein the business devices include one or more of a monitoring camera, a light supplement lamp, an environmental sensor, a cooling fan and a perimeter alarm; reporting key state data on the UBUS bus service to a cloud platform for remote viewing by a user through the remote communication agent, wherein the key state data includes energy state topic messages, device control topic messages and execution feedback topic messages.

2. The OpenWrt and UBUS communication based solar control method according to claim 1, characterized in that, The method of acquiring energy state data from a solar controller periodically through the energy management service comprises the following steps: periodically reading the energy state data of the solar controller through a serial port in a Modbus protocol, wherein the frame format of the energy state data includes 1 byte address code, 1 byte function code, N byte data and 2 byte check code; formatting the energy state data into JSON structured data, wherein the JSON structured data includes a capacity field, a voltage field, a temperature field and a power field; publishing the JSON structured data as energy state topic messages on the UBUS bus service. 3.The OpenWrt and UBUS communication-based solar control method according to claim 1, characterized in that, The method of subscribing to and receiving the energy state data on the UBUS bus service through the policy coordination engine, and generating control instructions for one or more business devices according to predefined policy rules and publishing the control instructions to the UBUS bus service comprises the following steps: subscribing to energy state topic messages on the UBUS bus service; when receiving the energy state data, matching key parameters in the energy state data with predefined policy rules, wherein the predefined policy rules include capacity threshold instruction matching rules, temperature control instruction matching rules and load priority instruction matching rules; publishing the matched control instructions in JSON format as device control topic messages on the UBUS bus service.

4. The OpenWrt and UBUS communication based solar control method according to claim 3, characterized in that, The capacity threshold instruction matching rules include: when the battery capacity is lower than a first threshold, generating control instructions for one or more business devices to enter a low-power mode; The temperature control instruction matching rules include: when the controller temperature is higher than a second threshold, generating control instructions for one or more business devices related to heat dissipation to be turned on. The load priority instruction matching rule comprises: when the total load power exceeds a limit value, generating a control instruction to close one or more service devices with low priority according to port priority. 5.The OpenWrt and UBUS communication-based solar control method according to claim 1, wherein, The control instruction on the UBUS bus service is subscribed and received through the device control service, and the control operation on one or more service devices is performed according to the control instruction, which comprises: Subscribing to the device control topic message on the UBUS bus service; When receiving the control instruction, the control instruction is parsed to determine the target service device and the operation type; Performing control operations through hardware interfaces, the control operations including adjusting device operation mode, starting and stopping devices, and adjusting device power; The obtained device execution result is structured and published as an execution feedback topic message on the UBUS bus service for the policy coordination engine to subscribe. 6.The OpenWrt and UBUS communication-based solar control method according to claim 5, characterized in that, The key state data on the UBUS bus service is reported to the cloud platform through the remote communication agent for remote viewing by users, which comprises: Subscribing to the energy state topic message, device control topic message and execution feedback topic message on the UBUS bus service; When receiving the topic message data update, the topic message update data is encapsulated as a structured message; Based on a three-factor authentication mechanism, an MQTT connection with the cloud platform is established, the three-factor authentication mechanism including username and password authentication, device Token authentication and SSL / TLS certificate authentication; The structured message is sent to the cloud platform through periodic reporting or event-triggered reporting; When the MQTT connection is disconnected, the cloud platform is automatically reconnected through a reconnection timer. 7.The OpenWrt and UBUS communication based solar control method according to claim 1, wherein, Further comprising: Receiving remote instructions from the cloud platform through the remote communication agent; Identifying the API type in the remote instruction through an instruction parser; Based on the identified API type, the corresponding system service is called to perform specific business processing through the corresponding system service; The response result of the business processing is obtained and fed back to the cloud platform through the remote communication agent.

8. A solar control system based on OpenWrt and UBUS communication, characterized in that, The solar energy control system based on OpenWrt and UBUS communication comprises: A system service configuration module for constructing an energy management service, a device control service, a policy coordination engine, a UBUS bus service and a remote communication agent in an OpenWrt system; A data acquisition and publishing module for periodically acquiring energy state data from a solar energy controller through the energy management service, and structuring and publishing the energy state data to the UBUS bus service; A control instruction generation module for subscribing and receiving the energy state data on the UBUS bus service through the policy coordination engine, and generating a control instruction for one or more service devices according to a pre-defined policy rule and publishing the control instruction to the UBUS bus service; a service device control module, configured to subscribe to and receive the control instruction on the UBUS bus service through the device control service, and perform a control operation on one or more of the service devices according to the control instruction, the service devices including one or more of a monitoring camera, a light compensation lamp, an environmental sensor, and a perimeter alarm; a data remote reporting module, configured to report key state data on the UBUS bus service to a cloud platform for remote viewing by a user through the remote communication agent, the key state data including an energy state topic message, a device control topic message, and an execution feedback topic message.

9. A solar control device based on OpenWrt and UBUS communication, characterized in that, The OpenWrt and UBUS communication-based solar control device includes a memory and at least one processor, the memory having instructions stored therein, and the memory and the at least one processor being interconnected by a line; The at least one processor invokes the instructions in the memory, so that the OpenWrt and UBUS communication-based solar control device performs the OpenWrt and UBUS communication-based solar control method according to any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program, when executed by a processor, implements the OpenWrt and UBUS communication-based solar control method according to any one of claims 1-7.

Citation Information

Patent Citations

  • A bus control system based on COV data processing

    CN109783247A

  • Optical storage and charging integrated system based on distributed soft bus

    CN120675040A