I am using OH2 on my rpi 3 and control with this script my power sockets:
.things
Thing exec:command:remote-send [
command="/home/openhabian/wiringPi/433Utils/RPi_utils/send %2$s",
interval=0,
autorun=true]
.items
Switch Power_Plug_Socket_B1 "Stehlampe Schreibtisch" <light> ["Lighting"]
Switch Power_Plug_Socket_B2 "Stehlampe Sofa" <light> ["Lighting"]
.rules
rule "Poweroutlet B1"
when
Item Power_Plug_Socket_B1 received command
then
if(receivedCommand == ON){
Remote_Send_Args.sendCommand("00011 1 1")
// Thread::sleep(200)
// Remote_Send_Args.sendCommand("00011 1 1")
}else{
Remote_Send_Args.sendCommand("00011 1 0")
// Thread::sleep(200)
// Remote_Send_Args.sendCommand("00011 1 0")
}
//wait for the command to complete
while(Remote_Send.state != ON){
Thread::sleep(500)
}
logInfo("Power_Plug_B1", "Resuts are: \n" + Remote_Send_Out.state )
end
rule "Poweroutlet B2"
when
Item Power_Plug_Socket_B2 received command
then
if(receivedCommand == ON){
Remote_Send_Args.sendCommand("00011 2 1")
Thread::sleep(200)
Remote_Send_Args.sendCommand("00011 2 1")
}else{
Remote_Send_Args.sendCommand("00011 2 0")
// Thread::sleep(200)
// Remote_Send_Args.sendCommand("00011 2 0")
}
//wait for the command to complete
while(Remote_Send.state != ON){
Thread::sleep(500)
}
logInfo("Power_Plug_B2", "Resuts are: \n" + Remote_Send_Out.state )
end
Everything was working well till I did this:
[12:52:26] openhabian@pi:~$ sudo aptitude install some-package
Es konnte kein Paket gefunden werden, dessen Name oder Beschreibung auf »some-package« passt.
Es konnte kein Paket gefunden werden, dessen Name oder Beschreibung auf »some-package« passt.
Es werden keine Pakete installiert, aktualisiert oder entfernt.
0 Pakete aktualisiert, 0 zusätzlich installiert, 0 werden entfernt und 52 nicht aktualisiert.
0 B an Archiven müssen heruntergeladen werden. Nach dem Entpacken werden 0 B zusätzlich belegt sein.
[master 9f88ee7] saving uncommitted changes in /etc prior to apt run
Author: openhabian <openhabian@pi>
11 files changed, 103 insertions(+), 222 deletions(-)
rewrite lirc/lircd.conf (90%)
delete mode 100644 lirc/lircd.conf.orig
rename lirc/{lircd.conf.orig2 => lircd_original.conf} (100%)
delete mode 100755 openhab2/sitemaps/helena.sitemap
Updating FireMotD available updates count ...
[12:54:55] openhabian@pi:~$ sudo aptitude
[12:57:09] openhabian@pi:~$ sudo passwd root
Geben Sie ein neues UNIX-Passwort ein:
Geben Sie das neue UNIX-Passwort erneut ein:
passwd: Passwort erfolgreich geändert
What is the mistake and how to solve it ?
Thank you guys !