Project 6 , python code

Your network is working fine. Run the below command to update the dependencies,

sudo apt-get update //first this
sudo apt install python3-pip //then this
sudo pip3 install boltiot //then this

One by one.

I am already run the given commands sir.what next sir.

@viswam2018rkv

Now run your python script. Let me know if you still face the same issue.

There is no difference sir.
Same problem.

@viswam2018rkv

I am inviting @rahul.singh1 to look into your query.

Please solve this problem ASAP.

Hi @viswam2018rkv,

open the python terminal by typing the below command.

python3

Then import the requests in the python terminal and send the get request. (Change the api_key and device_id with your details)

import requests
response = requests.get('https://cloud.boltiot.com/remote/api_key/isOnline?&deviceName=device_id')
print (response.text)

Check if the above command is working. Also, share the screenshot of the output.

It is working sir thank you,but the next project code how to execute in terminal sir. There is any further code to run the project code sir ?

Hi @viswam2018rkv,

You can write the above code in a python file and will be able to run using python3. boltiot library internally uses the request library to send the request and it is just a wrapper on top of the requests library. You can check the code of boltiot library here https://github.com/Inventrom/bolt-api-python/tree/master/boltiot

To exist from python3 terminal type exit() command.

Now run your code again using the boltiot library and check if is working.

Also, type the below command and send me the screenshot of the output.

ls

Thank you sir.
It is working,but coming to next project which code can i write in python file sir.

@rahul.singh1

Sir,
project 7 having same error when i am executing python file in terminal .

You can try reinstalling the boltiot module.

Run pip install --force-reinstall --no-cache-dir boltiot, and let me know once it installs the package.

@viswam2018rkv

Now can you try running your project code? And check if it throws the same error?

same error sir .There is no difference.

@rahul.singh1

please solve this problem sir.Still i am can’t get the correct output in project-7.

@viswam2018rkv

Sorry for the delay. I have taken forward your request. We’ll find a solution for you.

Meanwhile, you can use python even on Windows. You can use any IDE, or Powershell for that. Refer to this thread - Could not find a version that satisfies the reqirement boltiot. no matching distribution found for boltiot

Other than that, you can use an online IDE, https://replit.com/

which virtual server are you using