Mysensors - Domoticz windows - cant get connection

Moderator: leecollings

punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Mysensors - Domoticz windows - cant get connection

Post by punter9 »

Looking for a helping hand. I have the following (I am only about 3 hours into this so please be basic);

- Windows 10 PC with Domoticz latest release going

serial gateway
- Arduino Uno (real) with NRF24L01+ done just as shown on this website
http://www.mysensors.org/build/serial_gateway

First Sensor
-Arduino Uno (real) with NRF24L01+ done just as shown on this website (have a 135 instead of a MQ2 hooked up)
http://www.mysensors.org/build/gas

I hook up the gateway and set up hardware. I go to COM7 (where the gateway is) name it and add it. I see nothing confirming it is working. Thoughts?
I have the gas sensor across the room plugged in, nothing shows up in devices.

Am I missing a critical step here?

here is an image
https://www.amazon.com/clouddrive/share ... _link_copy
Attachments
1.png
1.png (200.23 KiB) Viewed 6097 times
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by Justintime »

Have you checked in the arduino serial window if everything is OK?

On both mysensors devices.

So no fail messages?

Be sure to set in the Domoticz settings window "allow new hardware devices" and then add the new hardware.

If you added the serial gateway. Do it again for the Node. You should see in the log that the node is accepted.
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

This sensor type is not (yet) supported, i have a patch, but i would like to double check everything before i commit it

But for now, please check with this application if all is correctly connected/received:

http://www.mysensors.org/controller/myscontroller
Quality outlives Quantity!
punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by punter9 »

well that tells you how green I am with this deal. I didn't think to check serial monitor outputs on the gateway. Turns out all I am getting is some weird characters, nothing intelligible. I am sure this is an issue. I am going to uninstall all my arduino related files and reinstall it with only the mysensors examples in it.

Thanks for the responses, and being polite to this noob.
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by Justintime »

punter9 wrote:well that tells you how green I am with this deal. I didn't think to check serial monitor outputs on the gateway. Turns out all I am getting is some weird characters, nothing intelligible. I am sure this is an issue. I am going to uninstall all my arduino related files and reinstall it with only the mysensors examples in it.

Thanks for the responses, and being polite to this noob.
If you get weird charactars.... be sure to set the baud rate at 115200.
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

Back on the OP topic, could you try version #2725 to see if the air quality sensor is working?
(almost complete rebuild of the mysensors support)

I also recommend (but you can do this later) to restart all nodes, as we now store the presentation types

later, i want to make a complete manager for the gui, or at least a good visible representation of the current nodes and child types

best to test first with the above application to do a second verification if all is working well,
what also works is to open the serial console in the arduino ide for logging
Quality outlives Quantity!
punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by punter9 »

Ok. Getting closer!

Baud rate was key. I have always used 9k baud for my home projects so I didn't think of that at all. Thank you!

I am getting this from the serial gateway.
0;0;3;0;9;gateway started, id=0, parent=0, distance=0
0;0;3;0;14;Gateway startup complete.

I am getting this from the sensor.
find parent
send: 105-105-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
find parent

nobody is finding anybody! Tips?

Also I erased my serial gateway and went to add it but it now no longer shows com port 7 (even though arduino IDE shows it on port 7 and uploads to it....) any suggestions here?
punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by punter9 »

okay I went into device manager and changed the com port from 7 to 2. Now Domoticz shows COM 2 but I am getting no indication it is actually obtaining any information from it. Image looks just like the one posted above except with com2 active. This is really weird.
punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by punter9 »

this seems very important from the domoticz log - note I switched from com 2 to com 7 again

2015-08-13 19:53:26.024 Error: MySensors: Error opening serial port!
2015-08-13 19:53:27.026 MySensors: retrying in 30 seconds...
2015-08-13 19:53:56.069 MySensors: Using serial port: COM2
2015-08-13 19:53:56.069 Error: MySensors: Error opening serial port!
2015-08-13 19:53:57.084 MySensors: retrying in 30 seconds...
2015-08-13 19:54:26.121 MySensors: Using serial port: COM2
2015-08-13 19:54:26.693 MySensors: Gateway Ready...
2015-08-13 19:56:04.585 Error: Serial Port closed!... Error: The I/O operation has been aborted because of either a thread exit or an application request
2015-08-13 19:56:05.297 MySensors: retrying in 30 seconds...
2015-08-13 19:56:34.749 MySensors: Using serial port: COM2
2015-08-13 19:56:35.623 MySensors: Gateway Ready...
2015-08-13 20:01:26.940 MySensors: Using serial port: COM7
2015-08-13 20:01:26.940 Error: MySensors: Error opening serial port!
2015-08-13 20:01:27.941 MySensors: retrying in 30 seconds...
2015-08-13 20:01:31.955 MySensors: Serial Worker stopped...
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

First try to get it working with the application from the third post
Quality outlives Quantity!
punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by punter9 »

I am working on it, not exactly sure how to use the program yet, but hey that is part of the fun! My knowledge before is writing code for stand alone plant watering, temp, etc. This whole inter arduino communication is all new to me!
punter9
Posts: 18
Joined: Thursday 13 August 2015 4:36
Target OS: Windows
Domoticz version:
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by punter9 »

success! All is working and my first sensor shows up in domoticz. Thanks for the help! Time to build out this dumbhouse!
Lyubomyr
Posts: 17
Joined: Saturday 05 December 2015 0:24
Target OS: Windows
Domoticz version: 3.4834
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by Lyubomyr »

How did You succeed?? I'm having troubles with MQ-2. It works fine with Arduino sketch that I've found in the reference link on Mysensors.org. It outputs data in Serial Monitor when I use sketch for domoticz, but Domotics doesn't see it. I mean that in LOG of Domoticz there is mentioned that Air quality sketch/module is present, but I don't see such sensor in the device list.
Please, help me.
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

did you enable 'accept new hardware sensors' in the settings page ?
Quality outlives Quantity!
Lyubomyr
Posts: 17
Joined: Saturday 05 December 2015 0:24
Target OS: Windows
Domoticz version: 3.4834
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by Lyubomyr »

Yes!
I suppose this is why I see Air Control in the Log.
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

Is it the sketch from the following link:

http://www.mysensors.org/build/gas
Quality outlives Quantity!
Lyubomyr
Posts: 17
Joined: Saturday 05 December 2015 0:24
Target OS: Windows
Domoticz version: 3.4834
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by Lyubomyr »

Yes, it is.
But I connected only three wires
Vcc ->5V
GND-> Ground
A0 -> A0
I left D0 pin of the sensor unconnected, since it works in the Arduino UDE.
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

Made a test sketch, and its working fine, make sure you are on one of the latest versions

Code: Select all

// Enable debug prints to serial monitor
#define MY_DEBUG 

// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69

#define MY_NODE_ID 253

#include <SPI.h>
#include <MySensor.h> 

#define CHILD_ID_GAS 0

unsigned long SLEEP_TIME = 30*1000; // Sleep time between reads (in milliseconds)

MyMessage msg(CHILD_ID_GAS, V_LEVEL);

void setup()  
{
}

void presentation() {
  // Send the sketch version information to the gateway and Controller
  sendSketchInfo("Test Gas Sensor", "1.0");

  present(CHILD_ID_GAS, S_AIR_QUALITY);  
}

void loop() { 

  int gasvalue=123;
  Serial.println(gasvalue);
  send(msg.set((long)ceil(gasvalue)));
 
  // Power down the radio.  Note that the radio will get powered back up
  // on the next write() call.
  sleep(SLEEP_TIME); //sleep for: sleepTime
}
Quality outlives Quantity!
Lyubomyr
Posts: 17
Joined: Saturday 05 December 2015 0:24
Target OS: Windows
Domoticz version: 3.4834
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by Lyubomyr »

Thank You.
The test sketch works perfectly!
User avatar
gizmocuz
Posts: 2484
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Mysensors - Domoticz windows - cant get connection

Post by gizmocuz »

Great, now hack your MQ-2 reading in it ;)
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests