Hi,
I am new on this community and I am not a Smartthings user. Instead of I am using Jeedom. But I need you help because I want to use a Zigbee thermostat from Sinope and it’s supported by Smartthings.
This thermostat is already connected to my installation: I can control temperature and read temperature of the room.
But one of the features of this thermostat is to be able to display outdoor temperature.
I found the driver on this community and it’s available here:
https://www.sinopetech.com/wp-content/uploads/2019/03/Sinope-Technologies-TH1300ZB-V.1.0.5-SVN-503-2.txt
There is this code to send the outdoor temperature to the thermostat:
if (weather) {
double tempValue
int outdoorTemp = weather.toInteger()
if(state?.scale == 'F')
{//the value sent to the thermostat must be in C
//the thermostat make the conversion to F
outdoorTemp = fahrenheitToCelsius(outdoorTemp).toDouble().round()
}
String outdoorTempString
def isChange = isStateChange(device, name, outdoorTempString)
def isDisplayed = isChange
sendEvent( name: "outdoorTemp", value: outdoorTempString, unit: state?.scale, displayed: isDisplayed)
int outdoorTempValue
int outdoorTempToSend
if(settings.EnableOutdorTemperatureParam)
{
cmds += zigbee.writeAttribute(0xFF01, 0x0011, 0x21, 10800)//set the outdoor temperature timeout to 3 hours
if (outdoorTemp < 0) {
outdoorTempValue = -outdoorTemp*100 - 65536
outdoorTempValue = -outdoorTempValue
outdoorTempToSend = zigbee.convertHexToInt(swapEndianHex(hex(outdoorTempValue)))
cmds += zigbee.writeAttribute(0xFF01, 0x0010, 0x29, outdoorTempToSend, [mfgCode: 0x119C])
} else {
outdoorTempValue = outdoorTemp*100
int tempa = outdoorTempValue.intdiv(256)
int tempb = (outdoorTempValue % 256) * 256
outdoorTempToSend = tempa + tempb
cmds += zigbee.writeAttribute(0xFF01, 0x0010, 0x29, outdoorTempToSend, [mfgCode: 0x119C])
}
}
}
I tried this line:
cmds += zigbee.writeAttribute(0xFF01, 0x0010, 0x29, outdoorTempToSend, [mfgCode: 0x119C])
with 0 value for “outdoorTempToSend” but it doesn’t work. When I read back the attribut I always see -32768
Probably outdoorTempToSend is not defined with the good type and thermostat doesn’t accept the new value.
Can you tell me what’s the type of this variable?
Thanks for your help