Author Topic: Intermatic Ha22 usb stick  (Read 13534 times)

MANDINGO

  • Guru
  • ****
  • Posts: 204
    • View Profile
Intermatic Ha22 usb stick
« on: January 28, 2008, 07:13:08 pm »
Went to CES 2008 and spoke to the fokes over at intermatic and bitched about the linux drivers not being available....
Got a phone call today telling me that they sent me a copy of the linux drivers they have so im gonna give it a try and see if i can get this thing working ill let you guys know....   ;D

Ok got home and found that i need some help with these drivers i posted a copy here
http://www.uploading.com/files/M7CN8NBL/spcp8x5.tar.gz.html

any help would be appriciated
« Last Edit: January 28, 2008, 10:17:59 pm by mandingo »
For a Current List of Plug and Play Capture Cards/Devices
http://wiki.linuxmce.org/index.php/Capture_Cards

Loki008

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #1 on: January 29, 2008, 05:30:36 pm »
I am kind of supprised that no one has commented on this yet? if these are infact working linux drivers this could be a nice boost in the zwave hardware support.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Intermatic Ha22 usb stick
« Reply #2 on: January 29, 2008, 07:52:36 pm »
hey thats good news. Seems like the Intermatic also uses a spcp8x5 chipset. We got a driver for 2.6.10 from ACT. I ported that to 2.6.2x:
http://svn.charonmedia.org/trac.cgi/browser/vendor/spcp8x5

after installing the kernel module and adding the usb id's to the ZWave device template it should work plug and play.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Intermatic Ha22 usb stick
« Reply #3 on: January 30, 2008, 11:57:48 am »
hey thats good news. Seems like the Intermatic also uses a spcp8x5 chipset. We got a driver for 2.6.10 from ACT. I ported that to 2.6.2x:
http://svn.charonmedia.org/trac.cgi/browser/vendor/spcp8x5

after installing the kernel module and adding the usb id's to the ZWave device template it should work plug and play.

best regards,
Hari

Yes the Intermatic uses the spcp8x5 chip... :-)

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

MANDINGO

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #4 on: January 30, 2008, 12:12:46 pm »
i have a question i am adding some info to the spcp8x5.c and spcp8x5.h i have the vid and pid for the intermatic, but i dont know the complete usb device id for now i have placed them as

the .c file
{ USB_DEVICE(SPCP8x5_INTERMATIC_VID , SPCP8x5_INTERMATIC_PID)}, need to replace the INTERMATIC with the right info


the .h file
#define SPCP8x5_INTERMATIC_VID   0x04FC
#define SPCP8x5_INTERMATIC_PID   0x0204 

any help would be great and yes the drivers work just wanna add intermatics info in also if this can be done this way ! im comming up with unknown symbol usb_serial_disconnect etc....
« Last Edit: January 30, 2008, 12:19:24 pm by mandingo »
For a Current List of Plug and Play Capture Cards/Devices
http://wiki.linuxmce.org/index.php/Capture_Cards

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Intermatic Ha22 usb stick
« Reply #5 on: January 30, 2008, 01:09:46 pm »
any help would be great and yes the drivers work just wanna add intermatics info in also if this can be done this way ! im comming up with unknown symbol usb_serial_disconnect etc....

you should use the driver from the charonmedia trunk:
http://svn.charonmedia.org/svn/vendor/spcp8x5/
the original code does _not_ compile on 2.6.2x.

i've just added the vid/pid to the code:
http://svn.charonmedia.org/trac.cgi/changeset/1495/vendor/spcp8x5

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

MANDINGO

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #6 on: January 31, 2008, 10:52:10 pm »
Hari i had to add a couple of changes but now works completely with intermatic could u post the codes below into the svn thanks

http://www.uploading.com/files/SF8DLVKA/Makefile.html
http://www.uploading.com/files/LQRB9SC4/ringbuf.c.html
http://www.uploading.com/files/3AQJ601L/ringbuf.h.html
http://www.uploading.com/files/Z9X88ZD2/spcp8x5.c.html
http://www.uploading.com/files/AUV49PL5/spcp8x5.h.html

sorry about the files but only place i could post them   :-\
For a Current List of Plug and Play Capture Cards/Devices
http://wiki.linuxmce.org/index.php/Capture_Cards

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Intermatic Ha22 usb stick
« Reply #7 on: February 01, 2008, 12:07:34 am »
Hari i had to add a couple of changes but now works completely with intermatic could u post the codes below into the svn thanks
couple?
ah, forgot that type variable assignement:
Code: [Select]
+       else if(serial->dev->descriptor.idProduct == 0x0204)
+               type = SPCP825_INTERMATIC_TYPE;
its in the trunk. Thank you very much.

Best regards,
Hari
rock your home - http://www.agocontrol.com home automation

itspac

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #8 on: March 06, 2008, 12:09:51 am »
Hi i'm curious if this works with  v7.10 b3.  I compiled this on my 64 bit versioin but I get an error when trying to use it.

 looking at dmesg gives me:
/drivers/spcp8x5/spcp8x5.c: Set UART format 0x30b failed (error= -32)



It finds the device and attaches it to ttyUSB0, but the next line is the error above.
Thanks for your help.

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #9 on: March 06, 2008, 10:29:14 pm »
Using 710beta4, this is what I get when I attach my ha22:
Code: [Select]
== FRESH START ==
1       03/06/08 15:02:37       /usr/pluto/bin/Spawn_Device.sh 34 (spawning-device)     device: 34 ip: localhost cmd_line: ZWave
0       03/06/08 15:02:38       34 (spawning-device)    Entering 34
========== NEW LOG SECTION ==========
1       03/06/08 15:02:38       34 (spawning-device)    Starting... 1
1       03/06/08 15:02:38       34 (spawning-device)    Found /usr/pluto/bin/ZWave
05      03/06/08 15:02:40.405           Child device 35 is disabled <0x2ae6eb644b40>
05      03/06/08 15:02:47.416           Got a reload command from 0  <0x43005950>
05      03/06/08 15:02:48.176           void ClientSocket::Disconnect() on this socket: 0x666b40 (m_Socket: 7) <0x2ae6eb644b40>
Return code: 2
2       03/06/08 15:02:48       34 (spawning-device)    Device requests restart... count=1/50 dev=34
Thu Mar  6 15:02:48 CST 2008 Restart
========== NEW LOG SECTION ==========
1       03/06/08 15:02:56       34 (spawning-device)    Starting... 1
1       03/06/08 15:02:56       34 (spawning-device)    Found /usr/pluto/bin/ZWave
05      03/06/08 15:02:58.613           Creating child 35 <0x2b8749e93b40>
05      03/06/08 15:02:58.613           Note: Device manager has attached a device of type 1820 that this has no custom event handler for.  It will not fire events. <0x2b8749e93b40>
05      03/06/08 15:02:58.613           Note: Device manager has attached a device of type 1820 that this has no custom handler for.  This is normal for IR. <0x2b8749e93b40>
05      03/06/08 15:06:07.206           Going to rotate logs... <0x43005950>
05      03/06/08 15:10:54.807           void ClientSocket::Disconnect() on this socket: 0x666b40 (m_Socket: 7) <0x2b8749e93b40>
Return code: 0
2       03/06/08 15:10:54       34 (spawning-device)    Shutting down... count=1/50 dev=34
Thu Mar  6 15:10:54 CST 2008 Shutdown
== ATTEMPT FRESH START ==
1       03/06/08 15:14:52       /usr/pluto/bin/Spawn_Device.sh 34 (spawning-device)     18690 Dev: 34; Already Running list: 15,16,17,18,27,20,21,22,25,28,24,26,37,
== FRESH START ==
1       03/06/08 15:14:52       /usr/pluto/bin/Spawn_Device.sh 34 (spawning-device)     device: 34 ip: localhost cmd_line: ZWave
0       03/06/08 15:14:52       34 (spawning-device)    Entering 34
========== NEW LOG SECTION ==========
1       03/06/08 15:14:52       34 (spawning-device)    Starting... 1
1       03/06/08 15:14:52       34 (spawning-device)    Found /usr/pluto/bin/ZWave
05      03/06/08 15:14:52.613           ZWave::ConfirmConnection : zwave device is empty <0x2ac6424a5b40>
05      03/06/08 15:14:52.980           ZWave::ConfirmConnection : zwave device is empty <0x2ac6424a5b40>
05      03/06/08 15:14:52.980           Cannot connect to ZWave device . <0x2ac6424a5b40>
01      03/06/08 15:14:52.981           Connect() Failed <0x2ac6424a5b40>
Return code: 1
3       03/06/08 15:14:53       34 (spawning-device)    Device died... count=1/50 dev=34
Thu Mar  6 15:14:53 CST 2008 died
========== NEW LOG SECTION ==========
1       03/06/08 15:15:03       34 (spawning-device)    Starting... 2
1       03/06/08 15:15:03       34 (spawning-device)    Found /usr/pluto/bin/ZWave
05      03/06/08 15:15:05.455           Child device 35 is disabled <0x2b36d4408b40>
05      03/06/08 15:16:48.741           Got a reload command from 0  <0x43005950>
05      03/06/08 15:16:49.446           void ClientSocket::Disconnect() on this socket: 0x666b40 (m_Socket: 7) <0x2b36d4408b40>
Return code: 2
2       03/06/08 15:16:49       34 (spawning-device)    Device requests restart... count=2/50 dev=34
Thu Mar  6 15:16:49 CST 2008 Restart
========== NEW LOG SECTION ==========
1       03/06/08 15:16:57       34 (spawning-device)    Starting... 2
1       03/06/08 15:16:57       34 (spawning-device)    Found /usr/pluto/bin/ZWave
05      03/06/08 15:17:03.060           ### Go to timeout queue <0x41802950>
05      03/06/08 15:17:03.060           ### execute the next job from timeout queue <0x41802950>
05      03/06/08 15:17:03.060           ZWJobInitialize::timeoutHandler <0x41802950>
05      03/06/08 15:17:04.881           Creating child 35 <0x2ae0a8e84b40>
05      03/06/08 15:17:04.881           Note: Device manager has attached a device of type 1820 that this has no custom event handler for.  It will not fire events. <0x2ae0a8e84b40>
05      03/06/08 15:17:04.881           Note: Device manager has attached a device of type 1820 that this has no custom handler for.  This is normal for IR. <0x2ae0a8e84b40>
05      03/06/08 15:20:30.034           -------------------------- Job Timeout _________ <0x41802950>

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #10 on: March 06, 2008, 11:17:02 pm »
Applying the patch that Daniel gave me, I had a failed hunk, but went ahead and tried to finish it out anyway, however: "make all" results in this:
Code: [Select]
dcerouter_64258:/home/linuxmce/source/trunk/src/ZWave# make all
g++ -c -I.. -I../DCE -DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I/opt/libxine1-pluto/include -I/opt/linphone-1.3.5/include -I/usr/include/mysql  -Wall -fPIC -ggdb3  Main.cpp -o Main.o
In file included from ../db_wrapper/db_wrapper.h:112,
                 from ../PlutoUtils/DBHelper.h:23,
                 from ../pluto_main/Database_pluto_main.h:3,
                 from ../pluto_main/Table_Device.h:21,
                 from ../DCE/DeviceData_Router.h:25,
                 from ../DCE/DCERouter.h:28,
                 from Main.cpp:8:
../db_wrapper/db_wrapper_mysql.h:7:25: error: mysql/mysql.h: No such file or directory
../PlutoUtils/DBHelper.h:36: error: ISO C++ forbids declaration of ‘MYSQL_RES’ with no type
../PlutoUtils/DBHelper.h:36: error: expected ‘;’ before ‘*’ token
../PlutoUtils/DBHelper.h: In constructor ‘PlutoSqlResult::PlutoSqlResult()’:
../PlutoUtils/DBHelper.h:37: error: class ‘PlutoSqlResult’ does not have any field named ‘r’
../PlutoUtils/DBHelper.h: In member function ‘void PlutoSqlResult::ClearResults()’:
../PlutoUtils/DBHelper.h:44: error: ‘r’ was not declared in this scope
../PlutoUtils/DBHelper.h:46: error: ‘mysql_free_result’ was not declared in this scope
../PlutoUtils/DBHelper.h: At global scope:
../PlutoUtils/DBHelper.h:64: error: ISO C++ forbids declaration of ‘MYSQL’ with no type
../PlutoUtils/DBHelper.h:64: error: expected ‘;’ before ‘*’ token
../PlutoUtils/DBHelper.h:164: error: ‘MYSQL’ has not been declared
../PlutoUtils/DBHelper.h:180: error: ISO C++ forbids declaration of ‘MYSQL_RES’ with no type
../PlutoUtils/DBHelper.h:180: error: expected ‘;’ before ‘*’ token
../PlutoUtils/DBHelper.h:225: error: expected `;' before ‘int’
../PlutoUtils/DBHelper.h: In constructor ‘DBHelper::DBHelper()’:
../PlutoUtils/DBHelper.h:74: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h: In constructor ‘DBHelper::DBHelper(std::string, std::string, std::string, std::string, int)’:
../PlutoUtils/DBHelper.h:97: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h: In destructor ‘virtual DBHelper::~DBHelper()’:
../PlutoUtils/DBHelper.h:111: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:112: error: ‘mysql_close’ was not declared in this scope
../PlutoUtils/DBHelper.h:113: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h: In member function ‘bool DBHelper::DBConnect(bool)’:
../PlutoUtils/DBHelper.h:133: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:137: error: ‘mysql_close’ was not declared in this scope
../PlutoUtils/DBHelper.h:140: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:142: error: ‘mysql_init’ was not declared in this scope
../PlutoUtils/DBHelper.h:151: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:151: error: ‘mysql_real_connect’ was not declared in this scope
../PlutoUtils/DBHelper.h:154: error: ‘mysql_error’ was not declared in this scope
../PlutoUtils/DBHelper.h: In member function ‘void DBHelper::SetConnection(int*)’:
../PlutoUtils/DBHelper.h:166: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h: In member function ‘std::string DBHelper::md5(std::string)’:
../PlutoUtils/DBHelper.h:173: error: ‘MYSQL_ROW’ was not declared in this scope
../PlutoUtils/DBHelper.h:173: error: expected `;' before ‘row’
../PlutoUtils/DBHelper.h:174: error: ‘class PlutoSqlResult’ has no member named ‘r’
../PlutoUtils/DBHelper.h:174: error: ‘db_wrapper_query_result’ was not declared in this scope
../PlutoUtils/DBHelper.h:174: error: ‘row’ was not declared in this scope
../PlutoUtils/DBHelper.h:174: error: ‘class PlutoSqlResult’ has no member named ‘r’
../PlutoUtils/DBHelper.h:174: error: ‘mysql_fetch_row’ was not declared in this scope
../PlutoUtils/DBHelper.h:177: error: ‘row’ was not declared in this scope
../PlutoUtils/DBHelper.h: In member function ‘int DBHelper::threaded_db_wrapper_query(std::string, bool, bool)’:
../PlutoUtils/DBHelper.h:232: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:232: error: ‘mysql_query’ was not declared in this scope
../PlutoUtils/DBHelper.h:237: error: ‘mysql_error’ was not declared in this scope
../PlutoUtils/DBHelper.h:261: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:261: error: ‘mysql_affected_rows’ was not declared in this scope
../PlutoUtils/DBHelper.h: In member function ‘int DBHelper::threaded_db_wrapper_query_withID(std::string, bool)’:
../PlutoUtils/DBHelper.h:273: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:273: error: ‘mysql_query’ was not declared in this scope
../PlutoUtils/DBHelper.h:276: error: ‘mysql_error’ was not declared in this scope
../PlutoUtils/DBHelper.h:300: error: ‘m_pDB’ was not declared in this scope
../PlutoUtils/DBHelper.h:300: error: ‘mysql_insert_id’ was not declared in this scope
make: *** [Main.o] Error 1

kir

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #11 on: March 06, 2008, 11:25:41 pm »
Looks like you don't have mysql headers and libs:

>../db_wrapper/db_wrapper_mysql.h:7:25: error: mysql/mysql.h: No such file or directory

Install something like "libmysqlclient15-dev"

MANDINGO

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #12 on: March 07, 2008, 05:15:11 am »
Beta 4 not working properly with HA22 seems that the system now loops in the wizard for lights when the stick is pluged in and is detected, also found that all lights will not hold names for the switches etc..  example i have wall switches and rename them according to what they control but under the admin page they revert back to dimmable switch every time the router is reloaded is there a way as i can turn of the pnp for the zwave and go back to the manual install of drivers and configuration because the pnp is not working right  :(

Think im going back to Beta 3
« Last Edit: March 07, 2008, 05:46:32 am by mandingo »
For a Current List of Plug and Play Capture Cards/Devices
http://wiki.linuxmce.org/index.php/Capture_Cards

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Intermatic Ha22 usb stick
« Reply #13 on: March 07, 2008, 10:12:43 am »
Beta 4 not working properly with HA22 seems that the system now loops in the wizard for lights when the stick is pluged in and is detected, also found that all lights will not hold names for the switches etc..  example i have wall switches and rename them according to what they control but under the admin page they revert back to dimmable switch every time the router is reloaded is there a way as i can turn of the pnp for the zwave and go back to the manual install of drivers and configuration because the pnp is not working right  :(

Think im going back to Beta 3

This is a 'known problem' with Beta4... you can get the fix from here http://wiki.linuxmce.org/index.php/KnownIssues_0710_Beta4

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

MANDINGO

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: Intermatic Ha22 usb stick
« Reply #14 on: March 07, 2008, 05:41:09 pm »
Gonna give it a try thanks feel alot better about B4  ;D :D
For a Current List of Plug and Play Capture Cards/Devices
http://wiki.linuxmce.org/index.php/Capture_Cards