Vera Inclusion Not Working
Newbie. Please be gentle.
First off a BIG thank you to hek and all of those involved with this. I wrote my own JSON webservice interface to my Arduino sensors and relays. I recently bought a Vera Lite and decided to incorporate my Arduino JSON webservice...and then I came across this. You've saved me countless hours and perhaps even saved my marriage.
I've added the MySensors USB gateway to my Vera Lite. In Devices I see the MySensors plugin along with the Start and Stop inclusion buttons. When I press on the Start button, nothing seems to happen. The button does not stay highlighted, nor does my sensor (motion) appear after restarting it within the 60 second default time frame. I tried adding a momentary button and still nothing seems to happen when I attempt to include the sensor. Should I expect the Start button to be highlighted and/or a message to appear in the message window at the top of the Vera interface page?
I have the latest release of the Vera firmware (1.6.641). The MySensors plug in version is 1.3.
"MySensors - The Marriage Saver" - our new slogan.
I wonder if your Vera really has contact with the Arduino?
You're really using an Arduino Nano? What does the debug prints say when you have the gateway attached to your PC? Do you know how to look in the Vera logs?
When I first started I already had my device powered up then tried to include it. Make sure it is not powered before you press the inclusion button in Vera
@hek Love the new slogan, although I'm sure some of our spouses may disagree. I am using a Nano for the gateway. I wasn't even aware that there were logs (thanks!), but based upon your questions, I suspect the problem may be that I had an Insteon gateway connected to the Vera's USB port and simply swapped it out for the Arduino gateway. Perhaps leaving the Insteon gateway configured in Vera is the cause of my problem. I'll still need the Insteon gateway...because, after all, a man can't have too many gateways. A powered USB hub should arrive tomorrow which will allow me to use both simultaneously. An unpowered USB hub didn't solve my issue (no surprise). I'll test again once the new powered hub arrives. I'll dive into the logs if the new hub doesn't do the trick.
@petewill - I did have the sensor powered up when I clicked the Start button but recycled power within the default inclusion time of 60 seconds. Could there be an issue with having it powered up at the time the Start button was pressed even though it was powered down and up shortly afterwards, or was your issue related to not recycling the power within the inclusion time frame?
Can anyone confirm whether there is a visual indicator within the Vera UI during the inclusion period (i.e. Highlighted Start button, message at the top of the screen, etc.)?
You should see that inclusion mode has started on the vera buttons.
I don't think there would be an issue cycling the power but I'm no expert. It has taken up to 30 seconds to pick up the sensors on occasion. I usually press start in Vera then power up the sensor. You should see that sensors are being found in the gateway.
I tried the powered USB hub and still no luck.
The Vera logs shows the following. The last two lines are in red. Does this mean they are failing?
50 04/05/14 12:13:04.195 luup_log:49: Arduino: Trying for a serial connection <0x2bf61680>
50 04/05/14 12:13:04.196 luup_log:49: Arduino: Serial port is connected <0x2bf61680>
50 04/05/14 12:13:04.196 luup_log:49: Arduino: Baud is 115200 <0x2bf61680>
50 04/05/14 12:13:04.198 luup_log:49: Arduino: Sending: 0;0;4;4;Get Version <0x2bf61680>
01 04/05/14 12:13:31.119 FileUtils::ReadURL 28/resp:0 size 1 http://192.168.1.7/get_status.cgi LEAK this:81920 start:278528 to 0xdc6000 <0x2bf61680>
01 04/05/14 12:13:46.136 FileUtils::ReadURL 28/resp:0 size 1 http://192.168.1.7/cgi-bin/get_status.cgi <0x2bf61680>
I'm using UI6. Could that be the problem?
The plugin has not yet been verified on UI6.
What does your Arduino Nano (<- important) Gateway say when you plug it into your computer and look at the serial output? Did you turn on debug prints when uploading SerialGateway sketch?
In the serial window I'm getting "0;0;ô" followed by several "à" characters.
In the Arduino IDE, I'm seeing this in the bottom window:
Error inside Serial.serialEvent()
java.io.IOException: Bad file descriptor in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort.eventLoop(Native Method)
I am using an Arduino Nano v3.0.
Malx last edited by
You must set the right baudrate in serial window, otherwise you will only get garbage.
@Malx Thanks. I checked the baud rate in the Serial Window. It is set to 115200.
I've checked it on a fresh Arduino IDE install and I'm not seeing anything in the Serial Window. I've uncommented the debug line in config.h. If the Serial Gateway is working properly, should I see messages in the Serial Window?
Is anyone using MySensors with UI6?
I switched to the Ethernet Gateway and I'm now able to see that the Inclusion mode is starting. The start button is highlighted and stays in Inclusion mode for 60 seconds. I haven't yet been able to get it to include a sensor and I'm seeing the following in the Vera log files:
0 04/15/14 9:09:04.140 luup_log:55: Arduino plugin: library L_Arduino loaded LEAK this:57344 start:57344 to 0x928000 <0x2c001680>
50 04/15/14 9:09:04.140 luup_log:55: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,PluginVersion, 1.3, 55 <0x2c001680>
50 04/15/14 9:09:04.141 luup_log:55: Arduino: Using network connection: IP address is 192.168.1.77:5003 <0x2c001680>
50 04/15/14 9:09:04.243 luup_log:55: Arduino: Sending: 0;0;4;4;Get Version <0x2c001680>
50 04/15/14 9:09:04.256 luup_log:55: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,ArduinoLibVersion, 1.2+, 55 LEAK this:24576 start:81920 to 0x92e000 <0x2e801680>
01 04/15/14 9:09:04.647 FileUtils::ReadURL 0/resp:404 ERROR:Resource doesn't exist size 29 https://us-device12.mios.com/device/device/device/35021529/kit LEAK this:73728 start:155648 to 0x940000 <0x2c001680>
01 04/15/14 9:09:04.650 JobHandler_LuaUPnP::DoFetchKits server: us-device12.mios.com error:404 unable to parse: (null) <0x2c001680>
01 04/15/14 9:09:05.027 FileUtils::ReadURL 0/resp:404 ERROR:Resource doesn't exist size 29 https://us-device11.mios.com/device/device/device/35021529/kit LEAK this:135168 start:290816 to 0x961000 <0x2c001680>
01 04/15/14 9:09:05.029 JobHandler_LuaUPnP::DoFetchKits server: us-device11.mios.com error:404 unable to parse: (null) <0x2c001680>
08 04/15/14 9:10:29.251 JobHandler_LuaUPnP::HandleActionRequest device: 55 service: urn:upnp-arduino-cc:serviceId:arduino1 action: StartInclusion LEAK this:69632 start:360448 to 0x972000 <0x2ec01680>
The 6th through 9th line are showing errors. Can anyone point me in the right direction?
The errors is not related to Arduino plugin.
You seem to receive the version from your arduino (which means that communication between vera<->gw is working).
Please check the troubleshoot guide and post sensor debug logs for further assistance.
Are you using the capacitors on the radios?
@HEK I went through the troubleshoot guide.
I am using the latest version of the MySensors library. The plugin version does not match the library version (Plugin Version 1.3 vs. Lib Version 1.2+). My understanding based upon another post, is that this discrepancy should be fine.
I've triple-checked the radio wiring.
I have not tried adding a decoupling capacitor.
I am not using an amplified version of the NRF24L01+ chip.
Below is a copy of the sensor debug logs:
These three lines appear about every second:
Relaying message back to gateway.
Ack: receive timeout
These two lines appear every 10 seconds:
No relay nodes was found. Trying again in 10 seconds.
@BULLDOGLOWELL I haven't tried the capacitors yet. I'll order some and give it a try. FWIW, I have the radios within a few feet of each other.
If there's anything else you can suggest, I'd greatly appreciate it.
While waiting for the capacitors you can always try to switch radio (if you got the 10-pack) to rule out HW failure.
Which type of Arduino are you using for the sensor side? And what type of regulator (if any)?
@hek That was it. I swapped the radio and all is well. Thank you for your patience HEK!
If you try the "broken" radio with a capacitor it will probably work fine.