Parameters and settings

  • Hi,

    I'd like to write settings/parameters to my chicken shed sensor/actuator node. For instance lux level settings, sunset and sundown time, light activation time, etc.
    Has anyone done something similar ? If so, what MySensors mechanism did you use ?
    Do you think there is a need for a specific mechanism to send settings to nodes ?


  • I think normally the controller has all the logic and node behaves more like a sensor/actuator device... but 🙂

    You could publish fake sensors what you can use at controller level to send information to sensor and handle those on message received.
    Some controllers might already support V_HVAC_SETPOINT_HEAT and V_TEXT setting from UI.

    Time setpoint sensors would be what you need but it does not exist.

  • Mod

    @stefaanv has an example for a node that sets variables, maybe you can use that as a base?

  • I usually get parameters from gateway during startup - then you can influence certain values through gateway and no need to change sketch.....

  • Hardware Contributor

    As someone said, im using the login in the controller for this.
    A lux sensor is reporting to the controller (Domoticz), which also keeps track on sunset/sundown.
    I can use LUA code and script events dependent on lux/sun.

    For example turning my windowlights on when lux < 30:

    commandArray = {}
    v = tonumber(otherdevices_svalues['Outsidelight'])
    f  (v <= 30) then
    return commandArray

  • @sundberg84, @pjr
    I prefer to have basic automation in the sensor/actuator combination itself. then if the controller is off-line, the chickens still survive.
    Since my controller is a mix of test/production environment it is nog uncommon for it fail. One common thing is that USB ports change names after reboot in which can both the MySensors and the RfxCom devices stop communicating.

  • @mfalkvidd
    Nope, what I need is variables being set from the controller so that they can be updated/changed without changing the sketch. The scene controller does not do that.

  • Mod

    @stefaanv then it seems what you need seems to be standard functionality for any controller, and standard functionality for MySensors.

    The first dimmer example ( ) requests the value from the controller in setup().
    Another example is

    The dimmer uses a value that can be 0-100. There are other data types. V_TEXT can be used for custom variable types that aren't supported natively by MySensors and the controller.

  • @pjr
    V_HVAC_SETPOINT_HEAT comes closest to what I need but is still related to the sensor/actuator variable that is being controlled. I also need to send parameters that are totally unrelated to any of the sensor/actuator variables. This could f.i. be the cycle time of the measurements, whether or not sleep mode is used, ...
    I launched a feature request in meantime.

Log in to reply

Suggested Topics

  • 1
  • 3
  • 5
  • 3
  • 5
  • 10