Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Announcements
  3. 1.4 Beta

1.4 Beta

Scheduled Pinned Locked Moved Announcements
1.4betahelp
129 Posts 18 Posters 87.1k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L lodewyk

    Hi guys,

    I just got relays working with but struggling requesting a variable value on Beta 1.4.

    My set variable commands looks as follow.

    Switching On - > 1;1;1;0;2;1 (work as expected)
    Off -> 1;1;1;0;2;0 (work as expected)

    Request variable for the same relay -> 1;1;2;0;2; (sets the relay to 0 ???)

    Can someone confirm if my request variable command is correct and if not what should it be?

    Thanks

    DammeD Offline
    DammeD Offline
    Damme
    Code Contributor
    wrote on last edited by Damme
    #33

    @lodewyk I use this:
    void incomingMessage(const MyMessage &msg) {
    // We only expect one type of message from controller. But we better check anyway.
    if (msg.type==V_LIGHT) {
    if (strlen(msg.getString())==0) {
    gw.send(message.setSensor(msg.sensor).setType(V_LIGHT).set(digitalRead(msg.sensor-1+RELAY_1)?RELAY_ON:RELAY_OFF));
    } else {
    digitalWrite(msg.sensor-1+RELAY_1, msg.getBool()?RELAY_ON:RELAY_OFF);
    gw.saveState(msg.sensor, msg.getBool());
    }
    }
    }

    (How do i use [code] ?? I start to hate this forum :P)

    1 Reply Last reply
    0
    • L lodewyk

      Hi guys,

      I just got relays working with but struggling requesting a variable value on Beta 1.4.

      My set variable commands looks as follow.

      Switching On - > 1;1;1;0;2;1 (work as expected)
      Off -> 1;1;1;0;2;0 (work as expected)

      Request variable for the same relay -> 1;1;2;0;2; (sets the relay to 0 ???)

      Can someone confirm if my request variable command is correct and if not what should it be?

      Thanks

      hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #34

      @lodewyk

      The relay example does not support requesting state. You must add some code in incomingMessage() to handle incoming request-messages (and reply to them).

      To reply incoming request-command in incomingMessage for the RelayActuator-example do something like this (note I have not compiled/tested this)

      if (mGetCommand(msg) == C_REQ) {
           mSetCommand(msg, C_SET);
           msg.setDestination(msg.getSender());
           msg.set(gw.loadState(msg.getSensor());
           gw.send(msg); 
      } else (
          // Do the normal stuff here
      }
      
      1 Reply Last reply
      0
      • L Offline
        L Offline
        lodewyk
        wrote on last edited by
        #35

        @DAMME and @HEK

        Thanks , very helpful.

        I got so occupied with the commands and never thought about the sensor code.

        Thanks

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lodewyk
          wrote on last edited by
          #36
          This post is deleted!
          1 Reply Last reply
          0
          • L Offline
            L Offline
            lodewyk
            wrote on last edited by
            #37
            This post is deleted!
            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #38

              @Damme said:

              (How do i use [code] ?? I start to hate this forum :P)

              This forum uses markdown. If you need help, press the little questionmark-icon in the compose window. http://daringfireball.net/projects/markdown/syntax

              To decorate your codeblock use 4 spaces or one tab character first on each line.

              1 Reply Last reply
              0
              • L lodewyk

                Hi guys,

                I just got relays working with but struggling requesting a variable value on Beta 1.4.

                My set variable commands looks as follow.

                Switching On - > 1;1;1;0;2;1 (work as expected)
                Off -> 1;1;1;0;2;0 (work as expected)

                Request variable for the same relay -> 1;1;2;0;2; (sets the relay to 0 ???)

                Can someone confirm if my request variable command is correct and if not what should it be?

                Thanks

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #39

                @lodewyk hey man, you've got -2 posts.... How's that possible?

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • hekH Offline
                  hekH Offline
                  hek
                  Admin
                  wrote on last edited by
                  #40

                  Pushed a few new changes/bugfixes. Sorry for the slow progress. Had to wait until we got home and had the chance to do some verification.

                  • Ack bit in header indicating if message is an ack (see RelayWithButton for an example how to read it out).
                  • Sleep functions now takes unsigned long. This allows sensor to sleep for than 30 sec ;)
                  • Corrected string termination

                  https://github.com/mysensors/Arduino/commits/development

                  DammeD marceltrapmanM 3 Replies Last reply
                  1
                  • hekH Offline
                    hekH Offline
                    hek
                    Admin
                    wrote on last edited by hek
                    #41

                    A major code drop coming from @ToSa has now been merged into 1.4. It contains:

                    • The new MySensors Bootloader supporting Over-the-air sketch updates ("client"-side).
                    • A simple NodeJs Controller to test the OTA stuff ("server"-side).
                    • Changes to cope with new sketch meta data stored in EEPROM and conversion between serial protocol/binary data and some new STREAM command types added.
                    • A new internal command has also been added to allow resetting a node remotely.

                    A more detailed change log can be found here:
                    https://github.com/ToSa27/Arduino/commits/development

                    I haven't had time to test myself yet but everything has been verified by @ToSa and is reported working. He is on a business trip right now so advanced bootloader questions have to wait until he's back.

                    marceltrapmanM 1 Reply Last reply
                    0
                    • hekH hek

                      A major code drop coming from @ToSa has now been merged into 1.4. It contains:

                      • The new MySensors Bootloader supporting Over-the-air sketch updates ("client"-side).
                      • A simple NodeJs Controller to test the OTA stuff ("server"-side).
                      • Changes to cope with new sketch meta data stored in EEPROM and conversion between serial protocol/binary data and some new STREAM command types added.
                      • A new internal command has also been added to allow resetting a node remotely.

                      A more detailed change log can be found here:
                      https://github.com/ToSa27/Arduino/commits/development

                      I haven't had time to test myself yet but everything has been verified by @ToSa and is reported working. He is on a business trip right now so advanced bootloader questions have to wait until he's back.

                      marceltrapmanM Offline
                      marceltrapmanM Offline
                      marceltrapman
                      Mod
                      wrote on last edited by
                      #42

                      @hek Sounds like a good step forward!
                      Only one boot loader question: does this mean we can use an external boot loader or do we have to use an external boot loader now?

                      Fulltime Servoy Developer
                      Parttime Moderator MySensors board

                      I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                      I have a FABtotum to print cases.

                      hekH 1 Reply Last reply
                      0
                      • marceltrapmanM marceltrapman

                        @hek Sounds like a good step forward!
                        Only one boot loader question: does this mean we can use an external boot loader or do we have to use an external boot loader now?

                        hekH Offline
                        hekH Offline
                        hek
                        Admin
                        wrote on last edited by
                        #43

                        @marceltrapman

                        The OTA stuff is optional. But if you want to be able to hot deploy sketches over the air, you have to install the MySensors bootloader.

                        1 Reply Last reply
                        0
                        • hekH hek

                          Pushed a few new changes/bugfixes. Sorry for the slow progress. Had to wait until we got home and had the chance to do some verification.

                          • Ack bit in header indicating if message is an ack (see RelayWithButton for an example how to read it out).
                          • Sleep functions now takes unsigned long. This allows sensor to sleep for than 30 sec ;)
                          • Corrected string termination

                          https://github.com/mysensors/Arduino/commits/development

                          DammeD Offline
                          DammeD Offline
                          Damme
                          Code Contributor
                          wrote on last edited by Damme
                          #44

                          @hek There are still some problem with string termination,

                          repeater started, id 3
                          send: 3-3-0-0 s=255,c=0,t=18,pt=0,l=15,st=fail:1.4b1 (18848a2)
                          send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
                          send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=9,st=fail:Relaytest848a2)
                          send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0aytest848a2)
                          read: 5-5-0 s=11,c=1,t=1,pt=0,l=4:58.4
                          send: 5-3-0-0 s=11,c=1,t=1,pt=0,l=4,st=fail:58.4
                          send: 3-3-0-0 s=10,c=1,t=0,pt=0,l=5,st=fail:26.20

                          DammeD 1 Reply Last reply
                          0
                          • DammeD Damme

                            @hek There are still some problem with string termination,

                            repeater started, id 3
                            send: 3-3-0-0 s=255,c=0,t=18,pt=0,l=15,st=fail:1.4b1 (18848a2)
                            send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
                            send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=9,st=fail:Relaytest848a2)
                            send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0aytest848a2)
                            read: 5-5-0 s=11,c=1,t=1,pt=0,l=4:58.4
                            send: 5-3-0-0 s=11,c=1,t=1,pt=0,l=4,st=fail:58.4
                            send: 3-3-0-0 s=10,c=1,t=0,pt=0,l=5,st=fail:26.20

                            DammeD Offline
                            DammeD Offline
                            Damme
                            Code Contributor
                            wrote on last edited by
                            #45

                            @Damme My bad wrong working directory! sorry

                            1 Reply Last reply
                            0
                            • hekH hek

                              Pushed a few new changes/bugfixes. Sorry for the slow progress. Had to wait until we got home and had the chance to do some verification.

                              • Ack bit in header indicating if message is an ack (see RelayWithButton for an example how to read it out).
                              • Sleep functions now takes unsigned long. This allows sensor to sleep for than 30 sec ;)
                              • Corrected string termination

                              https://github.com/mysensors/Arduino/commits/development

                              marceltrapmanM Offline
                              marceltrapmanM Offline
                              marceltrapman
                              Mod
                              wrote on last edited by
                              #46

                              @hek said:

                              • Sleep functions now takes unsigned long. This allows sensor to sleep for than 30 sec ;)

                              Thank you :)

                              Fulltime Servoy Developer
                              Parttime Moderator MySensors board

                              I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                              I have a FABtotum to print cases.

                              1 Reply Last reply
                              0
                              • hekH hek

                                Pushed a few new changes/bugfixes. Sorry for the slow progress. Had to wait until we got home and had the chance to do some verification.

                                • Ack bit in header indicating if message is an ack (see RelayWithButton for an example how to read it out).
                                • Sleep functions now takes unsigned long. This allows sensor to sleep for than 30 sec ;)
                                • Corrected string termination

                                https://github.com/mysensors/Arduino/commits/development

                                marceltrapmanM Offline
                                marceltrapmanM Offline
                                marceltrapman
                                Mod
                                wrote on last edited by
                                #47

                                @hek said:

                                • Corrected string termination

                                And thanks again!!!

                                Fulltime Servoy Developer
                                Parttime Moderator MySensors board

                                I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                                I have a FABtotum to print cases.

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  timminater
                                  wrote on last edited by timminater
                                  #48

                                  How do I request information from a node from the gateway?

                                  I have a relayactuator node with 2 relays that is transmitting its initial state at the startup of the node. This is also received by the gw.
                                  But after that I cant seem to request the current relay status from the node by sending a message from the gateway.

                                  I tried lots of combinations, nothing worked.

                                  I thought this would be correct:
                                  1;2;2;1;2;0\n
                                  1=node number
                                  2=sensor (relay number 2)
                                  2=request
                                  1=ack message
                                  2=light
                                  0=string??

                                  Can anyone point me in the correct location?
                                  maybe a new API page for 1.4 would be handy

                                  edit: also I can't find anywhere what the debug letters mean
                                  what is s=,c=,t=,pt=,l=,st= ??

                                  hekH 1 Reply Last reply
                                  0
                                  • T timminater

                                    How do I request information from a node from the gateway?

                                    I have a relayactuator node with 2 relays that is transmitting its initial state at the startup of the node. This is also received by the gw.
                                    But after that I cant seem to request the current relay status from the node by sending a message from the gateway.

                                    I tried lots of combinations, nothing worked.

                                    I thought this would be correct:
                                    1;2;2;1;2;0\n
                                    1=node number
                                    2=sensor (relay number 2)
                                    2=request
                                    1=ack message
                                    2=light
                                    0=string??

                                    Can anyone point me in the correct location?
                                    maybe a new API page for 1.4 would be handy

                                    edit: also I can't find anywhere what the debug letters mean
                                    what is s=,c=,t=,pt=,l=,st= ??

                                    hekH Offline
                                    hekH Offline
                                    hek
                                    Admin
                                    wrote on last edited by
                                    #49

                                    @timminater

                                    You cannot request state from a node without programming a little . I answered exactly this question a couple of posts back in this thread.

                                    http://forum.mysensors.org/topic/168/1-4-beta/34

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      mitekg
                                      wrote on last edited by
                                      #50

                                      @hek
                                      Could u plz help me
                                      getting in eth GW. Vera and Libs updated.

                                      **0;0;3;9;Arduino startup complete.
                                      0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                      0;0;3;9;version mismatch0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                      0;0;3;9;version mismatch0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                      0;0;3;9;version mismatch0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                      **

                                      hekH 1 Reply Last reply
                                      0
                                      • M mitekg

                                        @hek
                                        Could u plz help me
                                        getting in eth GW. Vera and Libs updated.

                                        **0;0;3;9;Arduino startup complete.
                                        0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                        0;0;3;9;version mismatch0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                        0;0;3;9;version mismatch0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                        0;0;3;9;version mismatch0;0;3;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
                                        **

                                        hekH Offline
                                        hekH Offline
                                        hek
                                        Admin
                                        wrote on last edited by
                                        #51

                                        @mitekg

                                        All the zeroes indicates that something is wrong in radio communication. Check wires.

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          mitekg
                                          wrote on last edited by
                                          #52
                                          • The new MySensors Bootloader supporting Over-the-air sketch updates ("client"-side).
                                            • A simple NodeJs Controller to test the OTA stuff ("server"-side).
                                              Is any instructions, how to use this?
                                              thx.
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          8

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular