I am trying to write my first plugin. I have come across a problem which I cannot understand the Vera behaviour and hope someone can point me in the right direction.
I have created a small plugin which has an implementation file, service file, lua file, device file and JSON file.
The JSON file I used to start off with was a cut and paste from an existing JSON file.
I upload all the files through the LUUP Files page, and created a device using the Create Device page, the device created, no problem. Reload Lua, the device showed up on the web page.
If I clicked any of the buttons or moved the sliders I got an error saying ‘No Implementation’. No problem, I updated the JSON file to the correct action names etc, the errors went, the variables updated correctly. This all worked well. I would make some changes, re-upload the files, reload, test, repeat.
Until one time I uploaded a new JSON file, reloaded and the device disappeared. I uploaded a copy of the old file, reloaded, no joy.
I have refreshed the browser, used another browser, reloaded mulitple times. created new devices. None of these steps make any difference, the device will not display in the Advanced UI. They display in the Simple UI, they display on AutHomationHD. Just not in the Advanced UI.
The devices initialise as I can see the ouput in the Lua log file. I can adjust the variables using the Test Lua page. The log shows the variables updating ok.
If I change the
<staticJson>D_WindowOpener.json</staticJson>[/code] line in the Device XML file to any of the std JSON files. eg [code]<staticJson>D_Heater1.json</staticJson>
All previously created devices reappear in the Advanced UI. Any of the std JSON files work.
There are no errors I can see in the log file, they just simply do not display in the Advanced UI.
If I copy the contents of the std JSON file to notepad and Save As another name, upload that file so that it is exactly the same content except my own name it does not work.
To verify the file contents are the same I have copied the json.lzo files to /tmp, pluto-lzo decompressed them and ran diff against the two files. Exactly the same. run ‘file’ on the two files reports that they have the same contents
D_WindowOpener.json: ASCII English text, with CRLF line terminators
D_Heater1.json: ASCII English text, with CRLF line terminators
I can’t figure it out. Has anyone had the same problem??