Source available for PLEG + PLTS ?

HI,

I am learning to develop plugins and would like to read the source of PLEG + PLTS to achieve some stuff.
Is the source available on GIT/SVN?

Unfortunately Richard has encrypted the code and can not be viewable. Unless he is willing to share the code, you are out of luck.

  • Garrett

I suspected that Garret :frowning: , but thanks for confirmation.

I am mainly looking for example(s) where a more advanced configuration GUI have been created on devices; do you know any other plugin that can demonstrate that?

I would browse apps.mios.com, you can than view the plugin files from there if they are not encrypted. Hopefully Richard can chime in, but I am sure he would like to keep his hard work closed for now.

  • Garrett

Some plugins with JavaScript tabs: Sonos; Combination Switch; CurrentCost EnviR.

I would be happy to answer questions … and provide appropriate code fragments.

I am thinking of building a sensor monitor that will publish events over MQTT.

For that I would like to configure which devices, service, variable to monitor and then be able to set the topic. Something like…

  1. Click on a button “Add”
  2. Pick a “device” of available sensors in a listbox which show/poplate the “Services” listbox
  3. Pick a “Service” which show/populate “Variables” listbox
  4. Pick a “Variable” and show a editbox to fill in “Topic” (or pre-populate a generated)

Even though the source is encrypted you can access it, copy it, step through it using the chrome (and other JavaScript) developer tools.

In the Developer Tools for Chrome find the source for J_ProgramLogicC.js
Put a break point on the function plc_ProperyDisplay (around line 853)
Step through that function and you will see how I setup the Device Property Panel for the PLEG/PLTS plugins. Note I do not display the ServiceIDs … They are mostly meaningless to users. And except for a few cases … the Variable Names are unique and can determine the ServiceIDs. The notable exceotuon is the duplicate variable name’s for Thermostats (CurrentSetPoint and SetpointTarget … one is for the Heating Service and the other for the Cooling Service) I could have (probable should have) ordered the variables by the serviceID and display it in the menu. I did this when I did my JQuery like prototype interface to Vera.