Hi Guys,
Could someone please help me to troubleshoot my 1st mysensor test?
In the integration I’ve got one sensor, however without any entity - just the name.
In logs I have:
2021-04-28 23:23:39 DEBUG (MainThread) [mysensors.transport] Receiving 0;255;3;0;9;5343356 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.60
2021-04-28 23:23:39 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:5343356 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.60
2021-04-28 23:23:39 DEBUG (MainThread) [mysensors.transport] Receiving 100;1;1;0;37;25.60
2021-04-28 23:23:39 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 100 child 1
2021-04-28 23:23:39 DEBUG (SyncWorker_2) [mysensors.persistence] Saving sensors to persistence file /config/mysensors_d50a5bc481ebc8a72ca5ad0fd8550d03.json
2021-04-28 23:23:42 DEBUG (MainThread) [mysensors.transport] Receiving 0;255;3;0;9;5346704 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.50
2021-04-28 23:23:42 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:5346704 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.50
2021-04-28 23:23:42 DEBUG (MainThread) [mysensors.transport] Receiving 100;1;1;0;37;25.50
2021-04-28 23:23:42 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 100 child 12021-04-28 23:23:39 DEBUG (MainThread) [mysensors.transport] Receiving 0;255;3;0;9;5343356 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.60
2021-04-28 23:23:39 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:5343356 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.60
2021-04-28 23:23:39 DEBUG (MainThread) [mysensors.transport] Receiving 100;1;1;0;37;25.60
2021-04-28 23:23:39 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 100 child 1
2021-04-28 23:23:39 DEBUG (SyncWorker_2) [mysensors.persistence] Saving sensors to persistence file /config/mysensors_d50a5bc481ebc8a72ca5ad0fd8550d03.json
2021-04-28 23:23:42 DEBUG (MainThread) [mysensors.transport] Receiving 0;255;3;0;9;5346704 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.50
2021-04-28 23:23:42 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:5346704 TSF:MSG:READ,100-100-0,s=1,c=1,t=37,pt=7,l=5,sg=0:25.50
2021-04-28 23:23:42 DEBUG (MainThread) [mysensors.transport] Receiving 100;1;1;0;37;25.50
2021-04-28 23:23:42 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 100 child 1
The persistence file /config/mysensors_d50a5bc481ebc8a72ca5ad0fd8550d03.json shows:
{
"0": {
"sensor_id": 0,
"children": {},
"type": 18,
"sketch_name": null,
"sketch_version": null,
"battery_level": 0,
"protocol_version": "2.3.2",
"heartbeat": 0
},
"100": {
"sensor_id": 100,
"children": {
"1": {
"id": 1,
"type": 16,
"description": "",
"values": {
"43": "custom_lux",
"37": "27.20"
}
}
},
"type": 17,
"sketch_name": "LightLuxSensor",
"sketch_version": "1.0",
"battery_level": 0,
"protocol_version": "2.3.2",
"heartbeat": 0
}
}
How to access the two values, visible apparently in log and in the json file?
Just an idea for a lovelace card?
Many thanks in advance.
P.
PS.
The sensor’s sketch comes from the manual
I’ve just replaced the real light sensor with a random value.
// uint16_t lux = lightSensor.readLightLevel(); // Get Lux value
// if (lux != lastlux) {
// send(msg.set(lux));
// lastlux = lux;
/// }
send(msg.set(25.0+random(0,30)/10.0,2));