Sinope TH1124ZB

@nclark Yes I am :slight_smile:

@putch

  1. the "if (outdoorTemp)" is different of "if (outdoorTemp == 0)" ... The first "if" checks if the "outdoorTemp" is set ... The second checks if the "outdoorTemp" is "0".
  2. that's weird ... did you send your temperature in C ? In the original code of Sinopé, there is a comment that say : "the value sent to the thermostat must be in C" ... When I was trying to make that work, I had a lot of weird temp display lol

How do you manage to send an outside temperature reading ? I can't find it anywhere

Btw I think we are all from Quebec or near of that. Messing with 240V line voltage thermostat seems to be a northern hobby. I live near the sinope factory too :wink:

1 Like

@glabbe0299

In the method refresh_misc() ..

  // Outdoor temperature
  if (!settings.DisableOutdorTemperatureParam)
  {
    float outdoorTemp;

    // Read some outdoor temperature here ...

    if (outdoorTemp)
    {
      cmds += zigbee.writeAttribute(0xFF01, 0x0011, DataType.UINT16, 10800, [:], 1000) // Set the outdoor temperature timeout to 3 hours
      cmds += zigbee.writeAttribute(0xFF01, 0x0010, DataType.INT16, zigbee.convertHexToInt(hex(outdoorTemp * 100)), [mfgCode: "0x119C"], 1000)
    }
  }
  else
    cmds += zigbee.writeAttribute(0xFF01, 0x0011, DataType.UINT16, 30) // Set the outdoor temperature timeout to 30sec 

At first, I as getting (somehow) the temperature from Environment Canada ... I don't want to share publicly this code because it's not .. well .. right ... :shushing_face:
But now, I read the temp from an exterior sensor with a RTL-SDR dongle ...

It's a nice hobby right now :wink: I'm waiting for two more Sinopé TH1123ZB ...

Not sure exactly what you mean by "send it in C" (My hub is set to Celsius, if that's what you mean). Within the refresh_misc, even if I directly set outdoorTemp = 4 (for example) then it does display 4 on the screen but it's missing the "Out". This isn't the end of the world, as the fundamental part of the feature works - it just makes me wonder why I see a different experience. I wonder if I have a different fw on my thermostat?

Sorry guys for being late (December was a rather busy month for me!), but great job @scoulombe on taking-up the lead!

Here's my code:
https://github.com/kris2k2/hubitat/blob/master/drivers/kris2k2-Sinope-TH112XZB.groovy

(It's worth mentioning that I use this Thermostat driver in conjunction with HomeKit via HubConnect+HomeBridge)

3 Likes

@kris2k2 your link is broken

Fixed

1 Like

@kris2k2 Nice! I see you receive the outdoor temp via some notification ... Is it a weather app ? Your approach is better than mine !

@putch Oh ! Sorry ! I thought the temperature was not displaying correctly ... For me the "Out" always show with the code I have ... Is there any way to get the FW version ?
Btw, my code was missing an important capability ... "Thermostat" :flushed: Without that capability, it was not possible to create Thermostat schedule ...

Yep! Using the built-in weather device driver to get the temperature, and then I configured a rule that whenever the temperature changes, to notify all my thermostats.

It was a quick hack until I figure-out how to access weather from another device and reuse the information that’s already there.

@kris2k2, nice implementation of getting the outside temperature, but I do have a question fo rthe rule to set up.

I started a new rule with the trigger ...

"Temperature of DarkSky Weather changed

but as the action, I can't seem to find a variable or attribute about outdoortemp for the thermostat? then looked at the code again, and then saw that you are waiting for a notification being sent to the device, yet for some reason, I can't seem to find the action to do this?

I'm probably just missing something so obvious that it's right in my face.

Thanks for any help!

EDIT: Found the notify action but %value% does not seem to have the info in it???

EDIT 2: ok just saw you're reply under this, will try that and let you know!

Ah right, I forgot this little quirk :slightly_smiling_face:

Here’s how I got it setup using a local variable so I can use the notify function and pass it the local variable.

How I tested it first, is that I’d notify my mobile phone device to see the data, and once I was happy with it, I sent it to the thermostat.

Select Trigger Events (ANY will trigger)

  • Temperarure of System.Weather(1) changed
  • Every 2 hours starting at 00:00

Select Actions for Update thermostat weather as it changes

  • Set outdoorTemp to System.Weather
  • Temperature Notify Thermostat.LivingRoom, Thermostat.Bedroom, Thermostat.Bathroom: '%outdoorTemp%
4 Likes

@kris2k2, I setup the rule and everything seems to work except for a Javascript error on line 358

    int outdoorTemp = Integer.parseInt(text)

Logs show me...

dev:332019-12-27 13:53:02.775 errorjava.lang.NumberFormatException: For input string: "5.5" on line 358 (deviceNotification)

dev:332019-12-27 13:53:02.699 infodeviceNotification() : Setting outdoor weather to 5.5

dev:332019-12-27 13:53:02.693 infodeviceNotification(5.5)

dev:2002019-12-27 13:53:01.477 infoDarkSky.net Weather Driver - INFO: Polling DarkSky.net

The local variable used in the rules is of type string and also tried type decimal, but both give the same error.

Here is my rule...

Thanks for any help!

Integers aren't decimals :slight_smile:

Try this:

int outdoorTemp = Math.round(text)

Admittedly, the temperature handling I integrated was lousy; I should probably re-write it!

Update: I committed a new version on github.

lol, I figured that one out, and was looking into it, I really need to get up to date with programming, haven't done much of it for the last 15 years or so. Will get back to me after a few things like this :slight_smile:

Just installed the new version and all is working as intended with the DarkSky.net Weather Driver

Thanks again!

1 Like

Hi guys, total newbie here but there is a tremendous amount of useful info on here!

I've been following the thread as I am having issues also with displaying the outside temperatures on Sinope TH1124ZB via Hubitat hub.

I pretty much figured out everything but I can't find the "Notify" action to send the updated outside temperature to the thermostats.

What am I missing?

Thanks!

@Hugo

Here are a few screen shots of the "Notify" part of the rule...

Select the action type "Send, speak or log a Message..."

Then select "Send or Speak a Message"

Then enter the variable name in the message to send box " %outdoorTemp% ",
Now select all thermostats you wan't to send to (the option needs to be set to on on the device).
Then click done and the rule should show the "Notify Thermostat of the %outdoorTemp% message"

Come back if you need more help or you can send me a private message if you would rather do this on the phone (I also speak french).

Good luck!

3 Likes

Thank you very much, I had dabbled with the "Send, Speak or Log" action as it seemed to be the most logical fit for a "Notify" action but I could never select the thermostat as a target for the notification.

Re-reading your message and examining everything, especially about the option needing to be set on the device, made me realize that I needed to stick to the variable name the driver is expecting to see (I had named my variable OutsideTemp instead of OutdoorTemp).

I did not expect such a quick reply and a working solution on the first try on top of it all!

I just received my hub yesterday and started to fiddle with it. I am not a programmer but I do work in IT so I opted for flexibility/costumisability over user-friendlyness, and this first experience with the Hubitat community has reassured me in my choice!

Merci encore!

1 Like

@Hugo Happy I could help and also reassure you about your choice! By the way, kris2k2 suggested using the DarkSky Weather service with his implementation, but you could use that same rule and take the temperature from any temp reporting sensor you wan't.

So installing a temp sensor outside (finding a way to protect it if it's not rated for outdoors in our climate) and then triggering the rule by that sensors temp change etc. will also work and give you the real temp outside your home instead of using the DarkSky app and hoping they have the correct info.

I'm planning on trying this with a SmartThings door sensor placed on my patio in a small hobby box with slots in the bottom and making sure the sun never directly hits the box.

1 Like