Author Topic: FIXED - VeraLite <-> Arduino UNO : USB ACM Serial port configuration fails  (Read 2743 times)

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
Hello,

My project is to connect an Arduino Uno + some devices to my VeraLite ( 7.0.17)  so I have installed the UI7 MySensors plugin (from mysensors.org) successfully but the creation of the device fails :

MySensors plugin : Choose the Serial Port
MySensors Plugin[23] : Running Lua Startup

The problem is in the serial port configuration :

1) Log :

50   10/06/16 8:33:21.153   luup_log:23: Arduino plugin: loading library L_Arduino ... <0x2b783680>
50   10/06/16 8:33:21.187   luup_log:23: Arduino plugin: library L_Arduino loaded <0x2b783680>
50   10/06/16 8:33:21.190   luup_log:23: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,PluginVersion, 1.5, 23 <0x2b783680>
50   10/06/16 8:33:21.191   luup_log:23: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,GWAddress, -, 23 <0x2b783680>
50   10/06/16 8:33:21.192   luup_log:23: Arduino: Trying for a serial connection <0x2b783680>
01   10/06/16 8:33:21.193   luup_log:23: Arduino: Serial port not connected. First choose the serial port and restart the lua engine. <0x2b783680>
01   10/06/16 8:33:21.193   luup_log:23: Arduino: Choose the Serial Port <0x2b783680>

2) UI :

 If you connected the USB/serial device and it's not displayed here, reload Luup.
Not available

3) dmesg

As per dmesg command , the VeraLite is equipped with USB ACM Device

usb 2-1: new full speed USB device using rt3883-ohci and address 2
cdc_acm 2-1:1.0: ttyACM0: USB ACM device
usb 2-1: USB disconnect, address 2
usb 2-1: new full speed USB device using rt3883-ohci and address 3
usb 2-1: device descriptor read/64, error -62
hub 2-0:1.0: unable to enumerate USB device on port 1
usb 2-1: new full speed USB device using rt3883-ohci and address 4
cdc_acm 2-1:1.0: ttyACM0: USB ACM device
usb 2-1: USB disconnect, address 4
usb 2-1: new full speed USB device using rt3883-ohci and address 5
cdc_acm 2-1:1.0: ttyACM0: USB ACM device
usb 2-1: USB disconnect, address 5
usb 2-1: new full speed USB device using rt3883-ohci and address 6
cdc_acm 2-1:1.0: ttyACM0: USB ACM device


Note :  The Arduino UNO is plugged directly in the VeraLite USB connecteur , a powered USB Hub does not seem to be required as the power LED is ON

Any advice ?
« Last Edit: October 18, 2016, 06:23:59 pm by gerardosamara »
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Offline blacey

  • Full Member
  • ***
  • Posts: 220
  • Karma: +24/-1
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #1 on: October 06, 2016, 12:18:07 pm »
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #2 on: October 06, 2016, 12:28:10 pm »
Thanks @blacey , I followed the instructions from the link you pointed .

The proposed steps you proposed are not working unfortunately.

NOTE : Forgost to say that "Lua Startup Failure Can't Detect Device" is displayed on the MySensors plugin device
« Last Edit: October 06, 2016, 12:34:07 pm by gerardosamara »
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Online akbooer

  • Master Member
  • *******
  • Posts: 5472
  • Karma: +236/-69
  • "Less is more"
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #3 on: October 06, 2016, 12:36:27 pm »
Sounds like you're not running the plugin version from the UI7 branch?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #4 on: October 06, 2016, 01:05:04 pm »
Hi ,

I downloaded the 10 Arduino plugin files from the "Git Repo for UI7"  link of this page https://www.mysensors.org/controller/vera .
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Online akbooer

  • Master Member
  • *******
  • Posts: 5472
  • Karma: +236/-69
  • "Less is more"
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #5 on: October 06, 2016, 01:24:31 pm »
Looking at the file, L_Arduino.lua, from that branch, line #638 shows

Code: [Select]
luup.set_failure(false)

This may cause that error message, since, in their wisdom, Vera changed the calling syntax for this routine under UI7 to take a numeric parameter.

You may find that changing this line to

Code: [Select]
luup.set_failure(0)

will fix the problem.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #6 on: October 06, 2016, 02:43:27 pm »
Thanks akboer ,

I modified the D_Arduino.Lua file in line 636 (false->0) and also in line 501 ( true ->1) but still the device "MySensors Plugin" shows "Startup Lua failure" .

I have also deleted and recreated this Device but still the same
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Online akbooer

  • Master Member
  • *******
  • Posts: 5472
  • Karma: +236/-69
  • "Less is more"
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #7 on: October 06, 2016, 03:04:49 pm »
Ah. So that is different, now.  What errors show in the log file?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #8 on: October 06, 2016, 04:49:34 pm »
Here it is folowing a LUUP restart

Code: [Select]
50 10/06/16 14:44:14.239 luup_log:26: Arduino plugin: loading library L_Arduino ... <0x2c1b1680>
50 10/06/16 14:44:14.271 luup_log:26: Arduino plugin: library L_Arduino loaded <0x2c1b1680>
06 10/06/16 14:44:14.271 Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0x8b1120/NONE duplicate:0 <0x2c1b1680>
06 10/06/16 14:44:14.273 Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailureTime was: 1475778970 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c1b1680>
50 10/06/16 14:44:14.274 luup_log:26: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,PluginVersion, 1.5, 26 <0x2c1b1680>
50 10/06/16 14:44:14.275 luup_log:26: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,GWAddress, -, 26 <0x2c1b1680>
50 10/06/16 14:44:14.275 luup_log:26: Arduino: Trying for a serial connection <0x2c1b1680>
01 10/06/16 14:44:14.276 lu_io_connected 0x9f1f40 args 1 0x8ecde0 <0x2c1b1680>
01 10/06/16 14:44:14.276 luup_log:26: Arduino: Serial port not connected. First choose the serial port and restart the lua engine. <0x2c1b1680>
01 10/06/16 14:44:14.277 luup_log:26: Arduino: Choose the Serial Port <0x2c1b1680>
01 10/06/16 14:44:14.278 LuaInterface::CallFunction_Startup-2 device 26 function startup failed (null) with return false <0x2c1b1680>
06 10/06/16 14:44:14.279 Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0x8b1120/NONE duplicate:0 <0x2c1b1680>
06 10/06/16 14:44:14.279 Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailureTime was: 0 now: 1475786654 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c1b1680>
01 10/06/16 14:44:14.281 LuImplementation::StartLua running startup code for 26 I_Arduino1.xml failed <0x2c1b1680>
06 10/06/16 14:44:14.281 Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailureAlarm was: 1475782570,1 now: 1475786654,0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c1b1680>

VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #9 on: October 06, 2016, 05:48:20 pm »
From what I know, only Arduino boards with genuine FTDI serial chip (or fake ones with the same id) is recognised by Vera.

Offline blacey

  • Full Member
  • ***
  • Posts: 220
  • Karma: +24/-1
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #10 on: October 06, 2016, 08:03:45 pm »
@gerardosamara, that looks a lot like the problem I experience after loosing power to my Vera, including the latest Vera 3.  The steps I provided earlier, typically fix the problem and has worked for others.  I would give it another try since you have upgraded plugin.

FYI, the MySensors web-site has been updated to include these troubleshooting steps.

Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
Re: VeraLite <-> Arduino UNO : Serial port configuration fails
« Reply #11 on: October 06, 2016, 10:00:34 pm »
@blacey ,

Thanks for your support to help to solve my problem.

I attempted again with your method but unfortunately  I cannot setup the serial port ( the initial setup )

If the suspected cause is really an Arduino Uno  USB hardware ( USB ACM) which is not supported by the  VeraLite controller  , I will be interested  a confirmation from other users who tested with an Arduino UNO .


« Last Edit: October 06, 2016, 10:02:07 pm by gerardosamara »
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
FIXED : VeraLite <-> Arduino UNO : USB ACM Serial port configuration fails
« Reply #12 on: October 07, 2016, 07:46:30 pm »
Today I issued a support request to Vera who worked remotely to fix this serial configuration problem , as per the enclosed screenshot .... but I do not know what is the fix , and I have asked about it

Now the Device "plugin MySensors" show "Connected to : 31(115200) .

=> 31(115200) is the content of the variable GWAddress


EDIT : What the Vera support said that they synchronized the unit to recognize what is plug on its USB port.
« Last Edit: October 18, 2016, 06:38:52 pm by gerardosamara »
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
The fix installed by Vera support worked 1 day , now i am back at the beginning ( post#1).

I sent a mail today to Vera support for this serial gateway configuration problem.

VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP

Offline gerardosamara

  • Full Member
  • ***
  • Posts: 197
  • Karma: +5/-2
FIXED - VeraLite <-> Arduino UNO : USB ACM Serial port configuration fails
« Reply #14 on: October 18, 2016, 06:23:18 pm »
Today Vera worked remotely to fix again this serial configuration problem 

Some changes were done in the backend and now the serial port configuration looks fine even if you reload the engine.
The Arduino plugin was not starting because the port /dev/ttyUSB0 was used by a device created by the ALTUI plugin , a 3rd party plugin which is not developed by us.
The device created by the ALTUI plugin was removed and now the Arduino is properly detected by Vera.


Now the Device "plugin MySensors" show "Connected to : 31(115200) .

=> 31(115200) is the content of the variable GWAddress

Note : I have re-created the ALTUI device for the moment ( this a test VeraLite)
« Last Edit: October 19, 2016, 09:57:02 am by gerardosamara »
VeraLite+VeraEdge/EnOcean version US en UI7.1.17 + Vera Mobile UI7 V7.15.17.40 + Imperihome pro V2.8.3
Wall switch : Leviton VRS15 , Smart switch : Aeotec DSC24 , Motion sensor : Aeotec 4in1 DSB05 + Everspring HSP02 , Cameras Dlink 742L + Foscam 8910 + Foscam 9853EP