[SOLVED] No Serial Port combo for new hardware plugin

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
pilfos
Posts: 3
Joined: Wednesday 09 November 2016 19:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

[SOLVED] No Serial Port combo for new hardware plugin

Post by pilfos »

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();
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest