Author Topic: Can't get MySensors Plugin to work  (Read 822 times)

Offline zang

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Can't get MySensors Plugin to work
« on: March 16, 2017, 12:54:14 pm »
So I just started playing around with Mysensors but I can't for the life of me get the plugin to work correctly.  I've built a gateway device and confirmed its on the network and listening on port 5003.

I'm running a Vera Plus UI7 1.7.2608

I have downloaded the MySensors plug in for Vera UI7 from here:
https://github.com/mysensors/Vera/tree/UI7

I have uploaded the two files:
D_Arduino1.json
D_Arduino1.xml
To the Vera under Apps --> Develop Apps --> Luup Files

I then click on "create device" under the Develop Apps section and enter D_Arduino1.xml in the "Upnp Device Filename" field and 192.168.0.20:5003 (the ip of my ESP) in the IP field and click Create Device.

I see the "MySensors Plugin" device show up under Devcies and it says "Connected to:" (nothing). If i click on the device and go into settings everything is blank:

Connected to:
Plugin Version:
Lib Version:

If i click on the "start" button I get a message right away "ERROR: Invalid Service". When I look at the luup logs on the Vera I see the following:

Code: [Select]
08      03/14/17 13:29:27.838   JobHandler_LuaUPnP::HandleActionRequest device: 33 service: urn:upnp-arduino-cc:serviceId:arduino1 action: StartInclusion <0x74769520>
08      03/14/17 13:29:27.838   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=33 <0x74769520>
08      03/14/17 13:29:27.839   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-arduino-cc:serviceId:arduino1 <0x74769520>
08      03/14/17 13:29:27.839   JobHandler_LuaUPnP::HandleActionRequest argument action=StartInclusion <0x74769520>
01      03/14/17 13:29:27.840   JobHandler_LuaUPnP::HandleActionRequest can't find urn:upnp-arduino-cc:serviceId:arduino1 <0x74769520>
02      03/14/17 13:29:27.840   JobHandler_LuaUPnP::RunAction device 33 action urn:upnp-arduino-cc:serviceId:arduino1/StartInclusion failed with 401/Invalid Service <0x74769520>

Am I missing something obvious? Any help is much appreciated.

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 748
  • Karma: +40/-7
Re: Can't get MySensors Plugin to work
« Reply #1 on: March 16, 2017, 09:01:24 pm »
You need all of these files uploaded for the plugin to work:

Code: [Select]
D_Arduino1.json
D_Arduino1.xml
D_ArduinoNode1.json
D_ArduinoNode1.xml
D_ArduinoRelay1.json
D_ArduinoRelay1.xml
I_Arduino1.xml
L_Arduino.lua
S_Arduino.xml
S_ArduinoNode.xml

Offline zang

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Can't get MySensors Plugin to work
« Reply #2 on: March 17, 2017, 10:15:33 am »
You need all of these files uploaded for the plugin to work:

Code: [Select]
D_Arduino1.json
D_Arduino1.xml
D_ArduinoNode1.json
D_ArduinoNode1.xml
D_ArduinoRelay1.json
D_ArduinoRelay1.xml
I_Arduino1.xml
L_Arduino.lua
S_Arduino.xml
S_ArduinoNode.xml

Ahhh you're right.  I don't know why I had it in my head that I only needed the first two.  Thanks!

Offline r-noxious

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +4/-42
Re: Can't get MySensors Plugin to work
« Reply #3 on: March 17, 2017, 10:54:24 am »
Mysensors is a great addition.

Offline zang

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Can't get MySensors Plugin to work
« Reply #4 on: March 17, 2017, 08:56:55 pm »
Alright, I made some progress.  After uploading ALL of the files to the Vera Plus I can now connect to the gateway.  So I went ahead and added code to my gateway which is connected to a DHT22 Temperature and Humidity sensor.  From what I've read I should just click on "start" to begin the inclusion process and the plugin should detect the node and create the devices in Vera?  That is not happening.

I've installed MYSController and connected it to the gw and I can see data coming in (see attached screen shot).  So this has me believing that my gw/sensor node is working correctly.

In the Vera logs I can see it receiving the data:

Code: [Select]
50      03/17/17 20:55:19.974   luup_log:34: Arduino: Set variable: 0;1;1;0;0;26.0 <0x739d1520>
50      03/17/17 20:55:19.986   luup_log:34: Arduino: Set variable: 0;0;1;0;1;23.5 <0x739d1520>

But I just don't understand how I get an actual device to show up.  Any thoughts?

Thanks!



Offline r-noxious

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +4/-42
Re: Can't get MySensors Plugin to work
« Reply #5 on: March 18, 2017, 10:26:15 am »
Did you configure the gateway inside the Vera UI?
 

Apps>develop apps>serial port configuration

Something like that.

Offline zang

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Can't get MySensors Plugin to work
« Reply #6 on: March 18, 2017, 12:36:07 pm »
My gateway is wifi.  I've added the gw by ip and I can see the Vera connect to it.   I just don't how to get my sensor to show up.

Offline r-noxious

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +4/-42
Re: Can't get MySensors Plugin to work
« Reply #7 on: March 18, 2017, 03:11:04 pm »
You'll have to wait for someone else to chime in.

Offline Newzwaver

  • Full Member
  • ***
  • Posts: 214
  • Karma: +4/-3
Re: Can't get MySensors Plugin to work
« Reply #8 on: March 18, 2017, 04:26:32 pm »
My gateway is wifi.  I've added the gw by ip and I can see the Vera connect to it.   I just don't how to get my sensor to show up.



What do you mean you can't get my sensor plugin to show up?  Do you have the main control plugin listed as a device?

Offline zang

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Can't get MySensors Plugin to work
« Reply #9 on: March 18, 2017, 05:10:46 pm »
I can see the plugin "device"  but no sensor device.

Offline mvader

  • Sr. Member
  • ****
  • Posts: 379
  • Karma: +29/-74
Re: Can't get MySensors Plugin to work
« Reply #10 on: March 18, 2017, 06:33:20 pm »
I can see the plugin "device"  but no sensor device.

you have to powerfail the sensor.. you can't just turn it on and leave it and then start inclusion.

verify vera connects to gateway.
press start on inclusion.
apply power to sensor.. you should then see them detected (sometimes takes a minute)
once you see them start showing up, let it do it's thing. it takes a minute to add the devices in vera

Offline zang

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Can't get MySensors Plugin to work
« Reply #11 on: March 18, 2017, 08:35:42 pm »

you have to powerfail the sensor.. you can't just turn it on and leave it and then start inclusion.

verify vera connects to gateway.
press start on inclusion.
apply power to sensor.. you should then see them detected (sometimes takes a minute)
once you see them start showing up, let it do it's thing. it takes a minute to add the devices in vera

The issue I have is my GW is also the sensor, which from what I've read is doable, but not what most people are doing.

Offline r-noxious

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +4/-42
Re: Can't get MySensors Plugin to work
« Reply #12 on: March 18, 2017, 09:54:47 pm »
You could start off with a simpler set up. A wired connection and separate sensors.

I had zero issues getting up and running.

The mysensors forum may have some more advice for you. There's a section dedicated to Vera.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5103
  • Karma: +220/-67
  • "Less is more"
Re: Can't get MySensors Plugin to work
« Reply #13 on: March 19, 2017, 02:53:31 am »
Can you capture a longer section of log which shows the plugin sending an include command, and the subsequent gateway response when you cycle the power on the sensor?
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.