i use an rpi3 with openhab 3.0.0.
Since a week, maybe 2… my curtains (gordijn in dutch) and 1 light received a command which i did not press
so i checked my logs and see this:
2022-05-12 11:40:25.933 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Livingeettafelrolgordijn' received command UP
2022-05-12 11:40:25.951 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Livingeettafelrolgordijn' predicted to become UP
2022-05-12 11:40:26.102 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Livingeettafelrolgordijn' changed from 0 to 100
2022-05-12 11:40:26.798 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-12 11:40:26.817 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-12 11:40:26.830 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Keukenrolgordijn' changed from 100 to 0
2022-05-12 11:40:27.477 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Livingterrasrolgordijn' received command UP
2022-05-12 11:40:27.516 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Livingterrasrolgordijn' predicted to become UP
2022-05-12 11:40:27.624 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Livingterrasrolgordijn' changed from 0 to 100
2022-05-12 11:40:28.123 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Livingtuinrolgordijn' received command UP
2022-05-12 11:40:28.136 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Livingtuinrolgordijn' predicted to become UP
2022-05-12 11:40:28.247 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Livingtuinrolgordijn' changed from 0 to 100
This does not tell me a lot i think, is there a way to find what the input was from the command used?
Beside the curtains i also had 1 yeelight turning off.
The full log goes back nearly 2 hours if anyone would need that, but i dont see anything special in that beside other devices.
I don’t have any rules setup neither that has my curtains as an item.
20 min ago… all my curtains whent up (thats the log you see)
few other times during last week … just 1 curtain whent down, never up. (rest were down already).
The external port to openhab is closed on my firewall, i only use the Openhab app over wifi.
I do have a google home connected.
There is no way to see why a certain command was issued.
You can check /disable your rules to see if the event was triggered by a rule or in worst case delete the item and recreate it with a different name, than any other ui action /script will fail to send a command and you will maybe see an error message giving you a hint
You’ve looked and posted logs from events.log. In that same folder there is another file named openhab.log which is where most of the actually useful logging goes. events.log only shows the commands and changes that occur on your Items. openhab.log will show errors, warnings and other useful stuff from the bindings and your rules.
You’ve confirmed that these Items are not directly referenced in any of your rules. What about indirectly through one of the Groups they are members of?
How many UI’s do you have open? For example, do you have a tablet with MainUI up somewhere, house members with phone apps, stuff like that?
There is one other thread I know of with a similar report but it’s using the MQTT binding. But I think it involves lights and rollershutters too. @rossko57, my search skills are failing me, do you have the link to that other thread handy? Maybe this could be a second case which might point to a problem.
I am reasonably sure its not in use by any rules, i only use a few.
A few scenes to turn lights on or off, and none use a group.
We actually only use google home, but i have 1 tablet next to me in the office, via HABPanel,
But no curtains are setup on that tablet, the yeelight is tho.
I also see in the logs this:
This all happend in 1 second.
2022-05-10 07:54:16.793 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.811 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.830 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.836 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Keukenrolgordijn' changed from 100 to 0
2022-05-10 07:54:16.841 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.850 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.858 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.907 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.914 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.920 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.928 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.949 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.953 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.980 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:16.992 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:16.999 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.005 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.017 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.024 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.068 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.073 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.096 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.104 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.116 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.129 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.136 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.146 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.164 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.167 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.205 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.209 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.272 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.278 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.327 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.333 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.712 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.719 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.776 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.780 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:17.956 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:17.960 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:18.037 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:18.044 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:18.063 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:18.069 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:18.159 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:18.174 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:18.459 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:18.467 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.027 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.035 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.050 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.055 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.072 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.085 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.114 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.125 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.139 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.143 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.160 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.165 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:19.172 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:19.177 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:23.886 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:23.891 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:23.909 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:23.914 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:23.995 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:24.000 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-10 07:54:24.017 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-10 07:54:24.023 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
UPDATE 13/5:
15 min ago (08:44) all curtains whent up. (3 curtains are in the living, 1 kitchen)
My yeelight changed color at the same time. (In my office)
And 1 simpel ceiling light turned off. (in my office)
2022-05-13 08:44:45.925 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Officelililicht' received command OFF
2022-05-13 08:44:45.949 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Officelililicht' predicted to become OFF
2022-05-13 08:44:45.964 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Officelililicht' changed from ON to OFF
2022-05-13 08:44:55.931 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'YeelightMonitor_ColorTemperature' received command 84
2022-05-13 08:44:55.947 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'YeelightMonitor_ColorTemperature' predicted to become 84
2022-05-13 08:44:55.959 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'YeelightMonitor_ColorTemperature' changed from 27 to 84
==> /var/log/openhab/openhab.log <==
2022-05-13 08:44:56.517 [INFO ] [light.internal.lib.device.DeviceBase] - ######### this is control command response, don't need to notify status change!
2022-05-13 08:44:56.521 [INFO ] [light.internal.lib.device.DeviceBase] - status = DeviceStatus [isPowerOff=false, r=75, g=81, b=77, color=4936013, brightness=10, ct=5732, hue=140, sat=7, isFlowing=false, delayOff=-1, mFlowItems=null, mode=MODE_SUNHINE, isMusicOn=false, name=RGB, backgroundIsPowerOff=false, backgroundR=0, backgroundG=0, backgroundB=0, backgroundHue=0, backgroundBrightness=0, backgroundSat=0, activeMode=null]
==> /var/log/openhab/events.log <==
2022-05-13 08:44:56.534 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Officebjornlichtsmartcolor' changed from 140,7,10 to 139,7,10
2022-05-13 08:44:56.537 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'YeelightMonitor_Color' changed from 140,7,10 to 139,7,10
2022-05-13 08:44:56.540 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Officebjornlichtsmartdim' changed from 27 to 84
2022-05-13 08:45:00.888 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Livingeettafelrolgordijn' received command UP
2022-05-13 08:45:00.901 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Livingeettafelrolgordijn' predicted to become UP
2022-05-13 08:45:01.030 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Livingeettafelrolgordijn' changed from 0 to 100
2022-05-13 08:45:01.878 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Keukenrolgordijn' received command UP
2022-05-13 08:45:01.897 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Keukenrolgordijn' predicted to become UP
2022-05-13 08:45:01.910 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Keukenrolgordijn' changed from 100 to 0
2022-05-13 08:45:02.569 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Livingterrasrolgordijn' received command UP
2022-05-13 08:45:02.594 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Livingterrasrolgordijn' predicted to become UP
2022-05-13 08:45:02.731 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Livingterrasrolgordijn' changed from 0 to 100
2022-05-13 08:45:03.172 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Livingtuinrolgordijn' received command UP
2022-05-13 08:45:03.201 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Livingtuinrolgordijn' predicted to become UP
2022-05-13 08:45:03.306 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Livingtuinrolgordijn' changed from 0 to 100
Around the same time i only see this in the openhab.log file:
Hi @rlkoshak
i dont want to spam you but this is getting a real issue.
Is there anything that you could think of that i can try please?
Last night, first, some lights turned on (none of them already mentioned here, so toilet, grocery room, bathroom a few ones…)
Turned them off… whent back in to bed.
10 min later every single light in the house turned on. (no curtains btw).
Turned them off and switched off my RPI.
I am kind a desperate.
i believe i need a reinstall.
But then i will have to buy a new RPI and SD card to play around untill everything is setup.
If possibly i would like to avoid that.
Already restarted the openhab service and or device multiple times.
@Peacemaker There is something that triggers items to update. I would try @Matze0211’s suggestion. As you use file based configuration, just change the name of the items in the configuration. That should generate errors when something tries to update them.
For the nikohomecontrol binding, you could switch on debug logging. That would give you some extra info on what is being done inside the binding for the curtains and the ceiling lights. It would still not explain where the trigger comes from. Are you using NHC I or II? NHC II uses MQTT under the hood.
Do you have any rules that are impacting items based on outside light or weather? Maybe using one of the weather bindings or the astro binding as an input?
i opened home.items and change the name of an item that goes on sometimes, i will wait now for it to happen again. (should be later today, its happening a lot last few days, + its also usualy not the same lights that turn on, although this started with only the curtains and 1 light))
Never done this, but after reading up i believe i need to do via SSH:
log:set DEBUG org.openhab.binding.nikohomecontrol
To turn this back off i believe i need to:
log:set OFF org.openhab.binding.nikohomecontrol
is this correct?
And in what file can i then find the info?
here: log4j2.xml ?
I use NHC1 and i do not use MQTT anywhere, also not for other stuff beside NHC i mean then.
Yes. i use the Astro Binding.
1 rule to turn on 2 outdoor lights. (Sorry Rlkoshak, seems i do use a group )
rule "Sunset Buitenverlichting aan"
when
Channel 'astro:sun:home:set#event' triggered START
then
logInfo("sunset-rule", "Buiten Verlichting AAN")
Timeroutdoor.sendCommand(ON)
end
1 rule to turn them back off.
rule "Sunrise Buitenverlichting uit"
when
Channel 'astro:sun:home:rise#event' triggered START
then
logInfo("sunrise-rule", "Buiten Verlichting UIT")
Timeroutdoor.sendCommand(OFF)
end
Timeroutdoor is a group defined in my home.items
Group Home "home" <huis>
Group Timeroutdoor "Timer Buitenverlichting" (Home)
rule "not home between 17-18 - lights on"
when
Channel "astro:sun:home:set#event" triggered START
then
logInfo("not-home-rule", "Avond Wandverlichting indien niet Thuis")
if((now.getHour() <= 18) && Bjornphone.state == OFF){
Livingwandlicht.sendCommand(ON)
}
end
The rest of the astrobinding is only for displaying information in my Sitemap
@Peacemaker Indeed, change the log from the openhab console. SSH into your RPi and use the openhab-cli console command. You will then be able to use the log commands to set the log level.
OFF will also completely eliminate the ERROR, WARN and INFO messages.
All the extra logging should end up in openhab.log.
It is strange this starts happening with more of your items. There is another post with similar strange behaviour. One of the things being looked into there rogue external access. As you have indicated the port of your RPi is not accessible from the outside, the only thing creating an outside access is your Google Home. A next step could be to try to disable that?
Another suggestion, try to put an INFO log statement in all of your rules. You would be able to see when a rule is triggered, and maybe derive something from that.
Yes, did this after some suggestion from rlkoshak, so have been using loginfo since a week or 2.
Items come active without a rule.
forget what i said about the port… i was wrong… i checked my router and there is a portforward active.
8080 and 9001 to the IP of my openhab.
I rly thought i disabled this, completely confused… but anyway… yes you are correct.
So rogue external access possibility …
I want to know for sure… so will not disable the port foward yet.
Is there some place to see what IP’s/ user is logging in to openhab?
The sitemap is accessable without logging in, i just tried this on my phone via 4G… opened a browser and put : ipadres:8080/basicui/sitemapname (you know what i mean), works.
Any logging available for something like this?
Or something i can setup?
I would strongly suggest to disable external access immediately!
If you have a firewall on your RPi (something like ufw), you could set it up so you can see logging of connection attemtps. Otherwise, there is no easy way. Also, depending on your router, you may be able to set up logging there.
Use openhab cloud for any external access. This is secure and does not need to have any ports open. You will still be able to access your UI from it.
i do not have any knowledge about any firewall on the RPI itself, so if it takes a manual handling to install… i’d say i did not install this yet.
Never heard of it neither, + dont know much about linux
I need to read up on how to install and use, thank you for the tip.
But from what i do understand… i assume this is a software firewall that runs in paralel with Openhab on the RPI but has no real relation with the OpenHAB, like bindings or items?
Correct. And it is not likely you have it installed.
You absolutely do not need to have any ports open to the outside for openHAB, so I would strongly advise against it. I had a quick look earlier on shodan.io and immediately found a number of openhab installations completely open. I just had to connect to the URL to be presented with the UI, and be able to switch lights etc.
Just removed any port forwarding to the RPI and i believe it is kind a clear what is happening then.
I wont be needing the the firewall…
Now… how does one get on that list
Thx for the Tip!
Sorry everyone for making it more complicated by not providing the correct information always.
Thank you all!
You have a port exposed to the internet. Several times a day Shodan scans all IP addresses looking for open ports. When it finds one, it might do a little interrogation of the port to see what’s running there. Most of the time it doesn’t even need to do that much because most services just announce what they are in that initial reply.
If you don’t want to be in Shodan, don’t port forward anything in your firewall.