ESP8266 WiFi gateway issue
-
@hek, with \n
MySensors is implemented in domoticz for a long time now... there should be nothing wrong with it.....Also in my sketches all is received perfectly
Could there be a difference between the ESP8266 and nRF ?
I only use the nRF currently (and probably will for ever as i have 20 more chips and a lot more arduino's g)Also i do not send anything with the word version in it, it looks this is a left over from sending the sketch information ?
I dont know how you guys get that nice colors in the log (brown/white/green), but the green number is OK, that white behind it is not
-
I made a Serial Gateway and updated Domoticz to latest beta, and this is the output from the same sensor.
0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=1,sg=0,st=ok:7 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=1,sg=0:7 2;1;1;1;3;7 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:14 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:14 2;1;1;1;3;14 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:21 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:21 2;1;1;1;3;21 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:29 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:29 2;1;1;1;3;29 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:36 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:36 2;1;1;1;3;36 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:43 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:43 2;1;1;1;3;43 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:50 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:50 2;1;1;1;3;50 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:57 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:57 2;1;1;1;3;57 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:64 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:64 2;1;1;1;3;64 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:71 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:71 2;1;1;1;3;71 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:79 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:79 2;1;1;1;3;79 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:86 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:86 2;1;1;1;3;86 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:93 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:93 2;1;1;1;3;93 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=3,sg=0,st=ok:100 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=3,sg=0:100 2;1;1;1;3;100All OK
-
Could you try replacing this in MySensors/core/MyGatewayTransportEthernet.cpp
bool _readFromClient(uint8_t i) { while (clients[i].connected() && clients[i].available()) { char inChar = clients[i].read(); if (inputString[i].idx < MY_GATEWAY_MAX_RECEIVE_LENGTH - 1) { // if newline then command is complete if (inChar == '\n') { // a command was issued by the client // we will now try to send it to the actuator // echo the string to the serial port debug(PSTR("Client %d: %s\n"), i, inputString[i].string); // add string terminator and clear the string: inputString[i].string[inputString[i].idx] = 0; inputString[i].idx = 0; bool ret = protocolParse(_ethernetMsg, inputString[i].string); if (ret) { return ret; } } else { // add it to the inputString: inputString[i].string[inputString[i].idx++] = inChar; } } else { // Incoming message too long. Throw away debug(PSTR("Client %d: Message too long\n"), i); inputString[i].idx = 0; // Finished with this client's message. Next loop() we'll see if there's more to read. break; } } return false; }And let me know how it behaves.
-
It's much better now. I can control dimmer from the domoticz. :)
0;0;3;0;9;Client 0 connected 0;0;3;0;9;Client 0: 0;0;3;0;2;Get Version 0;0;3;0;2;Get Version 0;0;3;0;9;read: 2-2-0 s=255,c=0,t=17,pt=0,l=10,sg=0:1.6.0-beta 0;0;3;0;9;read: 2-2-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0 0;0;3;0;9;Client 0: 2;255;3;0;6;M Version 2;255;3;0;6;M 0;0;3;0;9;send: 0-0-2-2 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M 0;0;3;0;9;read: 2-2-0 s=1,c=0,t=4,pt=0,l=0,sg=0: 0;0;3;0;9;read: 2-2-0 s=255,c=3,t=11,pt=0,l=21,sg=0:DimmableLED /w bu 0;0;3;0;9;read: 2-2-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.2 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=1,l=1,sg=0:100 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=1,l=1,sg=0,st=ok:100 0;0;3;0;9;Client 0: 2;1;1;1;3;93M 2;1;1;1;3;93 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:93 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:93 0;0;3;0;9;Client 0: 2;1;1;1;3;86 2;1;1;1;3;86 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:86 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:86 0;0;3;0;9;Client 0: 2;1;1;1;3;79 2;1;1;1;3;79 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:79 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:79 0;0;3;0;9;Client 0: 2;1;1;1;3;71 2;1;1;1;3;71 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:71 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:71 0;0;3;0;9;Client 0: 2;1;1;1;3;64 2;1;1;1;3;64 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:64 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:64 0;0;3;0;9;Client 0: 2;1;1;1;3;57 2;1;1;1;3;57 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:57 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:57 0;0;3;0;9;Client 0: 2;1;1;1;3;50 2;1;1;1;3;50 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:50 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:50 0;0;3;0;9;Client 0: 2;1;1;1;3;43 2;1;1;1;3;43 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:43 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:43 0;0;3;0;9;Client 0: 2;1;1;1;3;36 2;1;1;1;3;36 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:36 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:36 0;0;3;0;9;Client 0: 2;1;1;1;3;36 2;1;1;1;3;36 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:36 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:36 0;0;3;0;9;Client 0: 2;1;1;1;3;29 2;1;1;1;3;29 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:29 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:29 0;0;3;0;9;Client 0: 2;1;1;1;3;21 2;1;1;1;3;21 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:21 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:21 0;0;3;0;9;Client 0: 2;1;1;1;3;14 2;1;1;1;3;14 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=2,sg=0,st=ok:14 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=2,sg=0:14 0;0;3;0;9;Client 0: 2;1;1;1;3;74 2;1;1;1;3;7 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=0,l=1,sg=0,st=ok:7 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=0,l=1,sg=0:7 0;0;3;0;9;Client 0: 2;1;1;1;2;0 2;1;1;1;2;0 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=2,pt=0,l=1,sg=0,st=ok:0 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=2,pt=0,l=1,sg=0:0 0;0;3;0;9;read: 2-2-0 s=1,c=1,t=3,pt=2,l=2,sg=0:0 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:0 -
-
I don't know if i understan you right here, @Hek
if i like to use the start button in vera should it look like this
// Enable inclusion mode
define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
#define MY_INCLUSION_MODE_BUTTON_PIN 3 -
Hmm. ok so message reaches gateway. Good start. It should reply back to Vera. with a
0;0;3;0;5;1Unfortunately there is no debug log for this in the code. So I can't see if the message is sent to your controller. So either you'll have to look in the Vera log or add a
Serial.println(_ethernetMessage);To see that the message is actually sent back to vera.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
