Skip to content

Latest commit

 

History

History
57 lines (51 loc) · 1.82 KB

Plugin.md

File metadata and controls

57 lines (51 loc) · 1.82 KB

Plugins

FanCtrl supports external programs through the socket communication plugin.

How to use it

11

  • If you check Plugin in the option, Plugin button is created on the main screen

    3
  • ① Set up a server to support Plugins
  • ② The connected client is displayed
  • ③ Create a Temperature sensor (The same key cannot be used)
  • ④ Create a Fan speed (The same key cannot be used)
  • ⑤ Create a Fan control (The same key cannot be used)

    4
  • Once set, the Plugin sensor appears on the main screen.

Structure

3333

  • Send the temperature sensor and rpm data read by your program to FanCtrl.
  • FanCtrl sends pwm data to your program.

Packet

  • The packet is simple. start with STX(0xFA) at the beginning, followed by data size, and data.
  • The data is a json string.

    4444

Json

  • The json string to send to FanCtrl can be sent as follows.
  • type : 0 (temperature), 1 (fan speed)
{
   "list" : [
     {
       "key" : "1",
       "type" : 0,
       "value" : 50
     },
     {
       "key" : "2",
       "type" : 1,
       "value" : 2000
     }
   ]
}
  • The json string FanCtrl sends to your program is
  • type : 2 (fan control)
{
   "key" : "3",
   "type" : 2,
   "value" : 50
}

Example