We have moved at community.getvera.com

Author Topic: <staticJson2>  (Read 1313 times)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
<staticJson2>
« on: January 19, 2012, 09:55:11 am »
Any chance to see  <staticJson2> implemented for UI5?

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: <staticJson2>
« Reply #1 on: January 19, 2012, 10:13:56 am »
What would it be used for?

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: <staticJson2>
« Reply #2 on: January 19, 2012, 02:58:47 pm »
IMHO it is impossible to create a single static json file for DAD that works with UI5 and with earlier UI versions (just try to back-port the DAD V1.1 (available soon) static json file for UI5 to UI4 ...).
 
The idea behind a <staticJson2> variable is to be able to specify different static json files for UI5 and for earlier UI (<eventList2> ...).
 
If there is a <staticJson2> value in the device definition file and we are running on UI5 (or on a later version ...), LuaUPnP should use the <staticJson2> value to create the device, otherwise it should use the <staticJson> value.
 
Benefits:
- No need for the user to decide which version of the static json file to use.
- Upgrading/Downgrading the UI wouldn't impact the plugin, the static json file would automatically be 'switched' to the right version.