Skip to content

IOTA Check Balance

Lucas E. Martín edited this page Nov 23, 2020 · 6 revisions

This is a simple script in python that controls the pet feeder balance. When the script detects an update in the balance, it sends a json to the tangle, which is in turn received by the pet feeder.

Edit the file config.json

The config.json file must be opened and modified, this file is in the directory 'iot_pet_feeder/iota_check_balance/' of the repository.

This step is very important if you want to make a connection to the gateway. The keepy_address is where the I2T Keepy Host will be running. The device_id you define here must be between the devices you set on the Gateway configuration file. The channel is the feeder address to get the updated balance.

{
    "keepy_address":"http://YOUR_KEEPY_HOST:3002",
    "device_id":"ESP32-PETFEEDER",
    "channel":"XOWGPCTLGXHHEFQXJIAAXXRKDJBQYEYIFEDTTNJJOVGLFAWYDKCLTKJQBADZPYGMIPHTLMCTN9TM9LZICOIOQMQACW"
}

Run the script IOTA check balance

cd iot_pet_feeder/iota_check_balance
python iota_check_balance.py

Back to the wiki

Clone this wiki locally