Using Param with Input Type: InputTypeIPv4Address

I want to use for a plugin the InputType: “InputTypeIPv4Address”, but the json validation faild with the message: Param type “ip” has invalid inputType “QString”.

What type I should use?

This is my json config for the parameter:
“id”: “4dcc4904-aaff-46cb-8cd8-11260f327d34”,
“name”: “ip”,
“displayName”: “IP-Address”,
“inputType”: “InputTypeIPv4Address”,
“type”: “QString”

I think it’s just “IPv4Address”. However, the inputType stuff isn’t implemented in nymea:app so ymmv…

That aside, generally, using ip address as params is bad practice tho:

  • Doesn’t work reliable with DHCP
  • Doesn’t work with IPv6

Instead, you should probably use any of the available discovery mechanisms (ZeroConf, UPnP or plain MAC address scan), store the MAC/Dervice Serial or whatever allows you to uniquely identify a device in the param and rediscover on every connection attempt.