MySensors 2.3.2 released


  • Admin

    Yet another early holiday gift, MySensors 2.3.2 has finally been released!

    Highlights

    • Add support for RPI4
    • Transport and crypto HAL update
    • Rename "soft ack" to echo
    • Add log parser
    • RF24 improvements

    ...and many other bug fixes and tweaks

    Release notes and changelog: https://github.com/mysensors/MySensors/releases/tag/2.3.2

    Important information:

    If you encounter compilation issues, update your board definitions:

    • AVR 1.8.2
    • ESP8266 2.6.2
    • ESP32 1.0.4
    • SAMD 1.8.4
    • nRF5 0.6.0 (Sandeep Mistry)
    • STM32F1 2019.12.8 (stm32duino)

    Special thanks to the following people who have contributed code to this release:

    • Alfredo
    • desander
    • hannesweisbach
    • ltigges
    • Mikael Falkvidd
    • Patrick Fallberg
    • pragtich
    • Rik Jansen
    • tekka
    • Yveaux

    ...and a little teaser: 2.4 will come with a set of new features some of you have been waiting for... stay tuned 🙂


  • Plugin Developer

    2.4 will come with a set of new features some of you have been waiting for... stay tuned

    Exciting! Next Christmas? 🙂

    Practically: will code that uses ACK still work ok? I believe the answer was 'no' earlier, but I want to make sure.


  • Mod

    @alowhum the real ack still works the same way as before.

    The stuff that was called ack but wasn't ack and confused the hell out of everybody still works the same way as before, except that the naming is now "echo" to better reflect what it actually does (and has been doing all along). See https://github.com/mysensors/MySensors/pull/1292 for more information.


  • Plugin Developer

    Ok, but practically: I have a lot of Candle users whose version of MySensors will auto-update. But the code they will be uploading still has:

      if( message.isAck() ){
        Serial.println(F("-Got echo"));
        return;
      }
    

    So.. I should quickly change the code to also accomodate Echo. The question is: how?

    Will this work?

      if( message.isAck() || message.isEcho()){
        Serial.println(F("-Got echo"));
        return;
      }
    

  • Admin

    @alowhum No need to substitute isAck() - it is marked deprecated but remains fully functional in the 2.x code. However, it is advisable to use isEcho() in the future to avoid confusions.


  • Plugin Developer

    Thanks @tekka, that's a load off my mind 🙂

    Is there a way to use #define based on the version of the library?


  • Mod


  • Mod



  • Hi guys, thanks for this release! 👍 Tested with a Pi 4 and a dual ethernet gateway (RFM69 + NRF24): it works!
    My /boot/config.txt is here.



  • Hi, thanks as well! Upgraded half of all my sensor nodes without any issues so far.



  • Thank you for the new version!
    I run my network on 2.3.1. Should I update the serial gateway to 2.3.2 (or stay with 2.3.1) and leave some of my nodes on 2.3.1 and the new ones on 2.3.2?
    Are they compatible?


  • Mod

    @pvoj they are compatible so you can do any way you like



  • hi, i upgraded to 2.3.2 and my serial gateway stopped working in openhab, so i had to revert back to 2.3.1.

    I can only think this is because the mysensors binding also has to be upgraded?


  • Banned

    The stuff that was called ack but wasn't ack and confused the hell out of everybody still works the same way as before, except that the naming is now "echo" to better reflect what it actually does (and has been doing all along). S


  • Banned

    @mfalkvidd I can only think this is because the mysensors binding also has to be upgraded?


  • Mod

    @minousoso sorry, I don't know. I don't use Openhab.



  • Upgraded MS library and my my serial gateway sketch from 2.0.0 this evening - went well. Then noticed Nodes nolonger connect... Status LEDs no longer blick. Tried updating one node to 2.3.2 but it still won't conect. Is there a step by step guide? I have over 10 other nodes that Domotics can't find.



  • @Eme DId you erase the eeprom using the mysensors clear eeeprom program? If not then run that once and try again.



  • @skywatch thanks for the update. Should l write this sketch to the Gateway alone, on each node or on both? Are there any step by step guides to gracefully migrate with? I'm very cautious, I've nodes in faraway places, wouldn't want to have to start all over again.



  • @Eme cleared eeprom with the sketch and loaded the Gateway Serial. I now have an error for an #include <nrf.h> I've updated boards and libraries but still can't get past the error

    "NRFS Radio is not supported for this platform. " does this mean my Serial GW can't be upgraded since l use NRF24 radios? What am l fling wrong? All my nodes are down. Please help.



  • @Eme Best to post the gateway sketch you are using. I guess it is the one from 2.3.2 library and not the old one from 2.0.0. Things changed.

    Also I would recommend to clear eeprom on all nodes and then reload the code modified where necessary for the new version if needed.

    It is best to have everything using the same version/protocol.



  • thanks @skywatch l took your advice cleared eeprom on only one node, and cloned my SD card before building a Rasberry Gateway/Controller since I was experiencing too much stress with the Nano-RPi gateway.

    My Config was like:-

    ./configure --my-transport=rf24 --my-rf24-irq-pin=15 --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020 --my-controller-ip-address=172.0.0.1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
    

    I changed the Hardware on Domotics to point to the new virtual ttyUSB020 port that appeared on Domotics. but still no connection.

    Rasberry Pi Gateway/Conmtroller Tail Log is asfollows

    /home/pi/MySensors$ tail -f /var/log/syslog
    Aug 18 22:25:53 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:25:53 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:25:54 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:25:55 IoTGateway systemd[1]: Started Session c4 of user pi.
    Aug 18 22:25:55 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:25:55 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:25:55 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:25:55 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:25:55 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:25:56 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:07 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:07 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:07 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:07 IoTGateway mysgw: TSF:PNG:SEND,TO=0
    Aug 18 22:26:07 IoTGateway mysgw: TSF:CKU:OK
    Aug 18 22:26:07 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:08 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:09 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:09 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:09 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:09 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:09 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:10 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:12 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:12 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:12 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:12 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:12 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:12 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:14 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:14 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:14 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:14 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:14 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:15 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:26 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:26 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:26 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:26 IoTGateway mysgw: TSF:PNG:SEND,TO=0
    Aug 18 22:26:26 IoTGateway mysgw: TSF:CKU:OK
    Aug 18 22:26:26 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:26 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:28 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:28 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:28 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:28 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:28 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:28 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:30 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:30 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:30 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:30 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:30 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:30 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:32 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:32 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:32 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:32 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:32 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:32 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:39 IoTGateway mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:39 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:39 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=5
    Aug 18 22:26:39 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:39 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:39 IoTGateway mysgw: !TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:41 IoTGateway mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:41 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:41 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=5
    Aug 18 22:26:41 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:41 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:41 IoTGateway mysgw: !TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:43 IoTGateway mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:43 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:43 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=5
    Aug 18 22:26:43 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:43 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:43 IoTGateway mysgw: !TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:44 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:44 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:44 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:44 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:44 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:44 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:45 IoTGateway mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:45 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:45 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=5
    Aug 18 22:26:45 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:45 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:45 IoTGateway mysgw: !TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:46 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:46 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:46 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:46 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:46 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:46 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:48 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:48 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:48 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:48 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:48 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:48 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Aug 18 22:26:50 IoTGateway mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Aug 18 22:26:50 IoTGateway mysgw: TSF:MSG:BC
    Aug 18 22:26:50 IoTGateway mysgw: TSF:MSG:FPAR REQ,ID=2
    Aug 18 22:26:50 IoTGateway mysgw: TSF:CKU:OK,FCTRL
    Aug 18 22:26:50 IoTGateway mysgw: TSF:MSG:GWL OK
    Aug 18 22:26:50 IoTGateway mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    

    My Domoticz Log :-

    2020-08-18 22:21:53.545 Sunrise: 06:22:00 SunSet: 18:47:00
    2020-08-18 22:21:53.545 Day length: 12:25:00 Sun at south: 12:34:00
    2020-08-18 22:21:53.545 Civil twilight start: 06:00:00 Civil twilight end: 19:08:00
    2020-08-18 22:21:53.545 Nautical twilight start: 05:35:00 Nautical twilight end: 19:34:00
    2020-08-18 22:21:53.545 Astronomical twilight start: 05:09:00 Astronomical twilight end: 19:59:00
    2020-08-18 22:21:53.864 Active notification Subsystems: kodi (1/13)
    2020-08-18 22:21:53.969 Starting shared server on: :::6144
    2020-08-18 22:21:53.410 Status: Domoticz V2020.1 (c)2012-2020 GizMoCuz
    2020-08-18 22:21:53.412 Status: Build Hash: 63fa969e4, Date: 2020-03-22 15:16:16
    2020-08-18 22:21:53.413 Status: Startup Path: /home/pi/domoticz/
    2020-08-18 22:21:53.842 Status: PluginSystem: Started, Python version '3.7.3'.
    2020-08-18 22:21:53.896 Status: WebServer(HTTP) started on address: :: with port 8080
    2020-08-18 22:21:53.912 Status: WebServer(SSL) started on address: :: with port 443
    2020-08-18 22:21:53.915 Status: Camera: settings (re)loaded
    2020-08-18 22:21:53.969 Status: TCPServer: shared server started...
    2020-08-18 22:21:53.970 Status: RxQueue: queue worker started...
    2020-08-18 22:21:55.978 Status: MySensors: Worker started...
    2020-08-18 22:21:55.979 Status: Hardware Monitor: Started
    2020-08-18 22:21:56.979 MySensors: Gateway Ready...
    2020-08-18 22:21:56.004 Status: NotificationSystem: thread started...
    2020-08-18 22:21:56.005 Status: EventSystem: reset all events...
    2020-08-18 22:21:56.010 Status: EventSystem: reset all device statuses...
    2020-08-18 22:21:56.051 Status: PluginSystem: Entering work loop.
    2020-08-18 22:21:56.159 Status: Python EventSystem: Initalizing event module.
    2020-08-18 22:21:56.160 Status: EventSystem: Started
    2020-08-18 22:21:56.160 Status: EventSystem: Queue thread started...
    2020-08-18 22:21:56.979 Status: MySensors: Using serial port: /dev/ttyUSB020
    2020-08-18 22:21:57.055 MySensors: Gateway Version: 2.3.2
    2020-08-18 22:21:57.004 Status: MQTT: Connecting to 192.168.8.100:1883
    2020-08-18 22:21:57.004 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)
    2020-08-18 22:22:49.016 Status: MQTT: Connecting to 192.168.8.100:1883
    2020-08-18 22:22:49.218 Status: MQTT: connected to: 192.168.8.100:1883
    2020-08-18 22:22:49.419 Status: MQTT: Subscribed
    2020-08-18 22:24:00.705 Status: New sensors allowed for 5 minutes...
    

    MySensor Node Serial Printout:

    16 MCO:BGN:INIT REPEATER,CP=RNNRA---,FQ=16,REL=255,VER=2.3.2
    27 TSM:INIT
    28 TSF:WUR:MS=0
    34 TSM:INIT:TSP OK
    36 TSM:INIT:STATID=5
    38 TSF:SID:OK,ID=5
    40 TSM:FPAR
    45 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2052 !TSM:FPAR:NO REPLY
    2054 TSM:FPAR
    2058 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4065 !TSM:FPAR:NO REPLY
    4067 TSM:FPAR
    4071 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6078 !TSM:FPAR:NO REPLY
    6080 TSM:FPAR
    6084 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8091 !TSM:FPAR:FAIL
    8092 TSM:FAIL:CNT=1
    8094 TSM:FAIL:DIS
    8096 TSF:TDI:TSL
    18098 TSM:FAIL:RE-INIT
    18100 TSM:INIT
    18106 TSM:INIT:TSP OK
    18108 TSM:INIT:STATID=5
    18111 TSF:SID:OK,ID=5
    18113 TSM:FPAR
    18117 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20124 !TSM:FPAR:NO REPLY
    20126 TSM:FPAR
    20130 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    22138 !TSM:FPAR:NO REPLY
    22140 TSM:FPAR
    22145 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    24153 !TSM:FPAR:NO REPLY
    24155 TSM:FPAR
    24159 ?TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    26167 !TSM:FPAR:FAIL
    26168 TSM:FAIL:CNT=2
    26170 TSM:FAIL:DIS
    26172 TSF:TDI:TSL
    
    

    Still no luck. The node still wont present to the new gateway.

    What am I doing wrong? All my devices are still down - 4 days on.



  • @skywatch Sorry I didn't respond to this question. I didnt change the sketch. I only updated the library and uploaded to the node with the new Library. DO I have to change the sketch altogether? My sketch is as follows...

    // Example sketch showing how to control physical relays. 
    // This example will remember relay state even after power failure.
    
    // Enable debug prints
    #define MY_DEBUG
    #define SLEEP_TIME 10000    //10 seconds
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    #define MY_RF24_PA_LEVEL RF24_PA_HIGH // Options MAX to reach the furthest 
    #define MY_NODE_ID 5  // Set this to fix your Radio ID or use AUTO or 1
    #define MY_REPEATER_FEATURE
    #define MY_REGISTRATION_FEATURE // Forece registration
    #define MY_REGISTRATION_RETRIES 5
    
    #include <Wire.h>
    #include <TimeLib.h>
    #include <SPI.h>
    #include <MySensors.h>
    
    // For Debug
    #ifdef DEBUG_ON
    #define DEBUG_PRINT(x)   Serial.print(x)
    #define DEBUG_PRINTLN(x) Serial.println(x)
    #else
    #define DEBUG_PRINT(x)
    #define DEBUG_PRINTLN(x)
    #define SERIAL_START(x)
    #endif
    
    //#define SLEEP_TIME = 18000000  // Wait every 30 minutes
    #define RELAY_PIN 2  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
    #define NUMBER_OF_RELAYS 5 // Total number of attached relays
    #define RELAY_ON 1  // GPIO value to write to turn on attached relay
    #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
    #define SKETCH_NAME "Water Tank Node"
    #define SKETCH_VERSION "0.3.2"
    #define CHILD_ID 0
    
    MyMessage msg(1,V_LIGHT);
    
    void setup()
    {
      for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
        // Then set relay pins to output mode
        pinMode(pin, OUTPUT);
        // Set relay to last known state (using eeprom storage)
        digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
        DEBUG_PRINT(F("Initialised Relay: "));
        DEBUG_PRINT(F(sensor));
        DEBUG_PRINT(F(" at pin "));
        DEBUG_PRINT(F(pin));
        DEBUG_PRINT(F(" ("));
        DEBUG_PRINT(F(loadState(pin)));
        DEBUG_PRINTLN(F(")"));
      }
        pinMode(A0, INPUT); // Then set etra sensor pins to input mode
        DEBUG_PRINTLN(F("Initialised additional Sensor: "));
    }
    
    void presentation() { 
    sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
    
    // Fetch relay status   
    for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
    // Register all sensors to gw (they will be created as child devices)
        present(sensor, S_BINARY);
        pinMode(pin, OUTPUT); // Then set relay pins in output mode  
        boolean savedState = loadState(pin); // Set relay to last known state (using eeprom storage)
        digitalWrite(pin, savedState?RELAY_ON:RELAY_OFF);
        DEBUG_PRINT(F("Presented Relay at : "));
        DEBUG_PRINTLN(F(pin));
        send(msg.set(savedState? 0 : 1));
      }
          DEBUG_PRINTLN(F("Sensor Presentation Complete"));
    }
    void loop() 
    {
      // Alway process incoming messages whenever possible
      // Sleep until interrupt comes in on motion sensor. Send update every two minute.
    //  sleep(digitalPinToInterrupt(RELAY_PIN), CHANGE, SLEEP_TIME);
    
    }
    void receive(const MyMessage &message){
    // Change relay state if message is receieved
    //if (digitalRead(A0) == HIGH){
    //  // Sensor says tank is full do something
    //  DEBUG_PRINTLN(F("Float Sensor High, 'Tank is Full'"));
    //  digitalWrite(3, LOW);  // Switch off tank pump
    //  saveState(message.sensor, message.getBool());
    //  bool send(MyMessage &msg, bool ack);
    //
    //  }
      if (message.type == V_STATUS){
    //   digitalWrite(message.sensor, !digitalRead(message.sensor));
         if (message.getBool() == 0) {
         digitalWrite(message.sensor, LOW);
         // Store state in eeprom
         saveState(message.sensor, message.getBool());
          }
         else //getBool() == 1
         digitalWrite(message.sensor, HIGH);   
         // Store state in eeprom
         saveState(message.sensor, message.getBool());
         
    // digitalWrite(message.sensor-1+RELAY_PIN, message.getBool()?RELAY_ON:RELAY_OFF);
    
    // Write some debug info
       Serial.print("Incoming change for sensor ID: ");
       Serial.print(message.sensor);
       Serial.print(", New status: ");
       Serial.println(message.getBool());
        } 
      }
    


  • @tekka

    It seems that this project has stalled out almost completely. There hasnt been any updates of any significant value that I can see. we have seen the Home automation platforms produce numerous updates in the past two years. Has MySensors given up with this project or will there be any milestones produced???



  • This post is deleted!


  • @Jstoaks
    That would be terrible. This is such a nice project.



  • No news .. ? MySensors is dead ? 😞



  • what would you like as a novelty ???

    " MySensors is dead ?" ... No, in my house it is still alive.

    but it's true you are right to ask the question.
    the programmers, the creators are always The ????? 🙂

    what!? bought by the competition so that MySensors does not evolve any more? it makes damage to the commercial product 🙂


Log in to reply
 

Suggested Topics

  • 3
  • 110
  • 2
  • 10
  • 109
  • 163

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts