Kein Problem, soooo spannend ist das nicht.
Sonoff:
defmod sonoffpow_1 MQTT_DEVICE
attr sonoffpow_1 DbLogExclude Factor,Period,Time,Wifi_AP,Wifi_APMac,Wifi_RSSI,Wifi_SSID,transmission-state
attr sonoffpow_1 IODev myBroker
attr sonoffpow_1 alias 3D-Drucker
attr sonoffpow_1 devStateIcon ON:rc_GREEN:OFF OFF:rc_RED:ON
attr sonoffpow_1 genericDeviceType switch
attr sonoffpow_1 icon measure_power
attr sonoffpow_1 publishSet ON OFF cmnd/sonoffpow_1/POWER
attr sonoffpow_1 room Homekit,Sonoff
attr sonoffpow_1 subscribeReading_ENERGY stat/sonoffpow_1/STATUS10
attr sonoffpow_1 subscribeReading_STATE stat/sonoffpow_1/STATE
attr sonoffpow_1 verbose 0
attr sonoffpow_1 webCmd ON:OFF
Octopi:
defmod Octopi PRESENCE lan-ping 192.168.192.9 60
attr Octopi absenceThreshold 4
attr Octopi devStateIcon ONLINE:WLAN_Status.1 OFFLINE:WLAN_Status.0
attr Octopi eventMap present:ONLINE absent:OFFLINE
attr Octopi group Status
attr Octopi icon it_server
attr Octopi room Residents
DoIf:
defmod 3D_Aus DOIF ([sonoffpow_1:POWER] eq "ON" and [Octopi:presence] eq "absent") (set sonoffpow_1 off)
attr 3D_Aus room Sonoff
Ist der Sonoff "an" und Octopi "absent" (muss durch den Treshold in der Def des LanPing mind. 5 Minuten aus sein schaltet er den Sonoff aus. nach 5 Minuten ist das alles sauber abgekühlt.