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. Controller developers news for 2.0.x

Controller developers news for 2.0.x

Scheduled Pinned Locked Moved Announcements
8 Posts 6 Posters 7.2k Views 6 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.
  • H Offline
    H Offline
    hek
    Admin
    wrote on last edited by hek
    #1

    This post describes changes for controller (and plugin) developers for supporting 2.0.x.

    The serial protocol is identical to 1.5.x. But a few more sensor and variable types has been added.

    New Sensor Types

    • S_INFO (36) - LCD text device / Simple information device on controller, uses V_TEXT
    • S_GAS (37) - Gas meter, uses V_FLOW, V_VOLUME
    • S_GPS (38) - GPS Sensor, uses V_POSITION
    • S_WATER_QUALITY (39) - Water quality sensor, uses V_TEMP, V_PH, V_ORP, V_EC, V_STATUS

    New Variable Types

    • V_TEXT (47) - For S_INFO. Text message to display on LCD or controller device
    • V_CUSTOM (48) - Custom messages used for controller/inter node specific commands, preferably using S_CUSTOM device type.
    • V_POSITION (49) - GPS position and altitude. Payload: latitude;longitude;altitude(m). E.g. "55.722526;13.017972;18"
    • V_IR_RECORD (50) - Record IR codes S_IR for playback
    • V_PH (51), - For S_WATER_QUALITY, water PH
    • V_ORP (52) - For S_WATER_QUALITY, water ORP : redox potential in mV
    • V_EC (53) - For S_WATER_QUALITY, water electric conductivity μS/cm (microSiemens/cm)
    • V_VAR (54) - For S_POWER, Reactive power: volt-ampere reactive (var)
    • V_VA (55) - For S_POWER, Apparent power: volt-ampere (VA)
    • V_POWER_FACTOR (56) - For S_POWER, Ratio of real power to apparent power: floating point value in the range [-1,..,1]

    MQTT

    We had to drop the MQTT-gateway-server example as it was utterly un-maintained. Instead we introduce a new MQTT client gateway. It mimics the serial protocol, so it should be much easier to support once you handle the serial/ethernet gateway.

    MY_MQTT_PUBLISH_TOPIC_PREFIX/NODE-ID/SENSOR-ID/CMD-TYPE/ACK-FLAG/SUB-TYPE

    Example outgoing topic (with default prefix) :
    mygateway1-out/1/2/2/0/1

    Example topic for sending data to your sensor network (with default prefix) :
    mygateway1-in/1/2/2/0/1

    This also means a controller can (and should) answer the id-requests and time requests via the MQTT broker just like it is handled for the serial protocol today. Ack messages from sensors is also supported.

    1 Reply Last reply
    4
    • CrankyCoderC Offline
      CrankyCoderC Offline
      CrankyCoder
      wrote on last edited by
      #2

      Will this be able to support OTA updates?

      Home Automation Tinkerer
      www.CrankyCoder.net

      Controller: HomeAssistant in Kubernetes
      Gateway: MQTTClientGateway
      MySensors: 2.3

      1 Reply Last reply
      0
      • S Offline
        S Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #3

        @Jason-Brunk OTA for nodes should work. It's already working since 1.5. Or do you ask for ota by mqtt? or ota in mqtt client gw? I had one esp8266 mqtt gw with arduinoOta working on it.

        1 Reply Last reply
        0
        • CrankyCoderC Offline
          CrankyCoderC Offline
          CrankyCoder
          wrote on last edited by
          #4

          I guess I will have to try to dig up some documentation on the OTA. I am wanting to use mqtt client gateway, but the idea of being able to update my nodes OTA is very appealing.

          Home Automation Tinkerer
          www.CrankyCoder.net

          Controller: HomeAssistant in Kubernetes
          Gateway: MQTTClientGateway
          MySensors: 2.3

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            yoram
            wrote on last edited by
            #5

            Where can I report a bug?

            			(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
            			#ifdef MY_IP_ADDRESS
            				WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
            			#endif
            

            The order should be different, otherwise the gateway will always be initated with DHCP and not with static IP
            The correct code would be

            			#ifdef MY_IP_ADDRESS
            				WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
            			#endif
            			(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
            

            refer to:
            Wifi lib config

            T 2 Replies Last reply
            0
            • Y yoram

              Where can I report a bug?

              			(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
              			#ifdef MY_IP_ADDRESS
              				WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
              			#endif
              

              The order should be different, otherwise the gateway will always be initated with DHCP and not with static IP
              The correct code would be

              			#ifdef MY_IP_ADDRESS
              				WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
              			#endif
              			(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
              

              refer to:
              Wifi lib config

              T Offline
              T Offline
              tekka
              Admin
              wrote on last edited by
              #6

              @yoram Please report it here. Thanks

              1 Reply Last reply
              1
              • Y yoram

                Where can I report a bug?

                			(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
                			#ifdef MY_IP_ADDRESS
                				WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
                			#endif
                

                The order should be different, otherwise the gateway will always be initated with DHCP and not with static IP
                The correct code would be

                			#ifdef MY_IP_ADDRESS
                				WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
                			#endif
                			(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
                

                refer to:
                Wifi lib config

                T Offline
                T Offline
                tekka
                Admin
                wrote on last edited by
                #7

                @yoram Addressed in PR#517.

                1 Reply Last reply
                0
                • HonkH Offline
                  HonkH Offline
                  Honk
                  wrote on last edited by Honk
                  #8

                  I've found some typos on the serial api page.

                  S_DIMMER	4	Dimmable device of some kind	V_STATUS (on/off), V_DIMMER (dimmer level 0-100), V_WATT
                  

                  V_DIMMER needs to be V_PERCENTAGE

                  S_HVAC	29	Thermostat/HVAC device	V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COLD, V_HVAC_FLOW_STATE, V_HVAC_FLOW_MODE, V_HVAC_SPEED
                  

                  V_HVAC_SETPOINT_COLD needs to be V_HVAC_SETPOINT_COOL

                  1 Reply Last reply
                  1

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  29

                  Online

                  12.0k

                  Users

                  11.2k

                  Topics

                  113.4k

                  Posts


                  Copyright 2025 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