FIXED - VeraLite <-> Arduino UNO : USB ACM Serial port configuration fails

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 eluup_log:23: Arduino: Serial port not connected. First choose the serial port and restart the lua engine.e <0x2b783680>
01 10/06/16 8:33:21.193 eluup_log:23: Arduino: Choose the Serial Porte <0x2b783680>

  1. UI :

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

  1. 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 ?

Assuming you followed the official Vera Controller install instructions then you might want to try the steps I posted on the MySensors forum

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

Sounds like you’re not running the plugin version from the UI7 branch?

Hi ,

I downloaded the 10 Arduino plugin files from the “Git Repo for UI7” link of this page https://www.mysensors.org/controller/vera .

Looking at the file, L_Arduino.lua, from that branch, line #638 shows

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

luup.set_failure(0)

will fix the problem.

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

Ah. So that is different, now. What errors show in the log file?

Here it is folowing a LUUP restart

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: eCommFailuree 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: eCommFailureTimee 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	elu_io_connected 0x9f1f40 args 1 0x8ecde0e <0x2c1b1680>
01	10/06/16 14:44:14.276	eluup_log:26: Arduino: Serial port not connected. First choose the serial port and restart the lua engine.e <0x2c1b1680>
01	10/06/16 14:44:14.277	eluup_log:26: Arduino: Choose the Serial Porte <0x2c1b1680>
01	10/06/16 14:44:14.278	eLuaInterface::CallFunction_Startup-2 device 26 function startup failed (null) with return falsee <0x2c1b1680>
06	10/06/16 14:44:14.279	Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: eCommFailuree 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: eCommFailureTimee was: 0 now: 1475786654 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c1b1680>
01	10/06/16 14:44:14.281	eLuImplementation::StartLua running startup code for 26 I_Arduino1.xml failede <0x2c1b1680>
06	10/06/16 14:44:14.281	Device_Variable::m_szValue_set device: 26 service: urn:micasaverde-com:serviceId:HaDevice1 variable: eCommFailureAlarme was: 1475782570,1 now: 1475786654,0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c1b1680>

From what I know, only Arduino boards with genuine FTDI serial chip (or fake ones with the same id) is recognised by Vera.

@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.

@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 .

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.

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.

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)

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules