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. Development
  3. MySensors 1.6 availability?

MySensors 1.6 availability?

Scheduled Pinned Locked Moved Development
13 Posts 7 Posters 4.3k Views 7 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.
  • M Offline
    M Offline
    Mihai
    wrote on last edited by
    #1

    I am interested about the 1.6 version of MySensors, mainly for the MQTT Gateway using W5100, while this is not available today even in the development version. Do you have an estimation about this release availability or at least about the Gateway using W5100?
    Until now, I succeed to implement the 1.5 version of MQTT Gateway with 5100 to work with Home Assistant, while the Serial Gateway doesn't work for me.
    Thank you

    barduinoB 1 Reply Last reply
    0
    • dakkyD Offline
      dakkyD Offline
      dakky
      wrote on last edited by
      #2

      https://github.com/mysensors/Arduino/tree/development/libraries/MySensors/examples/GatewayW5100
      :question:

      Controller: Raspberry Pi 2 :: Openhab2 :: with @TimO MySensors Binding
      Gateway: Arduino MEGA 2560 R3 :: W5100 :: Ethernet GW

      Software: MySensors 2.0development

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Mihai
        wrote on last edited by
        #3

        The link is about the Ethernet Gateway, not MQTT Gateway. However, none of them seems to be ready, the setup and loop are empty. I am using now MQTT Gateway from 1.5 version together with HomeAssistant, I have posted my code (now is under testing), but I cannot add other MQTT devices.

        YveauxY 1 Reply Last reply
        0
        • M Mihai

          The link is about the Ethernet Gateway, not MQTT Gateway. However, none of them seems to be ready, the setup and loop are empty. I am using now MQTT Gateway from 1.5 version together with HomeAssistant, I have posted my code (now is under testing), but I cannot add other MQTT devices.

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

          @Mihai In 1.6 @hek refactored the code, so loop() and setup() are supposed to be empty. The MQTT stuff runs outside these functions.

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • M Mihai

            I am interested about the 1.6 version of MySensors, mainly for the MQTT Gateway using W5100, while this is not available today even in the development version. Do you have an estimation about this release availability or at least about the Gateway using W5100?
            Until now, I succeed to implement the 1.5 version of MQTT Gateway with 5100 to work with Home Assistant, while the Serial Gateway doesn't work for me.
            Thank you

            barduinoB Offline
            barduinoB Offline
            barduino
            wrote on last edited by
            #5

            @Mihai

            I'm not sure I follow your question.

            The 1.6 dev environment has GatewayW5100MQTTClient here: https://github.com/mysensors/Arduino/tree/development/libraries/MySensors/examples/GatewayW5100MQTTClient

            You can see the actual protocol in actions here: https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MyGatewayTransportMQTTClient.cpp

            Cheers

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mihai
              wrote on last edited by
              #6

              Thank you for explanation, I was expected a regular sketch with setup and loop doing their jobs, I didn't know they could be empty.

              barduinoB 1 Reply Last reply
              0
              • M Mihai

                Thank you for explanation, I was expected a regular sketch with setup and loop doing their jobs, I didn't know they could be empty.

                barduinoB Offline
                barduinoB Offline
                barduino
                wrote on last edited by
                #7

                @Mihai, I see.

                As @Yveaux said, this is a refactor / change in architecture from 1.5 to 1.6

                For example:

                The serial gateway from 1.5 (setup and loop):

                void setup()  
                { 
                  gw.begin(incomingMessage, 0, true, 0);
                
                  setupGateway(INCLUSION_MODE_PIN, INCLUSION_MODE_TIME, output);
                
                  // Add interrupt for inclusion button to pin
                  PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, RISING);
                
                
                  // Send startup log message on serial
                  serial(PSTR("0;0;%d;0;%d;Gateway startup complete.\n"),  C_INTERNAL, I_GATEWAY_READY);
                }
                
                void loop()  
                { 
                  gw.process();
                
                  checkButtonTriggeredInclusion();
                  checkInclusionFinished();
                  
                  if (commandComplete) {
                    // A command wass issued from serial interface
                    // We will now try to send it to the actuator
                    parseAndSend(gw, inputString);
                    commandComplete = false;  
                    inputPos = 0;
                  }
                }
                

                Serial gateway from 1.6 (set up loop and new presentation section):

                void setup() { 
                  // Setup locally attached sensors
                }
                
                void presentation() {
                 // Present locally attached sensors 
                }
                
                void loop() { 
                  // Send locally attached sensor data here 
                }
                
                

                Cheers

                mppM 1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Mihai
                  wrote on last edited by
                  #8

                  Thanks, I already succeed to test the MQTT Gateway 1.6 and it seems to work (subscribe ok to mosquitto, send and receive some commands), but still looking for the Serial API related to 1.6 for better understanding how to program HomeAssistant to work together.

                  1 Reply Last reply
                  1
                  • M Offline
                    M Offline
                    Mihai
                    wrote on last edited by
                    #9

                    I cannot control relay from HomeAssistant to MySensors 1.6. I was built my own node sketch wit 4 relays and other sensors. The command for relays are "ON" and "OFF".
                    I have added the following line into the receive procedure for testing purposes:

                    Serial.print("Message data:  ");Serial.println(message.data);
                    

                    And find out the messages reach the node as following:

                    read: 0-0-10 s=1,c=1,t=2,pt=0,l=3,sg=0:OFF
                    Message data:  OFFIRTempa
                    

                    and it is the same for sensors:

                    read: 0-0-10 s=6,c=1,t=0,pt=0,l=3,sg=0:NAN
                    Message data:  NANIRTempa
                    

                    (NAN is because the temperature sensor is not connected, never mind)
                    So the message contains the data plusoffset "IRTTempa". When I compare the data string with my expected value they didn't match: OFF is not the same with OFFIRTempa.
                    For 1.5 version I get them work fine over MQTT with exactly the right string.
                    Do you have any advice? Thank you.

                    1 Reply Last reply
                    0
                    • ahmedadelhosniA Offline
                      ahmedadelhosniA Offline
                      ahmedadelhosni
                      wrote on last edited by
                      #10

                      I guess there was a topic regarding the same issue and how to fix but i cant find it.
                      I found another one. Check whether this is related or not http://forum.mysensors.org/topic/2688/isue-bug-in-message-getint-or-getfloat-payload-dos-not-reinitialized-completely

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        Mihai
                        wrote on last edited by
                        #11

                        Thank you for hint, inside the provided link page I found another one: https://github.com/mysensors/Arduino/pull/317 and there I understand the issue was solved in the available development version, so I download it, install and it works now!

                        1 Reply Last reply
                        2
                        • crankyC Offline
                          crankyC Offline
                          cranky
                          wrote on last edited by
                          #12

                          Ah, so it was a regression! I made my Neopixel node with this bug in mind. I just grabbed the newest 1.6 a few hours ago, so I'll assume it's fixed.

                          Cool beans!

                          1 Reply Last reply
                          0
                          • barduinoB barduino

                            @Mihai, I see.

                            As @Yveaux said, this is a refactor / change in architecture from 1.5 to 1.6

                            For example:

                            The serial gateway from 1.5 (setup and loop):

                            void setup()  
                            { 
                              gw.begin(incomingMessage, 0, true, 0);
                            
                              setupGateway(INCLUSION_MODE_PIN, INCLUSION_MODE_TIME, output);
                            
                              // Add interrupt for inclusion button to pin
                              PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, RISING);
                            
                            
                              // Send startup log message on serial
                              serial(PSTR("0;0;%d;0;%d;Gateway startup complete.\n"),  C_INTERNAL, I_GATEWAY_READY);
                            }
                            
                            void loop()  
                            { 
                              gw.process();
                            
                              checkButtonTriggeredInclusion();
                              checkInclusionFinished();
                              
                              if (commandComplete) {
                                // A command wass issued from serial interface
                                // We will now try to send it to the actuator
                                parseAndSend(gw, inputString);
                                commandComplete = false;  
                                inputPos = 0;
                              }
                            }
                            

                            Serial gateway from 1.6 (set up loop and new presentation section):

                            void setup() { 
                              // Setup locally attached sensors
                            }
                            
                            void presentation() {
                             // Present locally attached sensors 
                            }
                            
                            void loop() { 
                              // Send locally attached sensor data here 
                            }
                            
                            

                            Cheers

                            mppM Offline
                            mppM Offline
                            mpp
                            wrote on last edited by
                            #13

                            This wasn't clear to me either, I was expecting to see setup() & loop(). Perhaps a note or some documentation why this is empty would be useful.

                            MyController with USB powered WeMos D1/mini ESP8266 MQTT Gateways and battery powered Arduino Pro Mini using the RFM69 radio

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            20

                            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