Help, I'm ready to give up

Seems likely. I typed it on my phone. I recommend using Designer to find and fix the sorts of errors.

The motion sensor may just post updates instead of commands. Use received update ON instead.

Look in the logs when the file loads for parse errors. Content everything out but the log statements to verify the rule triggers

I am using Designer but in rules almost every line gives an error.

Ok. finally figured it out. Here is the code that works:

var Timer timer = null

rule "BALightOn"
when
    Item BA_HUE_Motion received update ON // only trigger when motion is detected, we don't care when the motion sensor goes OFF
then
    logInfo("BALightOn", "Motion detected in Bathroom")
	//say("Motion detected in Bathroom")
    val t6a = now.withTimeAtStartOfDay.plusHours(6) // better way to get to something to compare to now
    val t11p = now.withTimeAtStartOfDay.plusHours(23) // better way to get to something to compare to now

    // Calculate brightness as a separate step to make the logic simpler
    var brightness = 15
    if(now.isBefore(t11p) && now.isAfter(t6a)) brightness = 100
    
    logInfo("BALightOn", "Turning bathroom light to " + brightness)
    bathroom_light.sendCommand(brightness)

    // create a timer to turn off the light if one doesn't already exist
    if(timer == null){ 
        timer = createTimer(now.plusMinutes(1)) [|
            logInfo("BALightOn", "Turning bathroom light off")
            //say("Turning Bathroom light off")
            bathroom_light.sendCommand(OFF)
            timer = null
        ]
    }
    // if there is a timer, reschedule it for another 3 minutes
    else {
        timer.reschedule(now.plusMinutes(1))
    }
end

What version of Designer are you using? That looks like the 0.9 version which is currently unusable. There is a fix undergoing test but for now we should use 0.8. There is a statement in the docs that makes it sound like we should use the latest nightlies which is currently incorrect while this error is in place.

With 0.8 none of those lines would be marked as errors.

Glad you got it working.

Yeah i was following the instructions and using the .9 version. I switched
back to the .8 version.

Zwave is frustrating!!! I cant’ seem to get it working. I did once and then had like 20 nodes and wanted to reset it so that only the 3 nodes that actually exist show up. So I deleted all things, reset the zwave devices and now I can’t get anything to work.

I cannot confirm that statement, zwave is working fine here without any bigger problems.
You are giving not many details on your actual problem, so it’s hard to help.

If you really did that you have excluded all your devices from your network. Resetting a device means automatically excluding. So you have to start over again and do an inclusion …
Your REALLY need to start reading the docs!

I’d love to dig into it, if I only could get it to open :wink:

Yes, your post is very frustrating. Every Raspberry pi is the same, so take a working Rapsberry Pi coupled with a decent power supply and a good micro SD card correctly programmed with OpenHabian and a reliable internet connection, will correctly install Openhab EVERTIME, no exceptions.

If not, then either you are doing something wrong or part of your equipment is faulty.

1 Like

Hello Ed, everyone here just wants to help. Sadly from your posting there is not much to go with.

What still boggles me is that an apt-get setup puts files in different directories than the manual setup.

That’s the way Linux organizes files. Over the last decades thousands and thousands of people have perfected this and everyone working with Linux should read up on these basics. Regarding the openHAB setup, we’ve made sure to make 100% clear, where the files are located. It still boggles me how so often people are rattled by this.

it just doesnt work with no indication why

``

do exactly as told… does nothing.

``

For openHAB to become a serious platform first and foremost it needs to work.

How could one even start to give an advice here… The process of setting up openHAB is straight forward. The installation instructions (especially addressing the one for Debian/Ubuntu) are crystal clear and were updated almost monthly lately. With openHABian we even provide a ready-to-go solution without any need for manual setup steps: quote

Why cant it just work predictably after people follow the official setup.

It does. For (looking at download statistics) probably around a few thousand people over the last month alone. If you are not seeing the results you are aiming for, you are either not following the instructions or you are expecting the wrong results. In both cases it would help us and yourself, if you would compose a message, with a clear description of the situation you are in.

I’m the last one to not help a new openHAB user. Pointless rantings like seen in a few postings here in this one thread make me question the value of this effort on my side.

1 Like

I’m starting to think this is by intention …

Personally I believe the reason for frustration might be found in the fact that people start their endeavors with the wrong expectations. We are rather used to things being plug and play nowadays, especially when they look fancy and come in fashionable packaging as for example the Fibaro stuff. Some people even say that when you need to read a manual, the product is not well designed (for the record, I tend to disagree, depending on the product).

However, OpenHAB is different, with its advantages and disadvantages. Main advantage, way more possibilities, they seem endless and go way beyond even what the designers envisioned on beforehand. If something is not possible, you can make it possible. Main disadvantage, I found it is bloody complicated, and really requires investment in trying things, making mistakes and most importantly, reading docs and this forum.

Maybe this distinction could/should be more clear on the webpages, to ensure people start off with realistic expectations. Maybe OpenHAB could be compared with Linux and e.g. Fibaro stuff with Apple (just a suggestion, don’t know if it is a good one). What is seen as a challenge by some can be frustrating for others.

And for the ones who are now frustrated I would suggest to either indeed give up, or ask specific questions in the appropriate sections of the forum. As a relative beginner myself I am afraid I can not yet contribute much to answering those, but you will find that many are already asked and answered. Start simple, single device, add stuff one by one. Before starting buying stuff, you can even start by playing with bindings that do not require any hardware (such as the Astro binding), to get a feeling for it.

7 Likes

Thom, thanks for your effort. It wasnt my intention to do poitless ranting here but to show I understood the frustration of the original poster. As far as my problems go, I had all the details in a separate posting Cannot connect to openhab2 on ip:8080
My frustration being that even onm a fresh OS install and following the openHAB instructions to the letter and seeing that the runtime started, I just can’t open it.
You say it works, I am sure it does otherwise no one would try anymore, but as the many questions on e.g. this forum alone it is undeniable that lot of people have problems with it, and that was exactly the point I was trying to vent here.
I did follow instructions to the letter and the only expectation I had was that I would see something on ipnr:8080

Again, I was not trying to find an answer in this posting (that is what the other posting was for), just making clear I understood the frustration. If that seemed like ranting, that was not my intention

Sihui, I don’t think it is. People come to openhab because they think it is a product they really want to use and then after trying and trying, frustration sets in.
If i would see an app in the Google Playstore of which I think 'hey nice. lets try, and it turns out to be a dud, I just delete it. That I keep trying with openHAB is because I see the value of it and that makes the frustration just bigger.
My posting here was just to voice I understood original posters frustration, not asking for help as I did that in a separate post where I did give al the details, sadly that has gone mostly unnoticed.

Amen… :slight_smile:

I like your suggestion Linux vs Apple…

Exactly where the product (openHAB) sits! … like Linux; the ones who live and breath it, or related programming may fly in it, but for the Apple and even Windows world it is frustrating to the nth degree… me included.

But, like you I see its value, and have since spent weeks reading up on openHAB.

And I have asked myself whether I have lost it a few times… the same amount of time I was sorting out my createTimer() problem over two days (5 lines of code), I wrote 500 lines of C code for a tank level controller (which works; sure it had bugs… but I got there without having to ask someone).

Anyway… I second the idea of actually stating on the openHAB website…
The benefit will be that people shy away early on rather than ending up frustrated and bagging the product.

Sorry, but in that post you are making the same mistake: you don’t give any valuable detail, I’m only reading

It is a fact when you install openHABian it works right out of the box. Although I don’t use openHABian because I try to learn more about Linux, so I installed it on a clean Raspbian Jessie … and it worked also right out of the box. I just followed the tutorial step by step.

So the question is: at what step of your openHABian install you got an error? Which error message? What does your openhab.log tell you?

I gave the details about the original openHAB2 install, the openHabian problems for now I am willing to blame on a dodgy sd card.

It is the apt-get install on clean Jessie (besides a previous Mosquitto install) that I tried to get to work and gave details on

You are right, that happens more often than one can expect.

I did a manual install on a clean Jessie (although the apt-get is the preferred method, but that is because I’m using a USB SSD without a sd card to boot my RPi3).

The only thing I had to do, besides following the official installation instructions, was to add
sudo adduser --disabled-login openhab
the openhab user to samba.
As I have now read again through the official installation instructions, this was added a while ago, although it is not necessary to have a samba share to run openHAB2 … but it makes life a lot easier.

So I can assure you: a clean Jessie and an apt-get install of openHAB2 works.

Good luck and don’t hesitate to ask again, we are all willing to help.

Edit: If you have problems with logging in via ssh, don’t forget to read these steps from the docs:

Attention: As of the November 2016 release, Raspbian has the SSH server disabled by default. You will have to enable it manually. For headless setup, SSH can be enabled by placing a file named ‘ssh’, without any extension, onto the boot partition of the SD card.

1 Like

@sihui

Yes I really did that and it is what I intended to do. I wanted the network to be reset and to start completely over because for some reason the controller (Aeon ZStick Gen5) had registered many more nodes than what I had yet none of the devices were communicating to openHab. I wanted to reset to defaults and start over.

I have been reading the docs. That’s where I start. The issue is that the docs don’t always tell you what you need to know in order to make something work. According to the docs the security for Zwave plus should work yet i find buried deep in a community post that you have to disable security for things to work. After I found that and disabled security things started working.

Good luck with your further openHAB experience.