import requests
import json
import sys
import os
import glob
import MySQLdb

db = MySQLdb.connect("localhost","root","root","Thermostat")
cursor = db.cursor()

query = ("SELECT * FROM setpoint WHERE 1")

cursor.execute(query)

data = cursor.fetchone()

wished_temp = data[0]
parenthesis = ")"

url = "http://localhost:8083/JS/Run/zway.devices[20].instances[0].ThermostatSetPoint.Set(1,"+str(wished_temp)+str(parenthesis)

thermostat_setpoint = requests.get(url,auth=('admin','raspberry'),stream=True)

db.close

4a8e04b6cf5590109b6c9bbf7e697f575cc35288
<mask token>

<mask token>
cursor.execute(query)
<mask token>
db.close

<mask token>
db = MySQLdb.connect('localhost', 'root', 'root', 'Thermostat')
cursor = db.cursor()
query = 'SELECT * FROM setpoint WHERE 1'
cursor.execute(query)
data = cursor.fetchone()
wished_temp = data[0]
parenthesis = ')'
url = (
    'http://localhost:8083/JS/Run/zway.devices[20].instances[0].ThermostatSetPoint.Set(1,'
     + str(wished_temp) + str(parenthesis))
thermostat_setpoint = requests.get(url, auth=('admin', 'raspberry'), stream
    =True)
db.close

import requests
import json
import sys
import os
import glob
import MySQLdb
db = MySQLdb.connect('localhost', 'root', 'root', 'Thermostat')
cursor = db.cursor()
query = 'SELECT * FROM setpoint WHERE 1'
cursor.execute(query)
data = cursor.fetchone()
wished_temp = data[0]
parenthesis = ')'
url = (
    'http://localhost:8083/JS/Run/zway.devices[20].instances[0].ThermostatSetPoint.Set(1,'
     + str(wished_temp) + str(parenthesis))
thermostat_setpoint = requests.get(url, auth=('admin', 'raspberry'), stream
    =True)
db.close

import requests
import json
import sys
import os
import glob
import MySQLdb

db = MySQLdb.connect("localhost","root","root","Thermostat")
cursor = db.cursor()

query = ("SELECT * FROM setpoint WHERE 1")

cursor.execute(query)

data = cursor.fetchone()

wished_temp = data[0]
parenthesis = ")"

url = "http://localhost:8083/JS/Run/zway.devices[20].instances[0].ThermostatSetPoint.Set(1,"+str(wished_temp)+str(parenthesis)

thermostat_setpoint = requests.get(url,auth=('admin','raspberry'),stream=True)

db.close
