Systeminfo [ERROR] No information for channel battery#remainingCapacity with device intex 0 :

have installed Systeminfo Binding now I have errors and can not fix them .
I do not use battery information at all

[ERROR] [o.internal.handler.SysteminfoHandler] - No information for channel battery#remainingCapacity with device intex 0 :
org.openhab.binding.systeminfo.internal.model.DeviceNotFoundException: Device with index: 0 can not be found!
	at org.openhab.binding.systeminfo.internal.model.OshiSysteminfo.getDevice(OshiSysteminfo.java:101) ~[?:?]
	at org.openhab.binding.systeminfo.internal.model.OshiSysteminfo.getBatteryRemainingCapacity(OshiSysteminfo.java:365) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.getInfoForChannel(SysteminfoHandler.java:301) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.publishDataForChannel(SysteminfoHandler.java:249) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.publishData(SysteminfoHandler.java:242) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.lambda$1(SysteminfoHandler.java:226) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
==> /var/log/openhab2/events.log <==
2019-02-15 19:08:02.573 [vent.ItemStateChangedEvent] - Network_PacketsRecevied changed from 3201568 to 3204291
==> /var/log/openhab2/openhab.log <==
2019-02-15 19:08:02.559 [ERROR] [o.internal.handler.SysteminfoHandler] - No information for channel battery#remainingTime with device intex 0 :
org.openhab.binding.systeminfo.internal.model.DeviceNotFoundException: Device with index: 0 can not be found!
	at org.openhab.binding.systeminfo.internal.model.OshiSysteminfo.getDevice(OshiSysteminfo.java:101) ~[?:?]
	at org.openhab.binding.systeminfo.internal.model.OshiSysteminfo.getBatteryRemainingTime(OshiSysteminfo.java:353) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.getInfoForChannel(SysteminfoHandler.java:304) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.publishDataForChannel(SysteminfoHandler.java:249) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.publishData(SysteminfoHandler.java:242) ~[?:?]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.lambda$1(SysteminfoHandler.java:226) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

my ithems


/* Memory information*/
Number Memory_Available            "RAM_Verfuegbar"                          { channel="systeminfo:computer:openHABianPi:memory#available" }
Number Memory_Used                 "RAM_Verwendet"                           { channel="systeminfo:computer:openHABianPi:memory#used" }
Number Memory_Total                "RAM_Total"                               { channel="systeminfo:computer:openHABianPi:memory#total" }
Number Memory_Available_Percent    "RAM_Verfuegbar [%d %%]"                  { channel="systeminfo:computer:openHABianPi:memory#availablePercent" }
Number Memory_Used_Percent         "RAM_Verwendet [%d %%]"                   { channel="systeminfo:computer:openHABianPi:memory#usedPercent" }

/* Swap memory information*/
Number Swap_Available              "Tauschspeicher_Verfuegbar"               { channel="systeminfo:computer:openHABianPi:swap#available" }
Number Swap_Used                   "Tauschspeicher_Verwendet"                { channel="systeminfo:computer:openHABianPi:swap#used" }
Number Swap_Total                  "Tauschspeicher_Total"                    { channel="systeminfo:computer:openHABianPi:swap#total" }
Number Swap_Available_Percent      "Tauschspeicher_Verfuegbar [%d %%]"       { channel="systeminfo:computer:openHABianPi:swap#availablePercent" }
Number Swap_Used_Percent           "Tauschspeicher_Verwendet [%d %%]"        { channel="systeminfo:computer:openHABianPi:swap#usedPercent" }
/* Sensors information*/
Number Sensor_CPUTemp             "CPU_Temperatur"                          { channel="systeminfo:computer:openHABianPi:sensors#cpuTemp" }
Number Sensor_CPUVoltage          "CPU_Spannung"                            { channel="systeminfo:computer:openHABianPi:sensors#cpuVoltage" }
//Number Sensor_FanSpeed            "Luefter_Speed"                         { channel="systeminfo:computer:work:sensors#fanSpeed" }
/* Battery information*/
//String Battery_Name                  { channel="systeminfo:computer:work:battery#name" }
//Number Battery_RemainingCapacity     { channel="systeminfo:computer:work:battery#remainingCapacity" }
//Number Battery_RemainingTime         { channel="systeminfo:computer:work:battery#remainingTime" }

/* Display information*/
//String Display_Description           { channel="systeminfo:computer:work:display#information" }

You tried to:

/* Battery information*/
//String Battery_Name                  { channel="systeminfo:computer:work:battery#name" }
//Number Battery_RemainingCapacity     { channel="systeminfo:computer:work:battery#remainingCapacity" }
//Number Battery_RemainingTime         { channel="systeminfo:computer:work:battery#remainingTime" }

Have you tried clearing the cache?

That’s two bugs that really ought to get fixed.

  1. This shouldn’t be getting logged as an ERROR.
  2. This shouldn’t be generating a stack trace in the log.

I submitted a fix for the logging (see https://github.com/openhab/openhab2-addons/pull/4907).

2 Likes

Great, but I absolutely don`t know how to install this fix. Can you make a short “how to”?

Hello all,

I have also installed the System Info Binding to show me some data from the Raspberry Pi. Unfortunately I see the messages in the openhab.log:

[o.internal.handler.SysteminfoHandler] - No information for channel battery#remainingCapacity with device index 0 :

Is there any way to fix the error? I have already deleted the cache, deleted the Thing and reinstalled the binding.

Release = openHAB 3.1.0
Kernel = Linux 5.10.63-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.4

Hello all, @HolBaum5,

Before some changes today I did not receive this message but after changes in my logging settings and a (forced) fresh copy of log4j2.xml. it started to popup (on a minute basis due to my settings). As dirty (?) solution I employ now the following in the console:

log:set ERROR org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler

This works but please shoot me if this the wrong way to do.

Ending with some information of my system:

Installed = OpenHABian
Release Build = 3.1.0
Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 5.10.63-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.1

Hello @WJ4IoT,

That has worked for me too.