Hallo zusammen,
meine fhem-Hauptinstanz läuft auf einem Raspi2.
Ein B-Raspi1 läuft bei mir im LAN als IPCam und ist im Geräteschuppen montiert. Wg. Sonneneinstrahlung möchte ich per SYSMON via Telnet die CPU-Temperatur überwachen.
Verbindung klappt, nur gibt es keinen Eintrag für die Temperatur.
fhem-define:
define Raspcam4Sysmon telnet:pi@192.168.178.237 5 0 0 0
Readings in FHEM:
cpu_core_count 1 2015-05-22 23:55:57
cpu_idle_stat 0.00 0.00 0.00 2015-05-22 23:55:57
idletime 762862 66.39 % 2015-05-22 23:56:59
idletime_text 8 days, 19 hours, 54 minutes (66.39 %) 2015-05-22 23:56:59
loadavg 1.49 1.29 1.20 2015-05-22 23:55:57
starttime 1431182840 2015-05-22 23:56:59
starttime_text 09.05.2015 16:47:20 2015-05-22 23:56:59
stat_cpu 37844803 0 737508 75700511 1165 396 14057 2015-05-22 23:55:57
stat_cpu_diff 30103 0 340 0 0 0 10 2015-05-22 23:55:57
stat_cpu_percent 98.85 0.00 1.12 0.00 0.00 0.00 0.03 2015-05-22 23:55:57
stat_cpu_text user: 98.85 %, nice: 0.00 %, sys: 1.12 %, idle: 0.00 %, io: 0.00 %, irq: 0.00 %, sirq: 0.03 % 2015-05-22 23:55:57
uptime 1148979 2015-05-22 23:56:59
uptime_text 13 days, 07 hours, 09 minutes 2015-05-22 23:56:59
Manuelles Abrufen der Temperatur als User pi mittels telnet funktioniert:
vcgencmd measure_temp
==> temp=51.9'C
Wie bekomme ich die CPU-Temp nach FHEM?
Um die geht es mir eigentlich.
Viele Grüße,
Heiko
SYSMON nutzt für Raspberry 1 folgendes Befehl:
cat /sys/class/thermal/thermal_zone0/temp 2>&1
für BeagleBoneBlack / Cubietruck:
cat /sys/class/hwmon/hwmon0/device/temp1_input 2>&1
Auch folgendes für manche Systeme
cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp".($cpuNum+1)."_input 2>&1
Für Raspberry II kenne ich leider keine Methode und habe die Hardware auch nicht. vcgencmd ist keine Option, da nicht überall verfügbar und muss manuell nachinstalliert werden. Schau mal, wie man universel die Temperatur bekommt, dann baue ich das ein. Oder Du machst das mit vcgencmd mittels SYSMON-Attribute 'user-defined' (s. Commandref).
Danke für deine schnelle Antwort.
Zitat von: hexenmeister am 23 Mai 2015, 16:26:42
SYSMON nutzt für Raspberry 1 folgendes Befehl:
cat /sys/class/thermal/thermal_zone0/temp 2>&1
Liefert auf meinem Raspi1:
pi@raspcam4 ~ $ cat /sys/class/thermal/thermal_zone0/temp 2>&1
51382
(sowohl als user pi als auch als user root - daran kann es also eigentlich nicht liegen)
Wieso erscheint dann die Temperatur bei mir nicht?
Update:
Nach manuellem "get Raspcam4Sysmon update" ist die Readings-Liste wesentlich länger, und zeigt nun auch die CPU-Temperatur.
Merkwürdig.
Interessanter weise werden bei manuellem Update auch folgende 2 Readings NICHT aktualisiert.
Uhrzeit & Datum bleiben stehen.
cpu_bogomips 2.00 2015-05-23 17:18:57
cpu_model_name ARMv6-compatible processor rev 7 (v6l) 2015-05-23 17:18:57
Zwischenzeitlich habe ich auch das User-Attribut ausprobiert gemäß Commandref:
temperatur_heiko:1:Raspberry CPU Temperatur mittels Systembefehl:vcgencmd measure_temp
Auch das funktioniert!
Hallo heikoh81,
ich habe genau das gleiche problem allerdings mit einem Pi3. Ich bekomme alle Werte außer die temperatur übermittelt.
hast du dein problem gelöst ? vielleicht bekomme ich da eine idee was ich bei mir machen müsste um per telnet zum Pi3 mir die Temperatur anzeigen zu lassen.
Auf einem Pi1 und 2 funktioniert das bisger einwandfrei ! Nur Pi3 nicht.
Hi,
habe ein ähnliches Problem - geht zwar nicht um nen Raspi aber auch ich bekomme keine Temperaturen.
Auf dem Server kann ich allerdings folgendes auslesen:
[root@vortexbox ~]# cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp2_input
40000
[root@vortexbox ~]# cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp3_input
44000
[root@vortexbox ~]# cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp4_input
38000
[root@vortexbox ~]# cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp5_input
40000
[root@vortexbox ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +40.0°C (high = +84.0°C, crit = +100.0°C)
Core 1: +43.0°C (high = +84.0°C, crit = +100.0°C)
Core 2: +38.0°C (high = +84.0°C, crit = +100.0°C)
Core 3: +40.0°C (high = +84.0°C, crit = +100.0°C)
[root@vortexbox ~]#
Grüße
Magic01
Habe das "Problem" auch noch nicht gelöst ... bisher auch keinen Hinweis, wo ich suchen könnte :-(
Internals:
CFGFN
DEF telnet:pi@192.168.178.33 5 5 5 5
HOST 192.168.178.33
INTERVAL_BASE 60
INTERVAL_MULTIPLIERS 5 5 5 5
MODE telnet
NAME NASSysmon
NR 29908
PORT 23
STATE Active
TYPE SYSMON
USER pi
Readings:
2016-11-21 19:25:29 cpu_core_count 1
2016-11-21 21:05:28 cpu_idle_stat 20.29 95.94 95.50
2016-11-21 21:05:28 eth0 RX: 1.74 MB, TX: 2.39 MB, Total: 4.13 MB
2016-11-21 21:05:28 eth0_diff RX: 0.06 MB, TX: 0.09 MB, Total: 0.15 MB
2016-11-21 21:05:28 eth0_ip 192.168.178.33
2016-11-21 21:05:28 eth0_rx 1827913
2016-11-21 21:05:28 eth0_speed 100
2016-11-21 21:05:28 eth0_tx 2509795
2016-11-21 19:25:29 fs_boot Total: 63 MB, Used: 21 MB, 33 %, Available: 43 MB at /boot
2016-11-21 19:25:29 fs_root Total: 7365 MB, Used: 1169 MB, 17 %, Available: 5868 MB at /
2016-11-21 19:25:29 fs_usb1 Total: 3815437 MB, Used: 388690 MB, 11 %, Available: 3426748 MB at /media/usbstick
2016-11-21 21:06:27 idletime 6497 94.65 %
2016-11-21 21:06:27 idletime_text 0 days, 01 hours, 48 minutes (94.65 %)
2016-11-21 21:05:28 loadavg 0.02 0.02 0.00
2016-11-21 21:05:28 ram Total: 434.66 MB, Used: 54.64 MB, 12.57 %, Free: 380.02 MB
2016-11-21 21:05:28 ram_used_stat 54.34 57.52 54.63
2016-11-21 21:06:27 starttime 1479751922
2016-11-21 21:06:27 starttime_text 21.11.2016 19:12:02
2016-11-21 21:05:28 stat_cpu 23720 2 11851 639575 740 0 367
2016-11-21 21:05:28 stat_cpu_diff 878 0 414 28562 16 0 9
2016-11-21 21:05:28 stat_cpu_percent 2.94 0.00 1.39 95.59 0.05 0.00 0.03
2016-11-21 21:05:28 stat_cpu_text user: 2.94 %, nice: 0.00 %, sys: 1.39 %, idle: 95.59 %, io: 0.05 %, irq: 0.00 %, sirq: 0.03 %
2016-11-21 21:05:28 swap Total: 100.00 MB, Used: 0.00 MB, 0.00 %, Free: 100.00 MB
2016-11-21 21:05:28 swap_used_stat 0.00 0.00 0.00
2016-11-21 21:06:27 uptime 6864
2016-11-21 21:06:27 uptime_text 0 days, 01 hours, 54 minutes
Helper:
error_msg
net_eth0_stat_class 1
proc_fs 1
recognized_prompt pi@raspberrypi:~
sys_cpu0_freq 0
sys_cpu0_temp 0
sys_cpu1_freq 0
sys_cpu1_temp 0
sys_cpu2_freq 0
sys_cpu2_temp 0
sys_cpu3_freq 0
sys_cpu3_temp 0
sys_cpu4_freq 0
sys_cpu4_temp 0
sys_cpu5_freq 0
sys_cpu5_temp 0
sys_cpu6_freq 0
sys_cpu6_temp 0
sys_cpu7_freq 0
sys_cpu7_temp 0
sys_cpu_core_num 1
sys_cpu_freq_rpi_bbb 0
sys_cpu_num 1
sys_cpu_temp_bbb 0
sys_cpu_temp_rpi 0
sys_fb 0
sys_power_ac 0
sys_power_bat 0
sys_power_usb 0
u_first_mark 1
Cur_readings_map:
cpu0_idle_stat CPU0 min/max/avg (idle)
cpu1_idle_stat CPU1 min/max/avg (idle)
cpu2_idle_stat CPU2 min/max/avg (idle)
cpu3_idle_stat CPU3 min/max/avg (idle)
cpu4_idle_stat CPU4 min/max/avg (idle)
cpu5_idle_stat CPU5 min/max/avg (idle)
cpu6_idle_stat CPU6 min/max/avg (idle)
cpu7_idle_stat CPU7 min/max/avg (idle)
cpu_bogomips BogoMIPS
cpu_core_count Number of CPU cores
cpu_idle_stat CPU min/max/avg (idle)
cpu_model_name CPU model name
date Date
eth0 Ethernet
eth0_diff Ethernet (diff)
eth0_ip Ethernet (IP)
eth0_ip6 Ethernet (IP6)
eth0_rx Ethernet (RX)
eth0_speed Ethernet (speed)
eth0_tx Ethernet (TX)
fhemstarttime Fhem start time
fhemstarttime_text Fhem start time
fhemuptime System up time
fhemuptime_text FHEM up time
fs_boot Filesystem /boot
fs_boot_free Filesystem /boot (free)
fs_boot_used Filesystem /boot (used)
fs_boot_used_percent Filesystem /boot (used %)
fs_root Root
fs_root_free Root (free)
fs_root_used Root (used)
fs_root_used_percent Root (used %)
fs_usb1 USB-Stick
fs_usb1_free USB-Stick (free)
fs_usb1_used USB-Stick (used)
fs_usb1_used_percent USB-Stick (used %)
idletime Idle time
idletime_text Idle time
io_sda TEST
io_sda_diff TEST
io_sda_raw TEST
loadavg Load average
loadavg_1 Load average 1
loadavg_15 Load average 15
loadavg_5 Load average 5
ram RAM
ram_free RAM free
ram_free_percent RAM free %
ram_total RAM total
ram_used RAM used
ram_used_stat RAM used stat
starttime System start time
starttime_text System start time
stat_cpu CPU statistics
stat_cpu0 CPU0 statistics
stat_cpu0_diff CPU0 statistics (diff)
stat_cpu0_percent CPU0 statistics (diff, percent)
stat_cpu0_text CPU0 statistics (text)
stat_cpu1 CPU1 statistics
stat_cpu1_diff CPU1 statistics (diff)
stat_cpu1_percent CPU1 statistics (diff, percent)
stat_cpu1_text CPU1 statistics (text)
stat_cpu2 CPU2 statistics
stat_cpu2_diff CPU2 statistics (diff)
stat_cpu2_percent CPU2 statistics (diff, percent)
stat_cpu2_text CPU2 statistics (text)
stat_cpu3 CPU3 statistics
stat_cpu3_diff CPU3 statistics (diff)
stat_cpu3_percent CPU3 statistics (diff, percent)
stat_cpu3_text CPU3 statistics (text)
stat_cpu4 CPU4 statistics
stat_cpu4_diff CPU4 statistics (diff)
stat_cpu4_percent CPU4 statistics (diff, percent)
stat_cpu4_text CPU4 statistics (text)
stat_cpu5 CPU5 statistics
stat_cpu5_diff CPU5 statistics (diff)
stat_cpu5_percent CPU5 statistics (diff, percent)
stat_cpu5_text CPU5 statistics (text)
stat_cpu6 CPU6 statistics
stat_cpu6_diff CPU6 statistics (diff)
stat_cpu6_percent CPU6 statistics (diff, percent)
stat_cpu6_text CPU6 statistics (text)
stat_cpu7 CPU7 statistics
stat_cpu7_diff CPU7 statistics (diff)
stat_cpu7_percent CPU7 statistics (diff, percent)
stat_cpu7_text CPU7 statistics (text)
stat_cpu_diff CPU statistics (diff)
stat_cpu_idle_percent CPU statistics idle %
stat_cpu_io_percent CPU statistics io %
stat_cpu_irq_percent CPU statistics irq %
stat_cpu_nice_percent CPU statistics nice %
stat_cpu_percent CPU statistics (diff, percent)
stat_cpu_sirq_percent CPU statistics sirq %
stat_cpu_sys_percent CPU statistics sys %
stat_cpu_text CPU statistics (text)
stat_cpu_user_percent CPU statistics user %
swap swap
swap_free swap free
swap_total swap total
swap_used swap used
swap_used_percent swap used %
swap_used_stat swap used stat
uptime System up time
uptime_text System up time
Excludes:
cpucount 1
cpufreq 1
cpuinfo 1
diskstat 1
fbdecttemp 1
fbdsl 1
fbnewmessages 1
fbnightctrl 1
fbversion 1
fbwlan 1
filesystem 1
Shadow_map:
cpu_idle_stat 20.29 95.40 87.44
eth0 RX: 0.37 MB, TX: 0.54 MB, Total: 0.91 MB
eth0_diff RX: 0.01 MB, TX: 0.02 MB, Total: 0.03 MB
eth0_ip 192.168.178.33
eth0_rx 391364
eth0_speed 100
eth0_tx 570185
idletime 997 90.33 %
idletime_text 0 days, 00 hours, 16 minutes (90.33 %)
loadavg 0.06 0.03 0.08
ram Total: 434.66 MB, Used: 54.39 MB, 12.51 %, Free: 380.28 MB
ram_used_stat 54.34 57.52 55.69
starttime 1479751922
starttime_text 21.11.2016 19:12:02
stat_cpu 6525 2 3698 99029 268 0 180
stat_cpu_diff 119 0 48 1695 2 0 2
stat_cpu_percent 6.38 0.00 2.57 90.84 0.11 0.00 0.11
stat_cpu_text user: 6.38 %, nice: 0.00 %, sys: 2.57 %, idle: 90.84 %, io: 0.11 %, irq: 0.00 %, sirq: 0.11 %
swap Total: 100.00 MB, Used: 0.00 MB, 0.00 %, Free: 100.00 MB
swap_used_stat 0.00 0.00 0.00
uptime 1104
uptime_text 0 days, 00 hours, 18 minutes
Attributes:
alias NAS Sysmon
event-on-update-reading cpu_temp,cpu_temp_avg,cpu_temp_stat,loadavg,uptime_text,stat_cpu_text,eth0,ram
exclude cpucount, cpufreq, cpuinfo, diskstat, filesystem, fbwlan, fbnightctrl, fbnewmessages, fbdecttemp, fbversion, fbdsl
filesystems fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usbstick:USB-Stick
icon it_server
network-interfaces eth0:eth0:Ethernet
room NAS
Bei einem der beiden PIs fehlt auch die Temperatur. Also sie ist laut dem Reading auf dem Nullpunkt :-p
@accessburn:
An wen ist das gerichtet grübelgrübel und was möchtest du sagen ? Stehe grad aufm Schlauch.
Ich schließe mich nur den "dat geht net"-Meldungen an :-)
Was das aussagen soll? Ich dachte eigentlich, sollten es genug Meldungen sein wird vielleicht ein workarround bereitgestellt ::)
Moin moin!
nach einem ungeplanten Neustart des Pi's wo FHEM drauf läuft wurde bei mir auch wieder die Temperatur nicht übertragen.
Ich habe dann per user-reading den Befehl eingetragen und dann ging es sofort wieder ABER wirklich erst nachdem ich die fhem.cfg geöffnet habe und dann auf Save gedrückt habe. Bekanntlich startet der rpcserver dann neu. Erst danach kam die Temperatur.
Witzigerweise wurde die Temperatur bei zweien Pi's nicht mehr übertragen (ich nutze SysmonRemote). Als ich das oben beschriebene bei EINEM Pi durchgeführt hatte wurde auch die Temperatur des zweiten Pi's übertragen. :o :o :o ?