Navigation

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

    adi32k

    @adi32k

    1
    Reputation
    4
    Posts
    650
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    adi32k Follow

    Best posts made by adi32k

    • RE: MQTT/OpenHab gw.request reply

      Thanks for the suggestion. I found another solution.

      I have the item like this:

      Switch Incalzire_Releu_GF_Living1 "Incalzire Releu Living 1" <heating> (Incalzire) {mqtt=">[mysensor:MyMQTT/3/1/V_HEATER_SW:command:ON:1],>[mysensor:MyMQTT/3/1/V_HEATER_SW:command:OFF:0],<[mysensor:MyMQTT/3/1/V_HEATER_SW:command:MAP(1on0off.map)]"}

      and in 1onoff.map i have:

      **1=ON
      0=OFF
      1.4.1=REQUEST
      **

      And then I have a rule:

      rule "SW1 Persist"
      when
      Item Incalzire_Releu_GF_Living1 received command
      then
      if (receivedCommand == "REQUEST")
      {
      sendCommand(Incalzire_Releu_GF_Living1 , Incalzire_Releu_GF_Living1.state);
      }
      end

      In the arduino code for the relay I have in the setu() this code.

      **void setup()
      {

      gw.begin(incomingMessage, AUTO, true);

      gw.sendSketchInfo("Relay Control", "1.0");

      for (int sensor=1 ; sensor<=NUMBER_OF_RELAYS;sensor++)
      {
      gw.present(sensor, S_HEATER);
      gw.request(sensor, V_HEATER_SW,0);
      }
      }**

      So whenever gw.request is called the idem receives an update with 1.4.1 that is resolved by the rule to the actual state of the switch in openhab.

      Like this, when arduino starts, the relays will be swiched ON as per the actual state of the switch.

      posted in OpenHAB
      adi32k
      adi32k

    Latest posts made by adi32k

    • RE: MQTT/OpenHab gw.request reply

      Thanks for the suggestion. I found another solution.

      I have the item like this:

      Switch Incalzire_Releu_GF_Living1 "Incalzire Releu Living 1" <heating> (Incalzire) {mqtt=">[mysensor:MyMQTT/3/1/V_HEATER_SW:command:ON:1],>[mysensor:MyMQTT/3/1/V_HEATER_SW:command:OFF:0],<[mysensor:MyMQTT/3/1/V_HEATER_SW:command:MAP(1on0off.map)]"}

      and in 1onoff.map i have:

      **1=ON
      0=OFF
      1.4.1=REQUEST
      **

      And then I have a rule:

      rule "SW1 Persist"
      when
      Item Incalzire_Releu_GF_Living1 received command
      then
      if (receivedCommand == "REQUEST")
      {
      sendCommand(Incalzire_Releu_GF_Living1 , Incalzire_Releu_GF_Living1.state);
      }
      end

      In the arduino code for the relay I have in the setu() this code.

      **void setup()
      {

      gw.begin(incomingMessage, AUTO, true);

      gw.sendSketchInfo("Relay Control", "1.0");

      for (int sensor=1 ; sensor<=NUMBER_OF_RELAYS;sensor++)
      {
      gw.present(sensor, S_HEATER);
      gw.request(sensor, V_HEATER_SW,0);
      }
      }**

      So whenever gw.request is called the idem receives an update with 1.4.1 that is resolved by the rule to the actual state of the switch in openhab.

      Like this, when arduino starts, the relays will be swiched ON as per the actual state of the switch.

      posted in OpenHAB
      adi32k
      adi32k
    • MQTT/OpenHab gw.request reply

      How can I make OpenHab respod to gw.request(sensor, V_HEATER_SW,0);

      I have a relay actuator sketch and in setup() I have this

      for (int sensor=1 ; sensor<=NUMBER_OF_RELAYS;sensor++)
      {
      gw.present(sensor, S_HEATER);
      gw.request(sensor, V_HEATER_SW,0);
      }

      practically I would like OpenHab to respond to the gw.request with the last state of the relay that OpenHab knows.

      My item definition is the follwing. I am able to ON and OFF the relay, but I need to find a way to get the values from OpenHab of the relays when the relay actuator arduino reboots.

      Switch Incalzire_Releu_GF_Living2 "Incalzire Releu Living 2" <heating> (Incalzire) {mqtt=">[mysensor:MyMQTT/3/2/V_HEATER_SW:command:ON:1],>[mysensor:MyMQTT/3/2/V_HEATER_SW:command:OFF:0]"}

      posted in OpenHAB
      adi32k
      adi32k
    • RE: OpenHAB/MQTT Tips & Hints

      How can I make openhad respod to gw.request(sensor, V_HEATER_SW,0);

      I have a relay actuator sketch and in setup() I have this

      for (int sensor=1 ; sensor<=NUMBER_OF_RELAYS;sensor++)
      {
      gw.present(sensor, S_HEATER);
      gw.request(sensor, V_HEATER_SW,0);
      }

      practically I would like openhab to respond to the gw.request with the actual state of the relay.

      My item definition is the follwing. I am able to ON and OFF the relay, but I need to find a way to get the values from openhab of the relays when the relay actuator arduino reboots.

      Switch Incalzire_Releu_GF_Living2 "Incalzire Releu Living 2" <heating> (Incalzire) {mqtt=">[mysensor:MyMQTT/3/2/V_HEATER_SW:command:ON:1],>[mysensor:MyMQTT/3/2/V_HEATER_SW:command:OFF:0]"}

      posted in OpenHAB
      adi32k
      adi32k
    • RE: MySensors battey board revision 1.0

      Also interested in buying 10. Any update on production ETA?

      posted in Announcements
      adi32k
      adi32k