File: http://svn.grimore.org/configuration-templates/openhab2/apc/rules/apc.rules -

rule "APC UPS Handling"
when
   Item APCRaw changed
then
   val String json = (APCRaw.state as StringType).toString
 
   APC_Values.members.forEach [ value |
      var String name = value.name.replace('APC_','$.')
      value.postUpdate(transform("JSONPATH", name, json).replaceAll('"',''))
   ]
end

iot/openhab2/templates/apc_ups/rules/apc.rules.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.