Go Down

Topic: getting connection refused error while trying to get key from bridgeclient (Read 297 times) previous topic - next topic


I am using the below code:

Code: [Select]

import sys
sys.path.insert(0, '/usr/lib/python2.7/bridge/')
from bridgeclient import BridgeClient as bridgeclient

from bottle import run, route, get, post, request

bc = bridgeclient()

def status():
hum =  bc.get("HUMkey")
temp =  bc.get("TEMPkey")
print "Humidity: %s " % hum
print "Temperature: %s " % temp
return "Humidity= "+hum+"<br>Temperature="+temp
except Exception as err:

return "Something is wrong...<br> %s" % str(err)

def main():

run(host='', port=8080, debug=True)

if __name__ == '__main__':

and when I open in the browser the following path 
Code: [Select]
 I am seeing [/color]
Something is wrong... [Errno 146] Connection refused
so what might be refusing the connection ? I am running the above code in arduin Yun shield terminal with root privileges.

attached sketch of dht sensor that reads temperature and humidity 

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131