Re: [concordance-devel] [PATCH] Add support for Harmony Link.

2013-07-30 Thread Phil Dibowitz
On 07/30/2013 02:44 PM, Scott Talbert wrote:
> Yes, but I think if I added a virtual function at the CRemote level, I 
> would have to add a non-virtual function in all of the CRemote 
> subclasses, not just CRemoteMH.  We could do that, but we would just have 
> useless empty implementations in each of the subclasses, so I'm not sure 
> if that's better.

We do this in quite a few places. I think it's cleaner than casting, and also
more consistent.

> It does, but the Link doesn't appear to support WPA Enterprise modes, only 
> PSK.  So maybe they started to implement Enterprise, added the 'user' and 
> then said, "eh, home users aren't going to use Enterprise, let's scrap 
> it."  Who knows.

Heh. They're so awesome.

>> So the message when you define LINK_TIMEOUT is a bit misleading. It implies
>> it's the timeout you use whenever you talk to the LINK, but it's just when 
>> you
>> wait for the final ACK after a full file write, right? We should make this
>> clear somewhere.
> 
> Well, when I added the #define for LINK_TIMEOUT, I was going to use 
> LINK_TIMEOUT in all of the places where I needed to extend the timeout to 
> wait for the Link.  Well, it turns out that it was only needed in that one 
> place.

Sure, I figured that out. Do you have a guess as to why? My *guess* would be
that if you're configuring wifi, once you're done writing the config file, it
waits until it manages to associate, authenticate, and get an address...
before replying. Do you know if it's true if you're not updating wifi settings?

Or conversely, perhaps wifi is faster, but when you update the harmony
username/password info, then it tries to download a connectivity test and
such, and that's what takes a while?

I'm curious if you have any insight.

Even if you don't, we should probably re-word the comment when we #define
LINK_TIMEOUT to explain that this is a timeout just for the last write to a
LINK when writing a file...
-- 
Phil Dibowitz p...@ipom.com
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss




signature.asc
Description: OpenPGP digital signature
--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [PATCH] Add support for Harmony Link.

2013-07-30 Thread Scott Talbert
On Mon, 29 Jul 2013, Phil Dibowitz wrote:

>> as well as account configuration (email, etc).  The Link does not receive
>> its configuration via USB like other remotes - it receives it via WiFi.
>
> So, we don't send it a configuration at all, we just tell it how to get on the
> network and how to log into the harmony website so it can get it's own config?

Correct.

>> +if (err = ((CRemoteMH*)rmt)->ReadFile("/sys/wifi/connect", 
>> (uint8_t*)buffer,
>> +  buflen, &data_read))
>
> My polymorphism in C++ is now very rusty... but I don't think you need 
> to cast that if you make it a proper virtual function at the CRemote 
> level with a full definition at CRemoteMH, right? That's how most of our 
> stuff works, no?

Yes, but I think if I added a virtual function at the CRemote level, I 
would have to add a non-virtual function in all of the CRemote 
subclasses, not just CRemoteMH.  We could do that, but we would just have 
useless empty implementations in each of the subclasses, so I'm not sure 
if that's better.

>> +int err;
>> +std::string str_buffer;
>> +str_buffer += "ssid,";
>> +str_buffer += config->ssid;
>> +str_buffer += "\n";
>> +str_buffer += "encryption,";
>> +str_buffer += config->encryption;
>> +str_buffer += "\n";
>> +str_buffer += "user,\n"; /* not sure what this is - appears unused */
>
> Doesn't WPA2-enterprise support username/pass so you can auth to PAP or
> Radius, etc?

It does, but the Link doesn't appear to support WPA Enterprise modes, only 
PSK.  So maybe they started to implement Enterprise, added the 'user' and 
then said, "eh, home users aren't going to use Enterprise, let's scrap 
it."  Who knows.

>> +/* wait for remote to send us a response */
>> +if ((err = HID_ReadReport(rsp, LINK_TIMEOUT))) {
>> +debug("Failed to read from remote");
>> +return LC_ERROR_READ;
>> +}
>
> So the message when you define LINK_TIMEOUT is a bit misleading. It implies
> it's the timeout you use whenever you talk to the LINK, but it's just when you
> wait for the final ACK after a full file write, right? We should make this
> clear somewhere.

Well, when I added the #define for LINK_TIMEOUT, I was going to use 
LINK_TIMEOUT in all of the places where I needed to extend the timeout to 
wait for the Link.  Well, it turns out that it was only needed in that one 
place.


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [PATCH] Fix serial number handling for ZWave-HID remotes.

2013-07-30 Thread Stephen Warren
On 07/30/2013 10:16 AM, Phil Dibowitz wrote:
> On 07/30/2013 08:09 AM, Stephen Warren wrote:
>> On 07/30/2013 12:25 AM, Phil Dibowitz wrote:
>>> On 07/23/2013 08:15 PM, Scott Talbert wrote:
 Use the normal byte ordering for them.  Additionally, we were
 off by one byte when copying the the serial number data in 
 UDP_Read().
>>> 
>>> Applied.
>>> 
>>> Thanks, this format works great. I like this workflow quite a
>>> lot.
>>> 
>>> Though I understand why the kernel maintainers are so picky
>>> about commit messages now... this flow doesn't give you the
>>> opportunity to tweak the message at the last second.
>> 
>> You can edit the saved email, or simply run git commit --amend
>> after it's been applied. If you apply a bunch of patches in a
>> batch, you can use git rebase -i to edit commit messages further
>> back. You likely want to do all that before you push though.
> 
> AFAIK, you can't amend commits by another person, and commit
> happens in the tree as you.

No, you can amend any commit without affecting the patch author field.
I do it all the time. BTW, I'm pretty sure there's even a cmdline
option to "git am" that'll allow you to edit the commit description
while the patch is being applied the first time, so there wouldn't
even be a need to amend it.

--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [PATCH] Fix serial number handling for ZWave-HID remotes.

2013-07-30 Thread Phil Dibowitz
On 07/30/2013 09:16 AM, Phil Dibowitz wrote:
>> You can edit the saved email, or simply run git commit --amend after
>> it's been applied. If you apply a bunch of patches in a batch, you can
>> use git rebase -i to edit commit messages further back. You likely
>> want to do all that before you push though.
> 
> AFAIK, you can't amend commits by another person, and commit happens in the
> tree as you.

Oh, I'm wrong. You can amend commits by another author... it must be our amend
wrapper at work that prevents this.

Good call. :)

-- 
Phil Dibowitz p...@ipom.com
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss




signature.asc
Description: OpenPGP digital signature
--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [PATCH] Fix serial number handling for ZWave-HID remotes.

2013-07-30 Thread Phil Dibowitz
On 07/30/2013 08:09 AM, Stephen Warren wrote:
> On 07/30/2013 12:25 AM, Phil Dibowitz wrote:
>> On 07/23/2013 08:15 PM, Scott Talbert wrote:
>>> Use the normal byte ordering for them.  Additionally, we were off
>>> by one byte when copying the the serial number data in
>>> UDP_Read().
>>
>> Applied.
>>
>> Thanks, this format works great. I like this workflow quite a lot.
>>
>> Though I understand why the kernel maintainers are so picky about
>> commit messages now... this flow doesn't give you the opportunity
>> to tweak the message at the last second.
> 
> You can edit the saved email, or simply run git commit --amend after
> it's been applied. If you apply a bunch of patches in a batch, you can
> use git rebase -i to edit commit messages further back. You likely
> want to do all that before you push though.

AFAIK, you can't amend commits by another person, and commit happens in the
tree as you.

And yes, I can manually modify the mailbox, but that's a PITA.

-- 
Phil Dibowitz p...@ipom.com
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss




signature.asc
Description: OpenPGP digital signature
--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [PATCH] Fix serial number handling for ZWave-HID remotes.

2013-07-30 Thread Stephen Warren
On 07/30/2013 12:25 AM, Phil Dibowitz wrote:
> On 07/23/2013 08:15 PM, Scott Talbert wrote:
>> Use the normal byte ordering for them.  Additionally, we were off
>> by one byte when copying the the serial number data in
>> UDP_Read().
> 
> Applied.
> 
> Thanks, this format works great. I like this workflow quite a lot.
> 
> Though I understand why the kernel maintainers are so picky about
> commit messages now... this flow doesn't give you the opportunity
> to tweak the message at the last second.

You can edit the saved email, or simply run git commit --amend after
it's been applied. If you apply a bunch of patches in a batch, you can
use git rebase -i to edit commit messages further back. You likely
want to do all that before you push though.


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [PATCH] Allow for separate IR learning implementation for ZWave (HID and USBNET).

2013-07-30 Thread Scott Talbert
On Mon, 29 Jul 2013, Phil Dibowitz wrote:

>> In preparation for supporting IR learning for ZWave, change the IRLearn()
>> function to be a subclass function for each so that IR learning can be
>> implemented and easily merged for each type separately.
>
> I'm totally fine with this. Out of curiosity though, do you actually expect
> there to be much of a difference? Since you can call Read() and Write() and
> have them do the right thing, I would imagine they'd be roughly the same...
> but if you've started digging and say they're likely to be pretty divergent,
> we can go this path. If, however, it's the case where there's just one extra
> step on one side or the other, it might be nice to keep them in one place...

Yes, I've started looking at this a bit and I think they are going to be 
fairly different implementations (especially with the whole UDP vs TCP
mode of ZWave-HID and switching between the two).

I actually started working on the USBNet version quite a while back, but I 
didn't get it working yet, and I have fairly limited access to that 
remote.

--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


[concordance-devel] Some SF cleanup

2013-07-30 Thread Phil Dibowitz
I removed the old CVS repo.

I then renamed the git "module" from "src" to "Code", so git now falls into
where CVS used to fall in the GUI, and matches a project that was setup with
git from the beginning.

-- 
Phil Dibowitz p...@ipom.com
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss




signature.asc
Description: OpenPGP digital signature
--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel