HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: michmill on August 15, 2015, 03:04:11 PM

Title: Troubleshooting Z-Wave thermostat
Post by: michmill on August 15, 2015, 03:04:11 PM
I have a 2Gig CT30e z-wave thermostat (it's in the Pepper DB) that I've been using for a few years with HomeSeer.  I recently converted to HomeGenie on Ubuntu, and I'm having trouble polling the thermostat and setting SetPoints now. It worked fine with HomeSeer. I deleted and re-added the thermostat to the primary controller. The thermostat command "Off" seems to be the most reliable, but it responds only about 60% of the time.  SetPoints have never worked since moving to HG.

Is there a z-wave log file to help me troubleshoot the communication issues?  Is anyone using HomeGenie with the CT30e thermostat?

Cheers,
Mike

Title: Re: Troubleshooting Z-Wave thermostat
Post by: bradvoy on August 22, 2015, 03:30:08 PM
I ran into a similar problem with my Radio Thermostat CT101 thermostats.  HomeGenie used to control them just fine, but a few months ago HomeGenie stopped being able to change the setpoints.  See the thread I started at http://www.homegenie.it/forum/index.php?topic=951.0. (http://www.homegenie.it/forum/index.php?topic=951.0.)  A couple of people tried to help me with this problem, but we didn't make any progress. 
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on September 22, 2015, 02:59:54 AM
I think I may have found the problem.  The thermostat is reporting it's temp back to HomeGenie in Celsius, but HomeGenie is sending the setpoint to the thermostat is Fahrenheit.  I'd like to try sending the setpoint in Celsius.

Does anyone know which module I should look at to find where it's sending the setpoint so I can do the conversion to C before it's sent?

Thanks in advance for the help!

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on September 22, 2015, 04:05:02 AM
The widget sending Fahrenheit instead of Celsius to the thermostat is definitely the issue.  I changed the widget to display Celsius.  I changed the setpoint using the widget, and it sent Celsius to the thermostat, which it happily accepted.

So, is there an central place in the HG code I can modify that will always do the F->C conversion?

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on September 24, 2015, 04:56:31 PM
I'll be following this thread with interest as I have two thermostats.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on September 25, 2015, 06:32:07 AM
I've modified the generic thermostat widget and the Timetable program to handle the CT30 thermostat.  Both programs need a little more testing.

I'm now modifying the Z-Wave thermostat polling program to retrieve the current setpoint.

Let me know if you want me to post work in progress.

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: bradvoy on September 27, 2015, 06:25:58 PM
I would be happy to test what you have so far with my CT-101 thermostats.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on September 27, 2015, 10:25:09 PM
Quote
Let me know if you want me to post work in progress.

Yes please.

Thanks, Garry
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on September 28, 2015, 03:10:24 AM
I've uploaded my changes to the Z-Wave thermostat poll program, Timetable program, and the generic thermostat widget to a different thread here (http://www.homegenie.it/forum/index.php?topic=1104.msg6688#msg6688).

It works great on my setup.  I hope this helps other people, too.

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on September 29, 2015, 01:45:49 PM
I've tried your altered code but it's not worked for my setup. I'm using Secure SRT321 thermostats, any further suggestions?
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on October 04, 2015, 01:32:18 AM
Can you provide more information on what's not working?  Also, can you attach a screenshot of the HG log communicating with your thermostat?

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: bradvoy on October 07, 2015, 02:42:40 PM
I tried your updated components with my CT-101 thermostats, and they're mostly working!  It's great to be able to control my thermostats again with HomeGenie.  The only problem I'm seeing is that the thermostat widget is sometimes displaying the setpoints incorrectly.  It always shows the correct temperature.  But the setpoints are sometimes showing "169.0" or "172.0".  Other times they are displayed correctly.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on October 13, 2015, 04:26:37 AM
I've noticed the setpoints will display incorrectly as soon as another process sends a new setpoint to the thermostat.  This corrects itself after the next poll.  What's happening is HomeGenie is sending the new setpoint to the termostat in Fahrenheit, but the thermostat widget is also getting the notification.  Since my updated widget is expecting the setpoint to come back in Celsius, it converts the setpoint, which is already in Fahrenheit, to Fahrenheit again.

The formula to convert C to F is ( t * 1.8 ) + 32.  If you have the time when you see the incorrect setpoint again, try taking the bad reading through this formula ( t - 32 ) / 1.8 and let me know if the result is what the setpoint should be.

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on October 14, 2015, 02:59:09 PM
Hi Mike,

Apologies for not getting back to you sooner, been a little busy at work so haven't had time to play with interesting stuff.

I'll take a look later on and update you. Appreciate your help and efforts.

Cheers,

Garry
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on October 16, 2015, 03:30:31 AM
No worries.

I'm working on an update that should minimize the incorrect setpoint display.  Basically, if the result after converting to Fahrenheit is greater than 120 degrees, it's probably shouldn't have been converted.  I'm hoping to have an update in a few days for you.

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: bradvoy on October 20, 2015, 05:11:22 AM

The formula to convert C to F is ( t * 1.8 ) + 32.  If you have the time when you see the incorrect setpoint again, try taking the bad reading through this formula ( t - 32 ) / 1.8 and let me know if the result is what the setpoint should be.

I haven't seen the problem for the last few days.  Lately my setpoints seem to be displaying correctly.  But back when I was seeing the problem, putting the bad temperature through this formula did yield the correct value.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Gene on October 20, 2015, 11:06:16 PM
Please can you try the latest version from source code? I've made some fixes to ZWave.

g.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: michmill on October 22, 2015, 02:34:15 AM
Gene, I'm running r497 and I'm still seeing the issue.  My updated scripts, thought, are working well with r497.  Is there a newer version than r497 I can try?

Cheers,
Mike
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Gene on October 22, 2015, 10:43:23 AM
Yes r498 is available from source code:

https://github.com/genielabs/HomeGenie

it will be released in a couple of days.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on November 09, 2015, 05:18:33 PM
I'm just looking at some of the old logs, here's the section for my Thermostat (Secure SRT321). Polling works fine for me but changing the SetPoints does nothing, however looking at the log below Polling doesn't always work either.

I'm running standard code on R500.

Thanks,

Garry

2015-11-09 16:01:26.1848 Info HomeAutomation.HomeGenie.Automation   92   Automation Program   Program.Notification   {"Title":"Z-Wave Thermostat Poll","Message":"Polling thermostat 11<br>Living Room Thermostat"}
2015-11-09 16:01:26.3421 Trace [[[ BEGIN REQUEST ]]]
2015-11-09 16:01:26.3421 Trace WaitAck
2015-11-09 16:01:26.3421 Trace Sending Message (Node=11, CallbackId=87, Function=SendData, CommandClass=SensorMultilevel)
2015-11-09 16:01:26.3421 Debug 01-09-00-13-0B-02-31-04-05-87-5B
2015-11-09 16:01:26.3724 Debug 06-01-04-01-13-01-E8
2015-11-09 16:01:26.3724 Debug 06
2015-11-09 16:01:26.3724 Trace SendDataReady
2015-11-09 16:01:26.4821 Debug 01-05-00-13-87-01-6F
2015-11-09 16:01:26.4821 Debug 06
2015-11-09 16:01:26.4821 Trace Error
2015-11-09 16:01:26.4821 Trace [[[ END REQUEST ]]] took 148 ms
2015-11-09 16:01:26.4821 Warn Could not deliver message to Node 11 (CallbackId=87, Retry=1)
2015-11-09 16:01:26.4821 Trace [[[ BEGIN REQUEST ]]]
2015-11-09 16:01:26.4821 Trace WaitAck
2015-11-09 16:01:26.4821 Trace Sending Message (Node=11, CallbackId=87, Function=SendData, CommandClass=SensorMultilevel)
2015-11-09 16:01:26.4821 Debug 01-09-00-13-0B-02-31-04-05-87-5B
2015-11-09 16:01:26.6071 Debug 06-01-04-01-13-01-E8
2015-11-09 16:01:26.6071 Debug 06
2015-11-09 16:01:26.6071 Trace SendDataReady
2015-11-09 16:01:26.7177 Debug 01-05-00-13-87-01-6F
2015-11-09 16:01:26.7177 Debug 06
2015-11-09 16:01:26.7177 Trace Error
2015-11-09 16:01:26.7177 Trace [[[ END REQUEST ]]] took 228 ms
2015-11-09 16:01:26.7177 Warn Could not deliver message to Node 11 (CallbackId=87, Retry=2)
2015-11-09 16:01:26.7177 Trace [[[ BEGIN REQUEST ]]]
2015-11-09 16:01:26.7177 Trace WaitAck
2015-11-09 16:01:26.7177 Trace Sending Message (Node=11, CallbackId=87, Function=SendData, CommandClass=SensorMultilevel)
2015-11-09 16:01:26.7177 Debug 01-09-00-13-0B-02-31-04-05-87-5B
2015-11-09 16:01:26.8278 Debug 06-01-04-01-13-01-E8
2015-11-09 16:01:26.8278 Debug 06
2015-11-09 16:01:26.8278 Trace SendDataReady
2015-11-09 16:01:26.9549 Debug 01-05-00-13-87-01-6F
2015-11-09 16:01:26.9549 Debug 06
2015-11-09 16:01:26.9549 Trace Error
2015-11-09 16:01:26.9549 Trace [[[ END REQUEST ]]] took 239 ms
2015-11-09 16:01:26.9549 Warn Delivery of message to Node 11 failed (CallbackId=87).
2015-11-09 16:01:26.9549 Debug 11 Error
2015-11-09 16:01:26.9549 Info HomeAutomation.ZWave   11   Z-Wave Node   Status.Error   Response timeout!
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Gene on November 09, 2015, 05:35:35 PM
Hi Maximo,

try waking up your device and the opening manually these urls:

Code: [Select]
http://HG_ADDRESS/api/HomeAutomation.ZWave/THERMOSTAT_NODE_NUMBER/Thermostat.SetPointGet/Heating

setting as celsius

Code: [Select]
http://HG_ADDRESS/api/HomeAutomation.ZWave/THERMOSTAT_NODE_NUMBER/Thermostat.SetPointSet/Heating/20

setting as fahrenheit

Code: [Select]
http://HG_ADDRESS/api/HomeAutomation.ZWave/THERMOSTAT_NODE_NUMBER/Thermostat.SetPointSet/Heating/68

and again

Code: [Select]
http://HG_ADDRESS/api/HomeAutomation.ZWave/THERMOSTAT_NODE_NUMBER/Thermostat.SetPointGet/Heating

then look at the log (if you are looking at the file, wait five minutes to let the log be flushed).
Post the output here.
I don't have a z-wave thermostat so this is the only way I can help.

g.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on November 10, 2015, 12:24:11 PM
Hi Gene,

I've given that ago and didn't get any results from any of the URL's. I did expect the get setpoint to work, but even that didn't return any results. i will have another look tonight and post my logs.

What i did notice though was that if I open the new andriod app and change the setpoint on the thermostat it's near instantly reported in the app. But even adjusting the setpoint in the app straight away makes no difference.

So one way communication from the thermostat to Hg is working fine it seems.

Thanks for your help.

Garry
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on November 10, 2015, 09:12:59 PM
Have done a little more testing tonight. So when the thermostat is awake I can adjust the SetPoint. So it seems that HG tries to send the new SetPoint straight away, rather than waiting for a Wakeup Query. I'll upload the log entries shortly.
Title: Re: Troubleshooting Z-Wave thermostat
Post by: Maximo on November 10, 2015, 10:37:51 PM
Here's a few more log entries.

2015-11-10 20:04:27.0446 Info WebServiceGateway   192.168.100.208   HTTP   GET   200 /api/HomeAutomation.ZWave/11/Thermostat.SetPointSet/Heating/21.5/ [OPEN]
2015-11-10 20:04:27.0446 Info HomeAutomation.ZWave   11   ZWave Node   Thermostat.SetPoint.Heating   21.5
2015-11-10 20:04:27.0446 Info WebServiceGateway   192.168.100.208   HTTP   GET   200 /api/HomeAutomation.ZWave/11/Thermostat.SetPointSet/Heating/21.5/ [CLOSED AFTER 0.002 seconds]
2015-11-10 20:04:27.9196 Trace Error
2015-11-10 20:04:27.9196 Warn Message timeout (Node=11, CallbackId=11, Function=15, CommandClass=GetRoutingInfo)
2015-11-10 20:04:27.9196 Debug 11 Timeout
2015-11-10 20:04:27.9196 Trace [[[ END REQUEST ]]] took 10012 ms
2015-11-10 20:04:27.9196 Warn Delivery of message to Node 11 failed (CallbackId=15).
2015-11-10 20:04:27.9196 Info HomeAutomation.ZWave   1   Z-Wave Controller   Controller.Status   Node 11 response timeout!
2015-11-10 20:04:27.9196 Debug 11 Error
2015-11-10 20:04:27.9196 Info HomeAutomation.ZWave   11   Z-Wave Node   Status.Error   Response timeout!
2015-11-10 20:04:27.9196 Warn Node is flagged as sleeping, message will be re-sent on Wake Up (Node=11, CallbackId=11, Function=15, CommandClass=GetRoutingInfo)
2015-11-10 20:04:27.9196 Trace Adding message 01-07-00-80-0B-00-00-15-66
2015-11-10 20:04:27.9196 Debug 11 WakeUpSleepingStatus 1
2015-11-10 20:04:27.9196 Info HomeAutomation.ZWave   11   ZWave Node   ZWaveNode.WakeUpSleepingStatus   1
2015-11-10 20:04:28.0446 Trace [[[ BEGIN REQUEST ]]]
2015-11-10 20:04:28.0446 Trace WaitAck
2015-11-10 20:04:28.0446 Trace Sending Message (Node=11, CallbackId=16, Function=GetRoutingInfo, CommandClass=NotSet)
2015-11-10 20:04:28.0446 Debug 01-07-00-80-0B-00-00-16-65
2015-11-10 20:04:28.1540 Debug 06-01-20-01-80-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-5E
2015-11-10 20:04:28.1540 Debug 06
2015-11-10 20:04:28.1540 Warn No routing nodes reported.
2015-11-10 20:04:28.1540 Trace SendDataReady