I'm stuck with My first MySensor

Moderator: leecollings

Post Reply
pbrink
Posts: 5
Joined: Wednesday 04 February 2015 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

I'm stuck with My first MySensor

Post by pbrink »

After playing around with EasyESP, I'm now diving into the world of MySensor. And very excided about it it. But at this point I'm stuck (in a very final state :? ). I feel that I'm missing an obious step, but can't find it on the forums and with google :).

My current setup is;
ESP My Sensor gateway, running successful; verified with a telnet session and also connected with Domiticz log shows successful connect after adding hardware.

Switch sentor; Working correctly, serial output shows transmission and also the gateway receives the command

SEND BY SENSOR

Code: Select all

send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
RECEIVED BY GATEWAY

Code: Select all

;Gateway startup complete.
                                    255;255;3;0;3;
                                                  255;255;3;0;3;
                                                                255;255;3;0;3;

Now I can't figure out how I get this switch into domoticz, I've enabled accept new sensors. I even tried Switches -> Learn and than trigger.

If I go to the MySensor Gateway Hardware Settings I see no Nodes, and I can't figure out if I need to add nodes.. Or are they added automatically?

Any help is appreaciated. I feel that I'm very close, but missing the final piece in the puzzle :geek:
D'rMorris
Posts: 138
Joined: Thursday 01 May 2014 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands - Sittard
Contact:

Re: I'm stuck with My first MySensor

Post by D'rMorris »

If your sketch is working on your device, then you should see the device in Setup --> Hardware --> Click on Setup next to the MySensors hardware.
You should see the nodes that reported to the gateway there. Since you do not see it, I would double check the sketch.

I have also one issue with a MySensors sensor: all my sensors appear in the hardware section (and also in the unused devices under Setup --> Devices --> Not used) except for 1 sensor.
I see it in hardware, but a device is never added. I expect that the sensor does not send the data correctly. The sensor is only added from the first successful data transfer onwards.
So, if you connected a wire incorrect to the Arduino board, the sensor will report itself to Domoticz (you can see it in hardware), but a device is never added.
pbrink
Posts: 5
Joined: Wednesday 04 February 2015 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: I'm stuck with My first MySensor

Post by pbrink »

@D'rMorris, thanks for the reply.

The sketch is fine, It's a clear copy of the switch/button/window sensor code.

I did notice something strange, the wifigateway reboots after connecting Domoticz to it. This is what I did;
1. Connect with telnet session to gateway
2. Verify that when I trigger the sensor the gateway receives the transmission (see code in start topic).
3. Remove hardware; Mysensor LAN interface in domoticz
4. Add hardware; Mysensor LAN interface in domoticz
After step 4 (adding the hardware) the gateway startup is again initiated and the telnet session is lost.

Code: Select all

0;3;0;14;Gateway startup complete.
In Domoticz log I can see the following information

Code: Select all

2015-12-17 12:49:20.542 MySensors: trying to connect to: 192.168.0.113:5003
2015-12-17 12:49:21.545 MySensors: connected to: 192.168.0.113:5003
Is this normal behavior? It is weird because also after a reboot of domoticz the gateway restarts. This might be the reason that Domoticz doesn't see any nodes, because there is no connection.

Does Domoticz write something in the log file if the connection to the LAN gateway is lost?
D'rMorris
Posts: 138
Joined: Thursday 01 May 2014 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands - Sittard
Contact:

Re: I'm stuck with My first MySensor

Post by D'rMorris »

Good question about the log. I only have experience with the serial gateway variant, not the LAN one. You do not have a serial gateway variant laying around?
They're very cheap at aliexpress, so you could build a serial gateway and test with that to rule out the sketch?
pbrink
Posts: 5
Joined: Wednesday 04 February 2015 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: I'm stuck with My first MySensor

Post by pbrink »

Yes, I just build a USB serial gateway and everything works fine than. Atleast I know that the issue is in the wireless gateway.

Still this issue might be Domoticz related. I can connect with multiple telnet sessions to the gateway without the restart, but as soon as Domoticz connects I lose the connection to the gateway.

There is another difference between the serial and the lan gateway. If I look at Domoticz harware I can see the mySensor version number for the USB gateway the LAN gateway shows '?' .

Anyone here that uses the Wireless Gateway with domoticz?
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: I'm stuck with My first MySensor

Post by gizmocuz »

I had the serial gateway for a long time -> working

now i loaded the mysensors.org ethernet gateway in an arduino mega with the WS5100, running for over a month also ok

no experience with espEasy, only with real arduino's

Looking at your first log, it seems there is no line ending (\n) only a line feed (\r), maybe this is a problem?
Ps. using mysensors 1.6 at the moment
Quality outlives Quantity!
pbrink
Posts: 5
Joined: Wednesday 04 February 2015 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: I'm stuck with My first MySensor

Post by pbrink »

Oke, I'll keep using the serial for know.. The downside of that my sensors on the attic are out of reach.

I don't think this problem is Domoticz related, I've found others that have simulair problems. I'll wait till a new version of MySensor.
http://forum.mysensors.org/topic/2328/e ... connects/8

I'm still using version 1.5, this issue might be fixed with 1.6. But for know I'm so new to MySensor that I rather spend my time building and testing some sensors, I'll upgrade to 1.6 after I finalize some sensors (and know what sensors I want to build).

Thanks for all the advice (and for Domoticz, it's truly a great domotica platform 8-) )!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest