OLI Box Code, Modularized and defined as a snap for ubuntu core
The following modules have to be implemented:
- Main Routine
- MQTT
- Parity
- SSH / remot3.it
- Environmental settings (with user input)
- Various Device Interfacing
- *OLI_Box_ID (OLI_XX)
- *Project_ID
- *Device_Type
-*MQTT_Broker_IP -*MQTT_Broker Port -*MQTT_Broker_SSL (y/n)
*activeEnergy Supply/Demand *activePower Supply/Demand
*activeEnergy sending Interval (default: 900s) *activePower sending Interval (default: 5s)
*feedInRate (as an example for PV)
-
*rpc_port (default: localhost:8545)
-
bc_key (default eth.account[0]), use private key! (not user input)
-
smart_contract_address1 (not user input)
-
smart_contract_abi1 (not user input)
-
sending_interval (default: 60s)
-
value_to_send (power, energy, input_limit ?)
-
smart_contract_function1 (???) do we need to specify or not?
-
smart_contract_function2 (???) do we need to specify or not?
-
*chain_ID (only for local node)
-
*node_Type (Full/Light ...)
- *Modbus TCP/RTU
- ModbusServerIP
- Register
- ...
- *Bluetooth
- *REST_API -RestAPI Server -...
- *IR_Sensor
- "blinking_rate"
- ...
- *D0 ......
- connect to broker
- send Data to Broker ("Publish")
- recieve Data from Broker ("Subscribe")
- start BC Node
- create public-private-keypair
- send transaction
- listen to events
-modbus connect -modbus readout -modbus write
-bluetooth connect -bluetooth readout -bluetooth write (?)
-restAPI connect -restAPI readout -restAPI write
-IR Sensor Readout
DOSE/OLI_22/PV/activeEnergy/Supply projectID/OLI_ID/deviceType/what data to send?... DOSE/OLI_35/Meter/..... DOSE/dfjalsdkfjldskfjölsdfj DOSE/sfdasdf DOSE/ DOSE/
Install dependencies:
pip install -r requirements.txt
- Add
imports
toinit.py
- Store user input to file
- Write IR-Sensor values to
json
file