Преглед на файлове

added OpenDTU readout to example config

Volker Tanger преди 6 месеца
родител
ревизия
5b8ac3d188
променени са 2 файла, в които са добавени 14 реда и са изтрити 2 реда
  1. 5 0
      history.txt
  2. 9 2
      moshel.example

+ 5 - 0
history.txt

@@ -66,6 +66,11 @@ wanted checks (examples)
 
 ------------------------------------------------------------------------
 
+2024-05-16
+    Volker Tanger <volker.tanger@wyae.de>
+	* feature: added OpenDTU to example 
+	  (solar generation readout for HoyMiles micro-inverters)
+	
 2024-05-08
     Volker Tanger <volker.tanger@wyae.de>
 	* feature: added Shelly Gen2 API to example (e.g. for ShellyPlugS)

+ 9 - 2
moshel.example

@@ -193,13 +193,20 @@ fgrep 'MATCH_SENSOR_STRING' /var/log/rtl_433.log \
 CheckValueUnder AirHumidity "cat $FN" '$0' 100 'Sensor broken?'
 
 
+# retrieve power usage/solar generation from an OpenDTU
+#-- *old* OpenDTU v24.1.26
+curl --max-time 5 -s http://IPADDRESS/api/livedata/status | jq .inverters[0].AC.\"0\".Power.v | cut -d '.' -f 1 > $FN
+#-- after OpenDTU v24.2.12
+curl --max-time 5 -s http://IPADDRESS/api/livedata/status | jq .total.Power.v | cut -d '.' -f 1 > $FN
+CheckValueUnder Solarstrom-OpenDTU "cat $FN" '{ print $0 }' 800 'Solar generation above 800W'
+
 # retrieve power usage/solar generation from a Shelly (Gen1-API)
 curl --max-time 5 -s -u USER:PASSWORD --basic http://IPADDRESS/status | jq '.meters[0].power' > $FN
-CheckValueUnder Solarstrom-Shelly1pm "cat $FN" '{ print $0 }' 6350 'Solar generation above 600W'
+CheckValueUnder Solarstrom-Shelly1pm "cat $FN" '{ print $0 }' 800 'Solar generation above 800W'
 
 # retrieve power usage/solar generation from a ShellyPlugS (Gen2-API)
 curl --max-time 5 -s -u USER:PASSWORD --anyauth 'http://IPADDRESS/rpc/Switch.GetStatus?id=0' | jq .apower > $FN
-CheckValueUnder Solarstrom-ShellyPlugS "cat $FN" '{ print $0 }' 6350 'Solar generation above 600W'
+CheckValueUnder Solarstrom-ShellyPlugS "cat $FN" '{ print $0 }' 800 'Solar generation above 800W'
 
 rm $FN