Author Topic: Mysensors 2.1 on Vera UI7 - unable to create sensor devices  (Read 552 times)

Offline pls90

  • Full Member
  • ***
  • Posts: 214
  • Karma: +1/-0
Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« on: April 23, 2017, 07:12:39 am »
After moving all my devices from my Vera light UI5 to a Vera Plus with UI7 yesterday I flashed my controller that was working fine on ui5 with the latest mysensors software 2.1.
I created a MySensor plugin device but seem to be unable to enter inclusion mode. A simple light level node is not included.
This is in the log
Code: [Select]
JobHandler_LuaUPnP::HandleActionRequest device: 202 service: urn:upnp-arduino-cc:serviceId:arduino1 action: StartInclusion <0x7057a520>
JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=202 <0x7057a520>
JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-arduino-cc:serviceId:arduino1 <0x7057a520>
JobHandler_LuaUPnP::HandleActionRequest argument action=StartInclusion <0x7057a520>
luup_log:202: Arduino: Sending: 0;0;3;0;5;1 <0x77270320>
<Job ID="19" Name="" Device="202" Created="2017-04-21 22:18:22" Started="2017-04-21 22:18:22" Completed="2017-04-21 22:18:22" Duration="0.1657000" Runtime="0.1329000" Status="Successful" LastNote=""/> <0x77270320>
IOPort::Run RecvFailed 131 close 23 <0x6fff7520>

To make sure there was no problem with the gw I built a completely new gw module (uno with 5100 shield) with a diferent IP address and mac address.
Changed ip settings in the vera plugin.
reloaded luup engine.
No errors in lua startup, but still the same problem with inclusion mode.

The debug output from gw seems to be fine:

output on startup of the gw:
Code: [Select]
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.2.155
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1

output when I start inclusion mode from vera ui
Code: [Select]
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.2.155
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1

output when I stop inclusion from vera ui
Code: [Select]
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.2.155
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1

The goog thing is: Vera IS communicating with the gw.

This is the output after starting inclusion mode from vera gui and powering up a new node (measuring light level).
Code: [Select]
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSF:MSG:BC
0;255;3;0;9;TSF:MSG:FPAR REQ,ID=1
0;255;3;0;9;TSF:CKU:OK,FCTRL
0;255;3;0;9;TSF:MSG:GWL OK
0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.2.155
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1

So the light level node is also talking to the gw!
I assume the problem is on the vera/ plugin side.
The mysensors plugin device on Vera UI7 shows only the plugin version, the line for lib is empty.
I used the latest UI7 branch files for creating the plugin.

Is anyone successfully using a ethernet gw with Mysensors lib 2.1 on Vera UI7?
Any pointers are highly appreciated, thank you.

Offline Cor

  • Hero Member
  • *****
  • Posts: 1105
  • Karma: +4/-4
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #1 on: April 23, 2017, 05:12:27 pm »
I couldn't get it working as well. 
With 1.5 under UI7 no problem.

Cor

Offline mvader

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +29/-74
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #2 on: April 23, 2017, 06:06:15 pm »
i'm using a 1.5 vera plugin on UI7
with a 2.0 lib gateway (on an rpi)
that is working.

Offline pls90

  • Full Member
  • ***
  • Posts: 214
  • Karma: +1/-0
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #3 on: April 24, 2017, 09:48:04 am »
@Cor
does 1.5 relate to the mysensors lib version?
@mvader
may I ask which dev branch of the plugin you are using? ui7 I presume.
I wonder if downgrading to 2.0 lib would do the trick

Offline mvader

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +29/-74
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #4 on: April 24, 2017, 01:16:41 pm »
my arduino gw was unreliable. so i wanted to move to to a RPI.
i used the 2.0 lib at the time.
I had intended to updated my devices with 2.0 but the 1.5 code seems to be working just fine.
so you know, if aint broke.
thus, since all is well I've not moved to the 2.1 code.
my vera plugin says 1.5 and i am on UI7

so yeah maybe try the 2.0 lib and see if that helps, it is working fine for me

Offline pls90

  • Full Member
  • ***
  • Posts: 214
  • Karma: +1/-0
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #5 on: April 24, 2017, 04:09:54 pm »
comes quite in handy when you have a spare pi lying around 8-)
so I built the pi version of the gateway.
Now I can see both the plugin version and the lib version in the plugin device on Vera.
Alas, there seems to be the same problem with inclusion mode.
Additionally, gw and sensor seem to be unable to communicate.

When I restart the sensor node this is it's debug output
Code: [Select]
2125 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
4151 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=OK:2.1.0
4165 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
7856 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=16,sg=0,ft=0,st=NACK:Light Lux Sensor
9547 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=1,st=NACK:1.0
11237 !TSF:MSG:SEND,1-1-0-0,s=0,c=0,t=16,pt=0,l=0,sg=0,ft=2,st=NACK:
11243 MCO:REG:REQ
12929 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=3,st=NACK:2
16617 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=4,st=NACK:2
20307 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=5,st=NACK:2
20316 !TSM:READY:UPL FAIL,SNP
20318 TSM:FPAR
22001 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=6,st=OK:
22317 !TSF:SND:TNR
24010 !TSM:FPAR:NO REPLY
24012 TSM:FPAR
25696 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
27705 !TSM:FPAR:NO REPLY
27707 TSM:FPAR
29390 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
31401 !TSM:FPAR:NO REPLY
31404 TSM:FPAR
33087 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
35096 !TSM:FPAR:FAIL
35098 TSM:FAIL:CNT=1
35100 TSM:FAIL:PDT

On the gw side I did the test as suggested, output looked exactly as it should.

When I tried to look at the debug output again I only got
Code: [Select]
mysgw: accept: Bad file descriptor

I then tried the alternate wiring using the interrupt pin and reconfigured, same result.

Offline mvader

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +29/-74
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #6 on: April 24, 2017, 06:39:53 pm »
yeah looks as you said. i think for faster troubleshooting, you should try posting the mysensors forum. lots of smart ppl over there who can probably fix you up..

Offline pls90

  • Full Member
  • ***
  • Posts: 214
  • Karma: +1/-0
Re: Mysensors 2.1 on Vera UI7 - unable to create sensor devices
« Reply #7 on: April 24, 2017, 11:51:55 pm »
will do. thank you!