Skip to content

OpenHAB

204 Topics 2.4k Posts
  • The best way to connect to OpenHAB

    24
    0 Votes
    24 Posts
    33k Views
    T
    @JimmyH : Yes, it is easy to swap bindings as well as controller. Easy - but it requires some labour. This labour is not complex, it just has to be done. In my specific setup it takes approximately 1-2 minutes per device. If you are using the serial binding in OpenHab it is tempting to perform some processing within the nested case statements (like I did). Retrospectively this was a really bad idea. I think it is a better idea to limit the use of these statements to dispatch the incoming data to the chosen Items - and nothing more. I had a hard time to get used to the functions of OpenHab ".rules" but at last it was worth the effort. Transfer every processing step into separate rules - it will make things easy. In an ideal scenario to switch between serial and MQTT (either serial or over Ethernet) you pull your USB-plug, activate your broker and you are done. Due to laziness and little other reasons I'm stuck with an inhomogeneous system resulting in the work mentioned in the beginning - it is tedious but i leads to the desired results.
  • MQTT/OpenHab gw.request reply

    mqtt openhab
    3
    0 Votes
    3 Posts
    3k Views
    A
    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.
  • Openhab Puzzle Rule Programmer

    puzzle openhab
    4
    0 Votes
    4 Posts
    3k Views
    A
    Yes, you must copy the openhab/webapps/ directory habmin, and org.openhab.io.habmin. - ****.jar file copy the openhab/addons directory. Then http://localhost:8080/habmin/index.html this address must be available to the administration. If I remember correctly, it is up to version 1.6 of the work for me. Currently I am using 1.5.1. (Sorry for my english)
  • MQTT batterylevel reporting

    3
    0 Votes
    3 Posts
    2k Views
    H
    I'm using OpenHab as controller. It worked pretty good when i had a raspberry as a serial gateway reporting to Openhab, but now I've switched to a MQTT gateway on an UNO. That works fine for a few temp sensors, but i'm having serious trouble getting a 8-channel relay node to work. It works for about 1-2 hours then it stops responding :( Then i have to powercycle it, to get it running again. Currently the temp sensors report this: 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1:81 for a battery reading (81%).

20

Online

11.7k

Users

11.2k

Topics

113.1k

Posts