Problems Serial to USB and Ui7

I have trouble getting the plugin (ver 1.2a) to work.
Have connected to the alarm via a Startech USBtoSerial adapter (Startech #ICUSB2321F). I have only connected to GND, TX and RX.

At first I got the error message “Not starting due to too many communication errors” then I cleared “CommExceptions” and “CommLastException”. That took care of the error message but the plugin was still not working.

Hooked up the USBtoSerial adapter to my PC and Docklight. What I found was a continous and repeating stream with EA FF FF FF 00.

Any clous or suggestions on how to get the plugin to work?

Indeed first communication in general needs to be good for the plugin to work. Using Docklight is a good way of determining this like you did.

If you have a continous stream of data coming by, which are not PowerMax messages, then

[ul][li]Take all power off, including battery[/li]
[li]Check connections[/li]
[li]Check comm settings[/li][/ul]

Thanks for your reply.

I tried power off, including battey, with no luck.

The strange thing was that when reconnecting power, the alarm didnt start (no lights turned on, alarm unit totally dead) until I removed my serial connection. Once the alarm unit had powered on I could reconnect the serial cables.

I have connected my serial cable as shown in the pictures on this page [url=http://www.domoticaforum.eu/viewtopic.php?f=68&t=7152#p53758]http://www.domoticaforum.eu/viewtopic.php?f=68&t=7152#p53758[/url]

I have checked my cables and all seem right.

???

Just reading you first post fully now. Connecting a USBtoSerial adapter on the pins you refer to will not work. These are TTL level signals, not serial. Connecting to these, you will need a 3.3V TTL->USB adapter.

OK - I seem to have made a big misstake…

Will a serial-to-usb adapter based on prolific PL2303HX chipset be a good choise or should I go for some other chipset?

I have no experience with that one, but personally I prefer FTDI.

I am now using a cable from based on FTDI [url=http://www.adafruit.com/products/70]http://www.adafruit.com/products/70[/url]

The connection is working but after some time the plugin stops working and the CommException value is 4. The problem is more frequent in powerlink mode than in standard mode

I can get the plugin going again if I clear the variable CommExeception and restart. So far this fix has worked every time the plugin has stopped working.

What is causing my problem? If the problem itself cant be fixed, is there a way to increase the acceptable CommExceptions or monitor the value and clear it and make a restart if the value become 4?

My setup is: Vera edge UI7, Powermaster 10, Plugin ver 1.2a

Please try revision 87, version 1.2e. It fixes a number of issues.

[ul][li]updates for UI7 (fix remote access, items added to top tab)[/li]
[li]fix X10 status for higher addresses[/li]
[li]updated algorithm for showing armed status[/li]
[li]fixed crash on PowerMaster unknown sensors[/li]
[li]fixed crash on strange phone numbers[/li]
[li]added additional PowerMaster sensors, incl. temp.[/li][/ul]

I have now tried version 1.2e and still have the same problem - plugin stops working after a while (several hours, sometimes days) and Commexception value is 4.

What does the Commexception indicate and what happens when it reaches 4? Is it possible and what is the downside if I by luup code regulary reset the Commexception value to 0?

There can be various reasons for a comm exception. The crash log will detail which exception occurs. After 4 exceptions the plugin indeed does not start anymore as a sort of fail-safe. There is no harm in resetting the counter to 0, but of course the root cause has to be found and fixed.

Looking at the crash file I’ve found two parts that might be of interest. Any ideas whats causing the exceptions?

Almost every CRC error in the logfile occurs after failed SyncPlugins:

[code]01 04/29/15 16:54:38.935 e[31;1mFileUtils::ReadURL 28/resp:0 user: pass: size 1 https://plugin1.mios.com/sync_plugins2.php?PK_AccessPoint=xxxxxxx&HW_Key=xxxxxx&Plugins=2958,6216,8191,3086,3066,1028,3018,7246,4226,3426,4686, response: e[0m <0x76f0a520>
01 04/29/15 16:54:38.936 e[31;1mRAServerSync::SyncPlugins failed to sync https://plugin1.mios.com/sync_plugins2.php?PK_AccessPoint=xxxxx&HW_Key=xxxxxx&Plugins=2958,6216,8191,3086,3066,1028,3018,7246,4226,3426,4686,e[0m <0x76f0a520>

Exception CRC errors occurred at 04/30/15 06:55:57
Exception count is now 1


01 04/30/15 6:30:00.815 e[31;1mFileUtils::ReadURL 28/resp:0 user: pass: size 1 https://plugin1.mios.com/sync_plugins2.php?PK_AccessPoint=xxxxxxxx&HW_Key=xxxxxx&Plugins=2958,6216,8191,3086,3066,1028,3018,7246,4226,3426,4686, response: e[0m <0x77982520>
01 04/30/15 6:30:00.816 e[31;1mRAServerSync::SyncPlugins failed to sync https://plugin1.mios.com/sync_plugins2.php?PK_AccessPoint=xxxxxx&HW_Key=xxxxxx&Plugins=2958,6216,8191,3086,3066,1028,3018,7246,4226,3426,4686,e[0m <0x77982520>

Exception CRC errors occurred at 04/30/15 11:20:29
Exception count is now 2[/code]

52 04/30/15 11:20:29.452 0x43 (e[32;1mCe[0m) <0x73342520> 52 04/30/15 11:20:29.452 0xa (e[32;1m\ne[0m) <0x73342520> 06 04/30/15 11:20:29.455 Device_Variable::m_szValue_set device: 72 service: urn:micasaverde-com:serviceId:PowermaxAlarmPanel1 variable: e[35;1mCommExceptionse[0m was: 1 now: 2 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x73342520> 10 04/30/15 11:20:29.456 UserData::m_iDataVersion_Variables_incr CommExceptions user data 369764019 variables 369769847 <0x73342520> 10 04/30/15 11:20:29.457 UserData::DataIsDirty UpdateStateList was 1 incr 0 user data 369764019 variables 369769847 <0x73342520> 06 04/30/15 11:20:29.457 Device_Variable::m_szValue_set device: 72 service: urn:micasaverde-com:serviceId:PowermaxAlarmPanel1 variable: e[35;1mCommLastExceptione[0m was: 1430369757 now: 1430385629 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x73342520> 10 04/30/15 11:20:29.458 UserData::m_iDataVersion_Variables_incr CommLastException user data 369764019 variables 369769848 <0x73342520> 10 04/30/15 11:20:29.458 UserData::DataIsDirty UpdateStateList was 1 incr 0 user data 369764019 variables 369769848 <0x73342520> 10 04/30/15 11:20:29.459 AlarmManager::AddRelativeAlarm current time 1430385629 delay 1 type 7 <0x73342520>

I’ll need the full log to better see what is going on. Can you send it to vera.powermax at gmail.com?

I have sent you the logfile.

Despite my problems with Commexception I think the plugin is great. The plugin was one of the major reasons in my choise to go with Vera as my HA- system.

Is there a way to support your great effort through paypal?

I’m having exactly the same problems (Vera Edge with latest firmware & Powermaster 30 & plugin 1.2e). I keep losing connection “Not starting due to too many communcation errors” (<–there’s a typo btw) with Vera and Powermaster. So I decided to disable CommExceptions check (see attachment). With the latest Vera firmware (1.7.1320) this problem seems even more frequent than before.

I’m also seeing similar sync messages, although not sure if they have any relevance:

01	06/22/15 0:11:08.103	e[31;1mFileUtils::ReadURL 28/resp:0 user: pass: size 1 https://plugin1.mios.com/sync_plugins2.php?PK_AccessPoint=*****&HW_Key=*****&Plugins=1028,3066,3086,3166, response: e[0m <0x76ffb520>
01	06/22/15 0:11:08.104	e[31;1mRAServerSync::SyncPlugins failed to sync https://plugin1.mios.com/sync_plugins2.php?PK_AccessPoint=*****&HW_Key=*****&Plugins=1028,3066,3086,3166,e[0m <0x76ffb520>

The whole log file has been sent earlier to vera.powermax at gmail.com. Despite this problem, plugin is great and would also like to support/donate/help testing.