Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. A3V
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    A3V

    @A3V

    1
    Reputation
    5
    Posts
    2
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    A3V Follow

    Best posts made by A3V

    • RE: Nodemanager: How to control a local output from a local input?

      Reply to myself:
      Looking thought the sources and the forum found out that you can do this using hooks.
      so enabled hooking

      #define NODEMANAGER_HOOKING ON
      

      and added the reference to the hook to before.

      void before() {
       Tsensor.setMeasureTimerMode(TIME_INTERVAL);   // set timer 
       Tsensor.setMeasureTimerValue(1); // interval to 1 sec measurement
      
       Tsensor.setPostLoopHook(&myfirstHook);
       ..etc.etc...
       nodemanager.before();
      }
      

      And finally the hook

      void myfirstHook(Sensor* sensor){
        float temperature =  Tsensor.children.get(1)->getValueFloat()
        Serial.println(temperature);
        if (temperature>setpoint) { 
              if (Relay.getStatus()==OFF){
              Relay.setStatus(ON);      // switch off
              } 
        
      
      }
      

      The error that I got initially was caused by using the wrong child: 0 (it starts from 1).

      I wonder if it is possible to do interval < 1 second?

      posted in NodeManager
      A3V
      A3V

    Latest posts made by A3V

    • Is there a Gateway connection timeout?

      Hi all,
      I build a gateway using an ESP32 and connected sensors directly to the gateway.
      When the WIFI connection is not established at start up it hangs showing endlessly
      GWT:TIN:CONNECTING
      For sensor nodes using radio you can set MY_TRANSPORT_WAIT_READY_MS so it will timeout and do the sensor actions without radio connection.
      Is there a Gateway connection timeout similar to MY_TRANSPORT_WAIT_READY_MS?
      I want my Gateway/Sensor to continue setting-up and run when there is no WIFI and preferably retry,

      Any help is highly appreciated.

      posted in General Discussion
      A3V
      A3V
    • RE: Nodemanager: How to control a local output from a local input?

      Reply to myself:
      Looking thought the sources and the forum found out that you can do this using hooks.
      so enabled hooking

      #define NODEMANAGER_HOOKING ON
      

      and added the reference to the hook to before.

      void before() {
       Tsensor.setMeasureTimerMode(TIME_INTERVAL);   // set timer 
       Tsensor.setMeasureTimerValue(1); // interval to 1 sec measurement
      
       Tsensor.setPostLoopHook(&myfirstHook);
       ..etc.etc...
       nodemanager.before();
      }
      

      And finally the hook

      void myfirstHook(Sensor* sensor){
        float temperature =  Tsensor.children.get(1)->getValueFloat()
        Serial.println(temperature);
        if (temperature>setpoint) { 
              if (Relay.getStatus()==OFF){
              Relay.setStatus(ON);      // switch off
              } 
        
      
      }
      

      The error that I got initially was caused by using the wrong child: 0 (it starts from 1).

      I wonder if it is possible to do interval < 1 second?

      posted in NodeManager
      A3V
      A3V
    • Nodemanager: How to control a local output from a local input?

      I am trying to make a temperature control system that has a temperature sensor and a relay.
      I use an ESP32 and set it op as gateway. The sensor and relay are connected to the ESP32
      The sensor and relay should form a closed loop and should be able to run independently from the (Domoticz) controller.
      I want to use the Nodemanager to be able to track the temperature and relay state.
      In my first test I can read my sensor and I can switch my relay from Domoticz.
      I tried to add some code to the loop() to read the temperature locally and print it to the serial port:
      When I e.g. try to print Tsensor.getChild(0)->getValueString() it throws an error.
      My question: what is the proper way to do this?
      How can I get the sensor value and set the relay?
      Any suggestions are much appreciated

      posted in NodeManager
      A3V
      A3V
    • RE: Outdoor (neg temp) sensor for battery power project

      You can also use an analog temperature sensor like MCP9700.
      Needs calibration and small calculations to get the results. There are libs available but you can do it in your code as well.
      Is low power, low voltage, and can do negative.
      I use it in an outdoor sensor on a similar slim node sending every 20 min. Running about 1 year now on 2 AA's.

      posted in General Discussion
      A3V
      A3V
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @vidin You can simply program the 328pb with the standard bootloader using AVRDUDESS.
      The pb version is software compatible with the p version.

      posted in Development
      A3V
      A3V