I’m pretty new to Homey app development and ran into a weird issue. I’m building a driver for a WiFi smart bulb, and in the pairing flow I’m only using fields — no custom template. The pairing screen does show up in the Homey mobile app, but the text looks totally garbled or unreadable. I double-checked my JSON structure and everything seems fine. Anyone know what might be causing this? Could it be encoding or something else? Appreciate any tips!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Enter WiFi Bulb Info</title>
<script src="/homey.js" data-origin="settings"></script>
</head>
<body>
<h1>Enter WiFi Bulb Information</h1>
<homey-text id="bulb_ip" label="Bulb IP" placeholder="192.168.1.100"></homey-text>
<homey-number id="bulb_port" label="Port" value="80"></homey-number>
<button id="save">Save</button>
<script>
document.getElementById('save').addEventListener('click', () => {
Homey.emit('save', {
bulb_ip: Homey.getValue('bulb_ip'),
bulb_port: Homey.getValue('bulb_port')
}).then(() => Homey.done());
});
</script>
</body>
</html>
{
"id": "wifi-light-v2",
"name": {
"en": "WiFi Smart Bulb v2"
},
"class": "light",
"capabilities": [
"dim",
"onoff"
],
"platforms": [
"local"
],
"connectivity": [
"lan"
],
"pair": [
{
"id": "enter-credentials",
"name": {
"en": "Enter Info"
},
"description": {
"en": "Please enter IP and Port"
},
"fields": [
{
"id": "bulb_ip",
"type": "text",
"required": true
},
{
"id": "bulb_port",
"type": "number",
"required": true,
"default": 80
}
]
}
]
}
