Thermostat Device

HouseBot Plugin Development Discussions.
kilowatt
Senior Member
Posts: 152
Joined: Thu Jan 08, 2004 5:45 pm
Location: Westford, MA

Post by kilowatt »

Eric,



I have a SMARTHOME TempLinc which is supposed to be compatable with the RCS TX15-B control protocol. I would love to test it with your plugin once you have it working. I would be willing to help with testing and debug. It has been a long time since I did much coding so I'm not sure I could help there. I would still be interested in seeing the code to see how one implements a device plugin like this. Maybe I'll brush off my software skills and attempt to code a plugin.



Mark



Info on TempLink can be found here:



http://www.smarthome.com/1625.html

http://www.smarthome.com/manuals/1625_web.pdf
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

I will keep the board informed on the progress. Didn't get a chance to work on it last night because something came up at the last minute. I hope to get some time this evening to start adding the sending of the X-10 commands and if I have time start receiving X-10 and setting the properties.



Eric
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



What should the return value from SubscriptionNotification be? I know if is a BOOL but when should it be true and when false?



Thanks,

Eric
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Return TRUE if you want to, else return FALSE. :wink:



It really doesn't matter. Everything else in the call stack is void. I guess I did that for future needs. Yea, that was probably it.
Scott
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Since I'm normally pretty positive I'll return TRUE 8) But I may return FALSE on errors just in case that changes in the future.
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



This should be an easy one but I didn't completely understand the example. How do I change the value of a property. I don't see a SetPropertyValue() on CProperty.



Eric
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

If you look at the Beep Device, you can see an example.



The method of changing a value may seem a bit odd, since it takes several steps. It gives you a bit more flexibility by having the property values as discrete objects, so you can do a bit more with them.



To change the value, you first have to create a new value to change it to. Generally you call CreatePropertyValue() on the Property that you are wanting to change.



You can then call either ChangeRequestCompleted() or ChangeRequestFailed() on the new property. Since you created the value yourself in the plugin, you probably want to call ChangeRequestCompleted().



Lastly, delete the object.



Goes like this.


Code: Select all

  // Change the value to "No".
  CPropertyValue* pNoValue = m_pYesOrNo->CreatePropertyValue( "No" );
  if (pNoValue)
  {
    pNoValue->ChangeRequestCompleted();
    delete pNoValue;
  }
Scott
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



See if I'm seeing this correct. It seems that when preset dims come in they are 1 based (1-32) but when you send a preset dim they are 0 based (0-31). Is that correct and if so why?



Thanks,

Eric
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Eric,



My fault. :oops:



I've fixed the CM11a plugin. You can download a corrected version from here.



Scott
Scott
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



Thanks but which way did you change it?



Eric
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Zero based (0-31). Since the reporting code in the CM11a is new, I'd rather only effect you than anyone else who is using the values from the Device side.
Scott
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



No problem it is an easy change on my side, just needed to know which way it was.



Again thanks for all the quick changes you have been doing.



Eric
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



I'm about finished with the thermostat plug-in. Is there anyway you can send me the source for the CM11A plug-in because I want to start on the LynX-10 PLC plug-in and would like some sample code to get me going.



Thanks,

Eric
bsmout
Member
Posts: 5
Joined: Sun Mar 14, 2004 5:19 pm

RCTX15B vs. RCTX16B

Post by bsmout »

Eric,



I installed your plug-in and I'm considering buying a RCTX15B thermostat but then I saw there's also a RCTX16B available. Is the 16B compatible with your plug-in ? Does anyone know what the difference is with the 15B ?
Kind regards,

Bram
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

One of the main differences between the TX15B and TX16B is that the latter has heat and cool setpoints. There are some other minor differences but I don't remember exactly what they are. You can set the TX16B in TX15B mode so they should be compatible but I don't have a TX16B to test with.



If you get a TX16B and have troubles let me know and I will try to add some code to the plug-in to get it working.



Eric
Post Reply