Author Topic: Get unhashed scene code  (Read 169 times)

Offline jlind

  • Full Member
  • ***
  • Posts: 164
  • Karma: +6/-5
Get unhashed scene code
« on: March 07, 2017, 11:16:51 am »
Anyone know how to get a unhashed version of scene code?  I currently use wget(url) to get my startup code and scene code emailed to me, but recently the code is being hashed so that it's unreadable.  Heres my current code:
Code: [Select]
local strURL = tostring("http://"..tostring(gtblVeraControllers[tonumber(tostring(luup.pk_accesspoint))]["IP"])..":3480/data_request?id=user_data2")
    local _,strX = luup.inet.wget(strURL)
local objJSON = require "dkjson"

local tblJ = objJSON.decode (strX)

local strEmailSubject = "Vera Source Code"
local strEmailBody = ""
    local strLineChar = "*"   
   
    strEmailBody = strEmailBody..MyUtilityCode.fCreateBanner("Startup Lua:", 100, strLineChar).."\n\n"
strEmailBody = strEmailBody..tostring(tblJ.StartupCode).."\n\n"

strEmailBody = strEmailBody..MyUtilityCode.fCreateBanner("Scene Lua:", 100, strLineChar).."\n\n"   
for Index, Value in pairs(tblJ.scenes) do
  if Value.lua then
if (tostring(Value.lua) ~= "") then
strEmailBody = strEmailBody.."\n\n"..MyUtilityCode.fCreateBanner(tostring(Value.name), 50, strLineChar).."\n"
strEmailBody = strEmailBody..tostring(Value.lua)..'\n'
end
  end
end

VeraLite/VeraPlus with UI7, Multiple GE switches, GE Outlets, Aeon Smart Switches, Minimote, GE Portable outlets  Apps: (Countdown Timer, Weather Underground, Honeywell WiFi Thermo (newest manual install), Virtual on/off switches, eMail Notifications, System Monitor, AlternateUI)