[SOLVED] No Serial Port combo for new hardware plugin
Posted: Monday 14 November 2016 21:03
Hello,
I'm trying to write a new hardware plugin following this small guide
https://www.domoticz.com/wiki/Developin ... are_plugin
I copied the code from one of the existing serial hardware, renamed to my new hardware, everything compiles ok, but when I try to add this new hardware from the GUI, I can see it in the Type combo, but I don't see the "Serial Port" combo as I get for other serial devices.
I added the new HTYPE to the IsSerialDevice in main/RFXNames.cpp, and also I increased the number in www/html5.appcache
I'm missing something?
Is there any other guide with more detail that I can follow?
Thanks!
UPDATE: After debugging the HardwareController.js, the problem was that you need to be sure that the word USB is in the description of the HTYPE you add to main/RFXNames.cpp. This way, inside the UpdateHardwareParamControls function, this else if (text.indexOf("USB") >= 0) will be true and the combo for the serial port will be enabled $("#hardwarecontent #divserial").show();
I'm trying to write a new hardware plugin following this small guide
https://www.domoticz.com/wiki/Developin ... are_plugin
I copied the code from one of the existing serial hardware, renamed to my new hardware, everything compiles ok, but when I try to add this new hardware from the GUI, I can see it in the Type combo, but I don't see the "Serial Port" combo as I get for other serial devices.
I added the new HTYPE to the IsSerialDevice in main/RFXNames.cpp, and also I increased the number in www/html5.appcache
I'm missing something?
Is there any other guide with more detail that I can follow?
Thanks!
UPDATE: After debugging the HardwareController.js, the problem was that you need to be sure that the word USB is in the description of the HTYPE you add to main/RFXNames.cpp. This way, inside the UpdateHardwareParamControls function, this else if (text.indexOf("USB") >= 0) will be true and the combo for the serial port will be enabled $("#hardwarecontent #divserial").show();