API questions regarding Home Assistant Core.



  • Dear All,

    digging the various fori, i did not find que concrete answers, so i'm posting this to be sure about the understanding.

    The node sketch shall make use of these defs for HA. Is it right?

    // Node and sketch information
    #define SKETCH_VER "0.2" // Sketch version
    #define SKETCH_NAME "SwitchSensor" // Optional node name
    #define CHILD_ID 3 // Id of the sensor child
    #define CHILD_NAME "DoorWindowSensor" // Optional child sensor name
    #define NODE_REPEATE false // Set true if a repeater node (i.e. always turned on)
    #define BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch

    As i understood:

    • sketch_name - how it will identify itself for HA
    • child_id - the sensor of this node (i.e. the gpio where the sensor is connected to)
    • child_name - the name for this chid_id

    So, on a node sensor, i can have from 0 to 255 child_id's, each with it's name. But how to give a name for each child, if more than one sensor is connected to the node?

    Is this all right? if not, please educate me in the right way.

    And i'm also getting the following:

    This entity does not have a unique ID, therefore its settings cannot be managed from the UI.

    Any hint?



  • I haven't used HA for a while, but i used node ID's(numeric) and node child ID's(again, numeric) to identify sensors. Never added anything to node sketches, no need to, you add all your nodes, sensors and their names in config file anyway...
    there are much better controllers IMHO, at least from ease of use point of view.



  • @pw44 The HA integrations page has useful information of how it al works together, check the presentation paragraph as it is important in HA.

    The node sketch shall make use of these defs for HA. Is it right?

    So, on a node sensor, i can have from 0 to 255 child_id's, each with it's name. But how to give a name for each child, if more than one sensor is connected to the node?

    The name can me customized in the presentation function in the description field:
    https://www.mysensors.org/apidocs/group__MySensorsCoregrp.html#gaef20c35998db495bd4c85bac42a7ad49

    bool present 	( 	const uint8_t  	sensorId,
    		const mysensors_sensor_t  	sensorType,
    		const char *  	description = "",
    		const bool  	requestEcho = false 
    	) 	
    

    Is this all right? if not, please educate me in the right way.

    And i'm also getting the following:

    This entity does not have a unique ID, therefore its settings cannot be managed from the UI.

    Any hint?

    This is a normal error in current versions of HA, the mysensors integration is still manual via YAML and cannot be managed from the HA FrontEnd.


Log in to reply
 

Suggested Topics

  • 1
  • 2
  • 3
  • 3
  • 2

22
Online

11.2k
Users

11.1k
Topics

112.5k
Posts