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. How ethernet gateway code can check if is connected with controller?

How ethernet gateway code can check if is connected with controller?

Scheduled Pinned Locked Moved Development
3 Posts 1 Posters 56 Views 2 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
    matkor
    wrote on last edited by
    #1

    Having arduino ethernet gateway I need to send messages with senors values to controller (Home assistant requirement to auto configure sensors).
    With serial gateway simple sending in first iteration of loop:

    	void loop() {
    		if ( ! inital_msgs_sent ) {
    			inputs.sendStates(); 
    			outputs.sendStates();
    			inital_msgs_sent = true;
    

    worked.

    But with ethernet controller loop starts when HA is not yet connected to GW so sent messages do not reach controller :/
    So, how should I fix it?

    1. Is any way to know if controller is connected ?
    2. Is any way to know if controller requested presentation?
    3. Is any way to know if send message really reached controller?

    TIA, regards,

    M 1 Reply Last reply
    0
    • M matkor

      Having arduino ethernet gateway I need to send messages with senors values to controller (Home assistant requirement to auto configure sensors).
      With serial gateway simple sending in first iteration of loop:

      	void loop() {
      		if ( ! inital_msgs_sent ) {
      			inputs.sendStates(); 
      			outputs.sendStates();
      			inital_msgs_sent = true;
      

      worked.

      But with ethernet controller loop starts when HA is not yet connected to GW so sent messages do not reach controller :/
      So, how should I fix it?

      1. Is any way to know if controller is connected ?
      2. Is any way to know if controller requested presentation?
      3. Is any way to know if send message really reached controller?

      TIA, regards,

      M Offline
      M Offline
      matkor
      wrote on last edited by
      #2

      @matkor said in How ethernet gateway code can check if is connected with controller?:

      1. Is any way to know if controller is connected ?
      2. Is any way to know if send message really reached controller?

      Seems positive send() result means message reached controller when executed on gateway?

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

        Answering one of my own questions.
        On ethernet gateway send() may return true when there is no connected controller, even when there is no ethernet cable plugged in. :/

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


        13

        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