# Posting data using dweepy
import dweepy
dweet_dict = {}
dweet_dict.update({"Volt": '1000'})
dweepy.dweet_for('3083-MPPT-Xbee1-test', dweet_dict)
https://dweet.io/get/latest/dweet/for/<My_Dweet_address>
# Getting a dweet using Dweepy
import dweepy
# Get dweet data
url = dweepy.get_latest_dweet_for('3083-MPPT-Xbee1-test')
# Print dweet data set
print(url)
# Extract date time from dweet
dict = url[0]
longdate = dict['created']
print(longdate)
# Extract specific data sets from Dweet
voltage = dict['content'][('Volt')]
print(f'The voltage is {voltage}')
import dweepy
#https://github.com/paddycarey/dweepy - Reference
# Publish data via a Dweet
dweet_dict = {}
dweet_dict.update({"Volt": '1000'})
dweepy.dweet_for('3083-MPPT-Xbee1-test', dweet_dict)
# Get data from Dweet
url = dweepy.get_latest_dweet_for('3083-MPPT-Xbee1-test')
print(url)
dict = url[0]
longdate = dict['created']
print(longdate)
voltage = dict['content'][('Volt')]
print(f'The voltage is {voltage}')
#check dweet with - https://dweet.io/get/latest/dweet/for/<My_Dweet_address>
dweet_dict = {}
dweet_dict.update({"Volt": '1000'})
dweet_dict.update({"Current": '3.0'})
dweet_dict.update({"Wattage": '75.0'})
dweet_dict.update({"Temperature": '25.3'})
import dweepy
#https://github.com/paddycarey/dweepy - Reference
dweet_dict = {}
dweet_dict.update({"Volt": '1000'})
dweet_dict.update({"Current": '3.0'})
dweet_dict.update({"Wattage": '75.0'})
dweet_dict.update({"Temperature": '25.3'})
dweepy.dweet_for('3083-MPPT-Xbee1-test', dweet_dict)
url = dweepy.get_latest_dweet_for('3083-MPPT-Xbee1-test')
print(url)
dict = url[0]
longdate = dict['created']
print(longdate)
voltage = dict['content'][('Volt')]
print(f'The voltage is {voltage}')
current = dict['content'][('Current')]
print(f'The current is {current}')
# check dweet with - https://dweet.io/get/latest/dweet/for/<My_Dweet_address>