Author |
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 22 2015 at 12:35 | IP Logged
|
|
|
PH 2.15d
windows : 7
I am testing Z-wave using socket plugin and PH
randomly will go into "not responding" while executing
ph_picmd and only way to recover is to kill ph process
by Task Manager and restart PH.
Command use to communicate with plugin is thru
ph_picmd - example
ph_picmd(-2,"A2Z",1,0,0,"gs,8~r","")
above I have tried with timeout or above without.
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 22 2015 at 17:53 | IP Logged
|
|
|
Nick,
Not sure what the problem would be but wondering if
you could try a couple of different things.
First, see how this does:
ph_picmd(2,"A2Z",1,0,0,"gs,8~r","")
Also, instead of the Socket plugin, try the direct
socket command below:
ph_sendsocketdata1("Your A2Z IP",your A2Z
port,1,"gs,8~r")
Let me know how it goes.
Dave.
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 22 2015 at 18:34 | IP Logged
|
|
|
I had tried with 5 sec time out - seems like it is
locking up on subsequent command , for now I have put
wait command even after data is returned. also will
check with Ph_sendsocketdata1 command and report back.
Thanks
Nick
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 22 2015 at 18:51 | IP Logged
|
|
|
I can confirm that ph_picmd subsequent command with or
without timeout will lock up so if I wait another 2 sec
after data is returned it will not lock up. (still
testing)
for Ph_sendsocketdata1 NO problem I can send subsequent
command with click of mouse. (normal return is less than
.06sec). but this command will not fire the triggers.
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 22 2015 at 19:59 | IP Logged
|
|
|
Nick,
ph_sendsocketdata1 probably works without issue
because its sending the data and then disconnecting
the socket as soon as the send is complete (it doesnt
want for an acknowledgment or data to return).
It sounds as if the socket plugin works fine if you
space the commands a couple of seconds apart. Im
wondering if the A2Z-Link needs to wait until it
returns a response of some sort before the next
command can be accepted.
I took a quick look online to see if I could see a
protocol for the A2Z-Link but could not find anything.
Could you point me to some documentation so I can see
what the best way to solve the problem is?
Thanks,
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 22 2015 at 22:36 | IP Logged
|
|
|
Nick,
Finally found the documentation. One thing I notice is
that you're only sending a carriage return instead of
a carriage return/linefeed pair (this is what is
actually send when you press a computers ENTER key).
Try changing your command to:
ph_picmd(2,"A2Z",1,0,0,"gs,8~r~n","")
Let me know if that makes a difference or not.
Dave.
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 22 2015 at 22:39 | IP Logged
|
|
|
there's not much of technical stuff for A2Z but like
you mention in other post , it is Raspberry Pi inside
the box - (verified by Mac address).
http://homeseer.com/support/homeseer/HS3/A2ZLink/defau
lt.htm
as for socket port I see that it remains open until I
kill the process in window. (on window you can check
by command line and putty to A2Z and run linux
command) which is Normal but as soon as you kill or
exit PH in window port is also released in A2Z.
adding wait time I have to give it more testing.
Also I will try with telnet to send command quickly
and see if it will respond.
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 22 2015 at 22:57 | IP Logged
|
|
|
Nick,
Just in case you missed my latest message, try
terminating with a carriage return/linefeed instead of
just the carriage return. The docs I found say this is
the proper way.
Let me know,
Dave.
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 23 2015 at 01:08 | IP Logged
|
|
|
Dave,
with return/linefeed made it worse. will do more
testing.
Nick
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 23 2015 at 10:58 | IP Logged
|
|
|
Dave,
After booting and left it alone for while like last
night and tried with ~r~n (CR/LF) it seems to be working
and not locking the PH . I will report back with status
later.
Thank you
Nick
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 23 2015 at 11:37 | IP Logged
|
|
|
Dave,
sorry it is still locking up but just taking longer may
be on 7th or 8th subsequent command .
I had tried with telnet with cut and Paste (to send
command quickly) and no problem and no locking of
session.
Nick
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 23 2015 at 14:18 | IP Logged
|
|
|
I had one older install in different computer and its working in that.
working setup
window 7
PH 2.1.4
DB version 2.1.2
plugin version 1.8
SDK 1.2
in system where it does not work or lockup is
window 7
ph 2.1.5d
DB version 2.1.5
plugin version 1.9
SDK 1.2
so it seems like either plugin or new version .
both have window 7 -
I will see if I can unregistered the new plug in and try with old one
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 23 2015 at 21:49 | IP Logged
|
|
|
Nick,
With the news that version 1.8 works but version 1.9
doesnt, I think I know what might be going on. Version
1.8 used version 7 of the socketwrench control and
version 1.9 uses version 8 of the control. They
changed something internally that wasnt entirely
compatible with my code and causes issues (this is why
the ph_geturl functions broke in 2.1.5).
Anyways, Ive modified code for ph_geturl (to be
released with the next full version) and copied those
changes into a new version of the plugin (version
2.0). You can download it here: http://www.power-home.com/download/ph_socket.zip.
Give it a try and let me know how it works.
Thanks,
Dave.
Edited by dhoward - August 23 2015 at 21:51
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 23 2015 at 22:56 | IP Logged
|
|
|
Dave,
New socket plugin seems to be working , I would send and
receive 8 Commands and it will lockup between 2-5 .
I will test for while before I clean the code and many
many version of PH and back to playing Z-Wave.
always thankful for coming through.
Nick
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 24 2015 at 15:11 | IP Logged
|
|
|
Dave,
Got lock again after 3 hrs -
so I again tested with PH 2.1.4 and left it on this
morning and NO Lockup after 6 hrs of running. (please
note that on that computer there is no other
controller only using the plugin which is of 1.8)
just FYI when you receive command most of the time it
will be two different one. first one is the
confirmation of what you have sent and next one is
notification from device and seems like it get stuck
when second set of information is coming.
but again it works on 2.1.4
Thanks
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 24 2015 at 22:36 | IP Logged
|
|
|
Nick,
Sounds like we're making progress though (3 hours before
lockup). Ive made a new 2.1 version (same link as
above).
Give it a try and let me know if its any better.
Thanks,
Dave.
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 25 2015 at 10:57 | IP Logged
|
|
|
Dave,
still locks up now it locks up even quicker like
before between 2-8 sending commands.
is data receiving from other controller like Insteon
and x10 can overwhelm the PH ? on working 2.1.4 /
socket 1.8 only thing is the this plugin - .
I will try to disable the other controller and check
it later.
Thanks
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 25 2015 at 13:15 | IP Logged
|
|
|
Nick,
Other controllers shouldnt have any effect as the plugin runs in its own thread.
To rule everything out though, try running the 1.8 plugin on your 2.1.5 machine. You should be able to just copy the ph_socket.ocx file in the plugins directory as well as the cswsk7.ocx Socket component (located in \Windows\system32 or \Windows\Syswow64) to your 2.1.5 machine. Run regsvr32 on each component so it will successfully register and you should be able to launch and test 1.8 on 2.1.5 to rule out issues there.
Dave.
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: August 25 2015 at 14:33 | IP Logged
|
|
|
Dave,
I don't see cswsk7 but cswsk32.ocx in working machine
and none in non-working.
Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 25 2015 at 15:46 | IP Logged
|
|
|
Nick,
I'll have to confirm when I get home tonight but Im pretty sure version 1.8 is using version 7 of the Catalyst Winsock control. cswsk32.ocx is their very old (ancient) version of the control that I believe was something like version 3.2. You can try copying that and registering to see if it works (it won't hurt anything). If the plugin launches, then that is the control it uses. If it doesnt launch, then somewhere on the machine should be cswskax7.ocx (should be the same directory that cswskax8.ocx is located for PowerHome 2.1.5).
If the new machine is 64 bit, then the location will be c:\windows\syswow64.
Dave.
|
Back to Top |
|
|