I just attempted to create a passive node using the example sketch in Arduino under MySnesors and made only a couple of small modifciations. First, I changed the baud rate to 9600 so that it is below the 38400 of the sensebender (this seems to be recommended online elsewhere). Second, I changed the Node_ID to 15 since this was a number I have not used before and wanted to make sure it was not interfering with some stored memory of another node and its attached sensors. Third, I was getting an error about int() log 10 having an error in the random number generator at the bottom of the example sketch, so I changed it to simplify and only send values between 25 and 30 with no decimals.
Here is the error I get in HA core log:
Source: runner.py:189
First occurred: 2:05:57 AM (3465 occurrences)
Last logged: 10:56:21 AM
Not a valid message: too many values to unpack (expected 5)
Node 15 is unknown
Not a valid message: invalid literal for int() with base 10: 'TSF:MSG:SEND,0-0-50-15,s=255,c=3,t=19,pt=0,l=0,sg=0,ft=0,st=OK:0'
Not a valid message: invalid literal for int() with base 10: 'TSF:MSG:SEND,0-0-50-15,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0'
Not a valid message: invalid literal for int() with base 10: 'TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:0'
And here is the full sketch copied from Arduino IDE
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <[email protected]>
* Copyright (C) 2013-2019 Sensnology AB
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0 - tekka
*
* DESCRIPTION
* Passive node example: This is a passive & independent reporting node
*
*/
// Enable debug prints
#define MY_DEBUG
// Establish serial communication at the following boad rate below that of the sensebender
#define MY_BAUD_RATE 9600
// Enable passive mode
#define MY_PASSIVE_NODE
// Passive mode requires static node ID
#define MY_NODE_ID 15
// Enable and select radio type attached
#define MY_RADIO_RF24
//#define MY_RADIO_NRF5_ESB
//#define MY_RADIO_RFM69
//#define MY_RADIO_RFM95
#include <MySensors.h>
#define CHILD_ID 0 // Id of the sensor child
// Initialize general message
MyMessage msg(CHILD_ID, V_TEMP);
void setup()
{
}
void presentation()
{
// Send the sketch version information to the gateway and controller
sendSketchInfo("Passive node", "1.0");
// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID, S_TEMP);
}
void loop()
{
// generate some random data
send(msg.set(25.0+random(0,5),0));
sleep(2000);
}
It does not appear to be sleeping since I get a serial output with many correct values being reported in just a few seconds.
414170 ?TSF:MSG:SEND,15-15-255-0,s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=OK:Passive node
416991 ?TSF:MSG:SEND,15-15-255-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
419801 ?TSF:MSG:SEND,15-15-255-0,s=0,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
422605 ?TSF:MSG:SEND,15-15-255-0,s=0,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:26
422681 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
422741 TSF:TDI:TSL
422761 MCO:SLP:WUP=-2
422784 TSF:TRI:TSB
422811 ?TSF:MSG:SEND,15-15-255-0,s=0,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:29
422887 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
422947 TSF:TDI:TSL
422967 MCO:SLP:WUP=-2
422990 TSF:TRI:TSB
423017 ?TSF:MSG:SEND,15-15-255-0,s=0,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:28
423093 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
423153 TSF:TDI:TSL
423173 MCO:SLP:WUP=-2
423196 TSF:TRI:TSB
423223 ?TSF:MSG:SEND,15-15-255-0,s=0,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:25
423299 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
That was only a few out of what appears to be hundreds of values coming in a couple of seconds followed by:
438830 MCO:SLP:WUP=-2
438853 TSF:TRI:TSB
438878 TSF:MSG:READ,0-50-15,s=255,c=3,t=19,pt=0,l=0,sg=0:
438941 ?TSF:MSG:SEND,15-15-255-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
439022 !MCO:PRO:RC=1
439044 TSF:MSG:READ,0-0-15,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
441841 ?TSF:MSG:SEND,15-15-255-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.2
444653 ?TSF:MSG:SEND,15-15-255-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:255
444733 !MCO:PRO:RC=1
444755 !MCO:PRO:RC=1
444777 !MCO:PRO:RC=1
444799 !MCO:PRO:RC=1
444821 !MCO:PRO:RC=1
444843 !MCO:PRO:RC=1
This is way over my head.