Help python Raspberry

AttributeError: module ‘tago’ has no attribute ‘Device’

Hi @mateusleandro,
Could you inform me which documentation did you follow?

Hello Alinetusi

I’m doing the first steps with a basic tutorial for sending temperature.

$ sudo pip3 install -U tago

import tago
MY_DEVICE_TOKEN = ‘add your device token here’
my_device = tago.Device(MY_DEVICE_TOKEN)
MY_DEVICE_TOKEN = ‘### INSERT YOUR TOKEN HERE ###’ my_device = Tago(MY_DEVICE_TOKEN).device GPIO.setmode(GPIO.BOARD) GPIO.setup(PIN_NUMBER,GPIO.OUT,initial=0)

def func_callback_data(data):
Logic_Port = data[‘value’] GPIO.output(PIN_NUMBER,Logic_Port) print(data[‘value’])



Hi @mateusleandro,

Thanks for answering me!

The documentation that you were following was overdated, I already informed our engineers to review the documentation.
I recommend following the Python documentation.
Python | Device | .insert

If you want to collect the data events from TagoIO, I must inform you that the best way to do it is by using MQTT.
Please, take a look at this documentation:

Hi @mateusleandro,
Good news for you!
We just published the updated Raspberry documentation.
I’m attaching the link below:
Raspberry Pi & TagoIO - getting started