Closed ravedoglv closed 2 years ago
So I have this WebRelay that I’ve managed to get working sort of in this plugin.
on: http://192.168.1.156/state.xml?relay1State=1 Off: http://192.168.1.156/state.xml?relay1State=0
to get its state: http://192.168.1.156/state.xml
Here’s the code:
{ "accessory": "HttpAdvancedAccessory", "service": "Outlet", "name": "Pool Heater", "forceRefreshDelay": 5, "debug": false, "urls": { "getOn": { "url": "http://192.168.1.156/state.xml", "mappers": [{ "type": "xpath", "parameters": { "jpath": "//relay7/text()", "index": "0" } }] }, "setOn": { "url": "http://192.168.1.156/state.xml?relay7state=1" }, "setOff": { "url": "http://192.168.1.156/state.xml?relay7state=0" } } }
So it appears in HomeKit as a outlet. When I turn the outlet on, it does turn the relay on but then HomeKit turns the outlet off immediately in HomeKit. However, the relay itself remains on and has to be turned off locally.
any idea?
Moved to superReg http-switch to solve this.
So I have this WebRelay that I’ve managed to get working sort of in this plugin.
on: http://192.168.1.156/state.xml?relay1State=1 Off: http://192.168.1.156/state.xml?relay1State=0
to get its state: http://192.168.1.156/state.xml
Here’s the code:
So it appears in HomeKit as a outlet. When I turn the outlet on, it does turn the relay on but then HomeKit turns the outlet off immediately in HomeKit. However, the relay itself remains on and has to be turned off locally.
any idea?