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
A

adi32k

@adi32k
Unfollow Follow
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MQTT/OpenHab gw.request reply
    A adi32k
    OpenHAB mqtt openhab

    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.


  • MQTT/OpenHab gw.request reply
    A adi32k
    OpenHAB mqtt openhab

    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]"}


  • OpenHAB/MQTT Tips & Hints
    A adi32k
    OpenHAB

    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]"}


  • MySensors battey board revision 1.0
    A adi32k
    Announcements

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

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular