This c-lightning plugin was initially generated by GPT-4 and has since been refined. It sends data from your c-lightning node to your OpenHAB instance using the OpenHAB API. The plugin gathers various information from your c-lightning node and updates the corresponding OpenHAB items.
- Retrieves the following data from your c-lightning node:
- Node ID, alias, blockheight, network, and c-lightning version
- Active channels, pending channels, and inactive channels
- Incoming and outgoing transaction counts and amounts
- Top 5 and bottom 5 performing peers based on earnings and forwarding events
- Automatically creates the corresponding OpenHAB items if they don't already exist
- Updates the OpenHAB items with the latest data from your c-lightning node
- Python 3.6 or higher
- c-lightning 0.12.0 or higher
- OpenHAB 3.x with a configured API key. If you need help configuring the OpenHAB API key, please follow the steps below.
-
Clone this repository to your c-lightning plugins directory.
-
Install the required Python packages:
pip install -r requirements.txt
-
Configure the OpenHAB URL and API key in the
config.json
file. -
Enable the plugin by adding the following line to your c-lightning configuration file:
plugin=/path/to/your/clightning/plugins/directory/clightning-openhab-plugin/openhab.py
- Restart your c-lightning node.