Von k72, 4 Monate vorher, geschrieben in Bash.
[paste_expire] 1 Sekunde.
Einbetten
  1. !- Batteriestatus Devices Telegram Benachrichtigung
  2. string chatid = "-1001259749609"; ! chat_id des Empfängers
  3. string botAPI = "1045942962:AAHNWWKcpQBXsUIeP5Zp1Byfjxg88t7l-y4"; ! API des eingerichteten Bots
  4.  
  5. !- Fensterkontakte und Thermostate
  6. real FTK01 = (dom.GetObject(ID_CHANNELS)).Get("FTK-01:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  7. real FTK02 = (dom.GetObject(ID_CHANNELS)).Get("FTK-02:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  8. real FTK03 = (dom.GetObject(ID_CHANNELS)).Get("FTK-03:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  9. real FTK04 = (dom.GetObject(ID_CHANNELS)).Get("FTK-04:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  10. real HKT01 = (dom.GetObject(ID_CHANNELS)).Get("HKT-01:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  11. real HKT02 = (dom.GetObject(ID_CHANNELS)).Get("HKT-02:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  12. real HKT03 = (dom.GetObject(ID_CHANNELS)).Get("HKT-03:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  13. real HKT04 = (dom.GetObject(ID_CHANNELS)).Get("HKT-04:0").DPByHssDP("OPERATING_VOLTAGE").Value().ToString(1);
  14.  
  15. string nachricht = "<b>*Batteriestatus*</b>
  16. ----- <b>FTK + Thermostate</b> -----
  17. FTK WZ:   "# FTK01 #"V
  18. FTK SZ:   "# FTK02 #"V
  19. FTK AZ:   "# FTK03 #"V
  20. FTK BZ:   "# FTK04 #"V
  21. HZ WZ:    "# HKT01 #"V
  22. HZ SZ:    "# HKT02 #"V
  23. HZ AZ:    "# HKT03 #"V
  24. HZ BZ:    "# HKT04 #"V";
  25.  
  26. (dom.GetObject(ID_DATAPOINTS).Get("CUxD.CUX2801001:1.CMD_EXEC")).State("extra/curl -s -k  -d text='"#nachricht.ToUTF8()#"' -d chat_id="#chatid#" -d parse_mode=html");
  27.  
captcha