Odd error on MySensors S_RGB_LIGHT

I keep getting the following errors when attempting to get a RGB Strip controller linked to HomeAssistant:

2018-05-07 12:53:44 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 11;0;1;0;40;000000
11;0;1;0;2;0

2018-05-07 12:53:44 ERROR (Thread-23) [mysensors] Not a valid message: Not valid message sub-type: 40 for dictionary value @ data['sub_type']
2018-05-07 12:53:44 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 11 child 0
2018-05-07 12:53:44 DEBUG (Thread-23) [homeassistant.components.mysensors] No child values for node 11 child 0
2018-05-07 12:53:44 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 11 child 0
2018-05-07 12:53:44 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0'}: light platform: node 11 child 0: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-07 12:53:44 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 11;0;1;0;3;255
11;0;1;0;24;1

2018-05-07 12:53:44 WARNING (Thread-23) [mysensors] Not a valid message: value must be integer between 0 and 100 for dictionary value
2018-05-07 12:53:44 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 11 child 0
2018-05-07 12:53:44 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {24: '1', 2: '0'}: light platform: node 11 child 0: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-07 12:53:49 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 0;255;3;0;2;

When I look at the serial API, type 40 is the V_RGB string itā€™s complaining about. Which I do send:

MyMessage rgbStripMsg(CHILD_ID_RGB_STRIP, V_RGB);
MyMessage rgbStripLightMsg(CHILD_ID_RGB_STRIP, V_LIGHT);
MyMessage rgbStripDimmerMsg(CHILD_ID_RGB_STRIP, V_DIMMER);
MyMessage rgbStripModeMsg(CHILD_ID_RGB_STRIP, V_CUSTOM);

snipps:

char rgbstring[7] = "000000";
bool stateOn = false;
byte brightness = 255;
String effectString = "solid";

void presentation()  
{ 
  // Send the sketch version information to the gateway
  sendSketchInfo(SKETCH_NAME, SKETCH_MAJOR"."SKETCH_MINOR);

  present(CHILD_ID_RGB_STRIP, S_RGB_LIGHT,"RGB Strip");
  present(CHILD_ID_RGB_STRIP_FX, S_CUSTOM, "RGB Strip FX");
}

void sendState()
{
  send(rgbStripMsg.set(rgbstring));
  send(rgbStripLightMsg.set(stateOn));
  send(rgbStripDimmerMsg.set(brightness));
  send(rgbStripModeMsg.set((String)effectString));  
}

void loop()
{
  static bool first_message_sent = false;
  if (first_message_sent == false)
  {
    selftest();
    sendState();
    first_message_sent = true;    
  }
}

Anyone have any ideas? @martinhjelmare
Thanks.

Debugs:

2018-05-08 11:35:14 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 6;1;1;0;2;0
6;1;1;0;3;0
6;1;1;0;40;000000
6;2;1;0;48;1

2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 6 child 1
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0'}: light platform: node 6 child 1: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-08 11:35:14 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('6;1;1;0;2;0',), {}) took 0.211 seconds
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 6 child 1
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0', 3: '0'}: light platform: node 6 child 1: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-08 11:35:14 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('6;1;1;0;3;0',), {}) took 0.246 seconds
2018-05-08 11:35:14 ERROR (Thread-23) [mysensors] Not a valid message: Not valid message sub-type: 40 for dictionary value @ data['sub_type']
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 6 child 1
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0', 3: '0'}: light platform: node 6 child 1: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-08 11:35:14 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('6;1;1;0;40;000000',), {}) took 0.206 seconds
2018-05-08 11:35:14 ERROR (Thread-23) [mysensors] Not a valid message: Not valid message sub-type: 48 for dictionary value @ data['sub_type']
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 6 child 2
2018-05-08 11:35:14 DEBUG (Thread-23) [homeassistant.components.mysensors] No child values for node 6 child 2
2018-05-08 11:35:14 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-05-08 11:35:14 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('6;2;1;0;48;1',), {}) took 0.194 seconds

From the node:

TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
TSF:MSG:READ,0-0-6,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
TSF:MSG:SEND,6-6-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
TSF:MSG:READ,0-0-6,s=255,c=3,t=6,pt=0,l=1,sg=0:I
TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=0,st=OK:RGB Strip Controler
TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:0.1
TSF:MSG:SEND,6-6-0-0,s=1,c=0,t=26,pt=0,l=9,sg=0,ft=0,st=OK:RGB Strip
TSF:MSG:SEND,6-6-0-0,s=2,c=0,t=23,pt=0,l=12,sg=0,ft=0,st=OK:RGB Strip FX
MCO:REG:REQ
TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
TSF:MSG:READ,0-0-6,s=255,c=3,t=27,pt=1,l=1,sg=0:1
MCO:PIM:NODE REG=1
MCO:BGN:STP
MySensors Node Setting up...
... complete!
MCO:BGN:INIT OK,TSP=1
TSF:MSG:SEND,6-6-0-0,s=1,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:0
TSF:MSG:SEND,6-6-0-0,s=1,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=OK:0
TSF:MSG:SEND,6-6-0-0,s=1,c=1,t=40,pt=0,l=6,sg=0,ft=0,st=OK:000000
TSF:MSG:SEND,6-6-0-0,s=2,c=1,t=48,pt=1,l=1,sg=0,ft=0,st=OK:1

and the JSON generated:

{"0": {"battery_level": 0, "sketch_version": "0.5", "children": {}, "type": 18, "protocol_version": "2.2.0", "sketch_name": "MySensors Ethernet Gatewa", "sensor_id": 0}, "1": {"battery_level": 0, "sketch_version": "0.1", "children": {"1": {"id": 1, "description": "RGB Strip", "values": {}, "type": 26}}, "type": 17, "protocol_version": "2.1.1", "sketch_name": "RGB Strip Controler", "sensor_id": 1}, "2": {"battery_level": 0, "sketch_version": "0.5", "children": {"0": {"id": 0, "description": "Humidity", "values": {"1": "19.7"}, "type": 7}, "1": {"id": 1, "description": "Temperature", "values": {"0": "85.6"}, "type": 6}, "2": {"id": 2, "description": "Motion Sensor", "values": {"16": "0"}, "type": 1}, "3": {"id": 3, "description": "Light Level", "values": {"23": "69"}, "type": 16}, "6": {"id": 6, "description": "TX RSSI", "values": {"48": "-256"}, "type": 23}, "7": {"id": 7, "description": "RX RSSI", "values": {"48": "-78"}, "type": 23}, "8": {"id": 8, "description": "Uplink Quality RSSI", "values": {"48": "0"}, "type": 23}}, "type": 17, "protocol_version": "2.2.0", "sketch_name": "MultiSensor (Feather)", "sensor_id": 2}, "3": {"battery_level": 0, "sketch_version": "0.5", "children": {"0": {"id": 0, "description": "Humidity", "values": {"1": "22.9"}, "type": 7}, "1": {"id": 1, "description": "Temperature", "values": {"0": "73.2"}, "type": 6}, "2": {"id": 2, "description": "Motion Sensor", "values": {"16": "0"}, "type": 1}, "6": {"id": 6, "description": "TX RSSI", "values": {"48": "-256"}, "type": 23}, "7": {"id": 7, "description": "RX RSSI", "values": {"48": "-43"}, "type": 23}, "8": {"id": 8, "description": "Uplink Quality RSSI", "values": {"48": "0"}, "type": 23}, "9": {"id": 9, "description": "Battery Voltage", "values": {"38": "3.8"}, "type": 30}}, "type": 17, "protocol_version": "2.2.0", "sketch_name": "MultiSensor (Feather)", "sensor_id": 3}, "4": {"battery_level": 0, "sketch_version": "0.5", "children": {"0": {"id": 0, "description": "Humidity", "values": {"1": "20.4"}, "type": 7}, "1": {"id": 1, "description": "Temperature", "values": {"0": "69.4"}, "type": 6}, "2": {"id": 2, "description": "Motion Sensor", "values": {"16": "0"}, "type": 1}, "6": {"id": 6, "description": "TX RSSI", "values": {"48": "-256"}, "type": 23}, "7": {"id": 7, "description": "RX RSSI", "values": {"48": "-46"}, "type": 23}, "8": {"id": 8, "description": "Uplink Quality RSSI", "values": {"48": "0"}, "type": 23}, "9": {"id": 9, "description": "Battery Voltage", "values": {"38": "4.1"}, "type": 30}}, "type": 17, "protocol_version": "2.2.0", "sketch_name": "MultiSensor (Feather)", "sensor_id": 4}, "5": {"battery_level": 0, "sketch_version": "0.5", "children": {"0": {"id": 0, "description": "Humidity", "values": {"1": "22.0"}, "type": 7}, "1": {"id": 1, "description": "Temperature", "values": {"0": "77.9"}, "type": 6}, "2": {"id": 2, "description": "Motion Sensor", "values": {"16": "0"}, "type": 1}, "6": {"id": 6, "description": "TX RSSI", "values": {"48": "-256"}, "type": 23}, "7": {"id": 7, "description": "RX RSSI", "values": {"48": "-53"}, "type": 23}, "8": {"id": 8, "description": "Uplink Quality RSSI", "values": {"48": "0"}, "type": 23}, "9": {"id": 9, "description": "Battery Voltage", "values": {"38": "4.1"}, "type": 30}}, "type": 17, "protocol_version": "2.2.0", "sketch_name": "MultiSensor (Feather)", "sensor_id": 5}, "6": {"battery_level": 0, "sketch_version": "0.1", "children": {"1": {"id": 1, "description": "RGB Strip", "values": {"2": "0", "3": "0"}, "type": 26}, "2": {"id": 2, "description": "RGB Strip FX", "values": {}, "type": 23}}, "type": null, "protocol_version": "1.4", "sketch_name": "RGB Strip Controler", "sensor_id": 6}}

Looking in the persistence file, one of the nodes that have sketchname ā€œRGB Strip Controlerā€ has protocol version 1.4. That version doesnā€™t support V_RGB. Minimum version 1.5 is required.

The node presentation message should set the correct protocol version. If youā€™re sure that you have at least the required version on your nodeā€™s firmware, try to remove the troublesome nodes from the persistence file and restart them to have them present themselves again. Monitor the serial logs on both sides during this, to make sure messages are sent and received properly.

PS
The dimmer V_PERCENTAGE value should be between 0-100. 255 will not work.

This is the version message the RGB Strip Controler is sending, Iā€™ve also tried MySensors 2.2.0 as well. I am not sure where itā€™s getting version 1.4 from.

Does pymysensors need to be updated? Itā€™s sitting on 0.11.1 in HA but 0.13.0 is out.

1.4 is the default value of protocol version when a Node is created if the presentation message payload is somehow not received properly. Maybe the payload wasnā€™t received when that node was first presented and then it fell back to 1.4 as a default and then subsequent validation errors for V_RGB followed.

Did you try and remove all the affected nodes from the persistence file, restart home assistant and then restart the nodes?

Pymysensors doesnā€™t need updating. Home assistant uses pinned dependency versions, so 0.11.1 is correct and we havenā€™t upgraded yet to 0.13.0. That PR is still open.

Even when I dumb down the sketch to just present the children it keeps coming up as 1.4 any thoughts?

Side note:

When using the example sketch for the RGB LED at https://www.home-assistant.io/components/light.mysensors/
I get the same results, comes back with protocol_version: 1.4.

The DimmableLight sketch works properly tho.

Hereā€™s the test sketch I used:

// Enable debug prints
#define MY_DEBUG

// Enable and select radio type attached 
#define MY_RADIO_RFM69

//#define MY_RFM69_NEW_DRIVER // ATC on RFM69 works only with the new driver
//#define MY_RFM69_ATC_TARGET_RSSI_DBM (-70)  // target RSSI -70dBm
//#define MY_RFM69_MAX_POWER_LEVEL_DBM (10) // amx. TX power 10dBm = 10mW

#define MY_IS_RFM69HW
#define MY_RF69_FREQUENCY RFM69_915MHZ
// Enable below for Adafruit Feather boards
#define MY_RF69_SPI_CS 8
#define MY_RF69_IRQ_PIN 3
#define MY_RF69_IRQ_NUM 3

// Nano Radio Settings
//#define MY_RF69_SPI_CS 10
//#define MY_RF69_IRQ_PIN 3
//#define MY_RF69_IRQ_NUM 1

// Reset PIN for RFM Radio
// PIN 4 on Feathers
// PIN 9 on Ethernet Gateway
#define MY_RFM69_RST_PIN  4

//#define MY_DEFAULT_TX_LED_PIN 13

#define SKETCH_NAME "RGB Strip Controler"
#define SKETCH_MAJOR "0"
#define SKETCH_MINOR "1"

// Hack for Adafruit Feather M0
#define MY_SERIALDEVICE Serial

/* End Standard Config Globals */

#include <SPI.h>
#include <MySensors.h>  

/* MySensors Stuff */


#define SN "DimmableRGBLED"
#define SV "1.0"
#define CHILD_ID 1
#define LED_PIN 5

char rgb[7] = "ffffff"; // RGB value.
int currentLevel = 0;  // Current dimmer level.

MyMessage dimmerMsg(CHILD_ID, V_PERCENTAGE);
MyMessage lightMsg(CHILD_ID, V_STATUS);
MyMessage rgbMsg(CHILD_ID, V_RGB);

void presentation()
{
  sendSketchInfo(SN, SV);
  present(CHILD_ID, S_RGB_LIGHT);
}

void setup()
{
  send(lightMsg.set((int16_t)0));
  send(dimmerMsg.set((int16_t)currentLevel));
  send(rgbMsg.set(rgb));
}

void loop()
{
  
}

JSON Result:

"12": {"battery_level": 0, "sensor_id": 12, "protocol_version": "1.4", "sketch_version": "1.0", "sketch_name": "DimmableRGBLED", "type": null, "children": {"1": {"id": 1, "description": "", "values": {"2": "0", "3": "0"}, "type": 26}}}

Do you have debug logs from both sides, node and home assistant, from restarting the node?

Iā€™ll see about getting you some debug logs after work.

Ok here you go @martinhjelmare

From the nodeā€™s debug:

TSM:INIT
TSF:WUR:MS=0
TSM:INIT:TSP OK
TSM:FPAR
TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSF:MSG:FPAR OK,ID=0,D=1
TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSM:FPAR:OK
TSM:ID
TSM:ID:REQ
TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
TSF:MSG:READ,0-0-255,s=255,c=3,t=4,pt=0,l=2,sg=0:16
TSF:SID:OK,ID=16
TSM:ID:OK
TSM:UPL
!TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
TSF:MSG:READ,0-0-255,s=255,c=3,t=4,pt=0,l=2,sg=0:16
TSF:MSG:BC
TSF:MSG:READ,0-0-255,s=255,c=3,t=4,pt=0,l=2,sg=0:16
TSF:MSG:BC
TSF:MSG:READ,0-0-255,s=255,c=3,t=4,pt=0,l=2,sg=0:16
TSF:MSG:BC
TSF:MSG:READ,0-0-255,s=255,c=3,t=4,pt=0,l=2,sg=0:16
TSF:MSG:BC
TSM:UPL
TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=OK:1
TSF:MSG:READ,0-0-16,s=255,c=3,t=25,pt=1,l=1,sg=0:1
TSF:MSG:PONG RECV,HP=1
TSM:UPL:OK
TSM:READY:ID=16,PAR=0,DIS=1
TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
TSF:MSG:READ,0-0-16,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
TSF:MSG:SEND,16-16-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
TSF:MSG:READ,0-0-16,s=255,c=3,t=6,pt=0,l=1,sg=0:I
TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=11,pt=0,l=14,sg=0,ft=0,st=OK:DimmableRGBLED
TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
TSF:MSG:SEND,16-16-0-0,s=1,c=0,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
MCO:REG:REQ
TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
TSF:MSG:READ,0-0-16,s=255,c=3,t=27,pt=1,l=1,sg=0:1
MCO:PIM:NODE REG=1
MCO:BGN:STP
TSF:MSG:SEND,16-16-0-0,s=1,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=OK:0
TSF:MSG:SEND,16-16-0-0,s=1,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=OK:0
TSF:MSG:SEND,16-16-0-0,s=1,c=1,t=40,pt=0,l=6,sg=0,ft=0,st=OK:ffffff
MCO:BGN:INIT OK,TSP=1

From Home Assistant:

2018-05-09 20:05:57 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 0;255;3;0;2;

2018-05-09 20:05:57 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 0;255;3;0;2;2.2.0

2018-05-09 20:06:07 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 0;255;3;0;2;

2018-05-09 20:06:07 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 0;255;3;0;2;2.2.0

2018-05-09 20:06:14 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 255;255;3;0;3;

2018-05-09 20:06:14 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 255;255;3;0;4;16

2018-05-09 20:06:17 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 16;255;0;0;17;2.1.1
16;255;3;0;6;0

2018-05-09 20:06:17 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 16;255;3;0;6;I

2018-05-09 20:06:17 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 0;255;3;0;2;

2018-05-09 20:06:17 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 16;255;3;0;11;DimmableRGBLED
16;255;3;0;12;1.0
0;255;3;0;2;2.2.0
16;1;0;0;26;

2018-05-09 20:06:17 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 16 child 255
2018-05-09 20:06:17 DEBUG (Thread-23) [homeassistant.components.mysensors] Not a child update for node 16
2018-05-09 20:06:17 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('16;255;3;0;11;DimmableRGBLED',), {}) took 0.136 seconds
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 16 child 255
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Not a child update for node 16
2018-05-09 20:06:18 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('16;255;3;0;12;1.0',), {}) took 0.147 seconds
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 16 child 1
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] No child values for node 16 child 1
2018-05-09 20:06:18 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 16;1;1;0;2;0
16;1;1;0;3;0
16;1;1;0;40;ffffff

2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 16 child 1
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0'}: light platform: node 16 child 1: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-09 20:06:18 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('16;1;1;0;2;0',), {}) took 0.142 seconds
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 16 child 1
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0', 3: '0'}: light platform: node 16 child 1: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-09 20:06:18 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('16;1;1;0;3;0',), {}) took 0.108 seconds
2018-05-09 20:06:18 ERROR (Thread-23) [mysensors] Not a valid message: Not valid message sub-type: 40 for dictionary value @ data['sub_type']
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Node update: node 16 child 1
2018-05-09 20:06:18 DEBUG (Thread-23) [homeassistant.components.mysensors] Invalid values: {2: '0', 3: '0'}: light platform: node 16 child 1: S_RGB_LIGHT requires value_type V_RGB @ data[40]
2018-05-09 20:06:18 DEBUG (Thread-23) [mysensors] Handle queue with call <bound method Gateway.logic of TCPGateway>(('16;1;1;0;40;ffffff',), {}) took 0.197 seconds
2018-05-09 20:06:27 DEBUG (Thread-23) [mysensors.gateway_tcp] Sending 0;255;3;0;2;

2018-05-09 20:06:27 DEBUG (Thread-23) [mysensors.gateway_tcp] Received 0;255;3;0;2;2.2.0

JSON Entry:

"16": {"battery_level": 0, "sensor_id": 16, "protocol_version": "1.4", "sketch_version": "1.0", "sketch_name": "DimmableRGBLED", "type": null, "children": {"1": {"id": 1, "description": "", "values": {"2": "0", "3": "0"}, "type": 26}}}}

Thanks for the logs!

Ok, Iā€™ve managed to reproduce the error in a unit test, so itā€™s a confirmed bug. Iā€™ll make a fix, and try to get it released soon.

The reason is that the request for id creates the sensor node but doesnā€™t set the protocol version for the node. The protocol version should be set when the node is presented, but right now due to the bug, the code returns before that happens since the node is already existing.

You should be able to work around this by setting the node id in the sketch, delete the entry one final time in the persistence file and restarting home assistant and then the node. Then the node will not request an id from home assistant, so the node instance will be created when the node presentation comes in and the protocol version will be set correctly.

Sorry for the inconvenience, and thanks for great feedback!

Edit:
PR to pymysensors with fix:

No problem man, I thought I was going crazy for a moment lol
Thanks for the help!

Iā€™ll give it a test run when I get off work once again.

1 Like

Confirming forcing the ID did indeed work around the issue.
Thanks once again.

1 Like

Results:

image

Used the mysensors.notify to send the ā€œFX Modeā€ to the node.

Now the toaster can have a dance party.

2 Likes