Description of problem:
Add support for Webbased frontend experimental feature using ingress
Required updates
ingress when frontend calls backend operationsconfig.json changes
experimental:
new_api: true
frontend:
port: 8080
"experimental": {
"new_api": "bool?",
"frontend": {
"port": "int?"
}
},
"ingress": true,
"ingress_port": 8080,
"panel_icon": "mdi:zigbee",
I looked into this, but I was under the impression that addon configurations only support two levels of nesting, hence "port": "int?" would be ignored.
@messismore I didn't test yet as I was looking into some pipeline optimizations, but best is to set it up and try it on a local build. I might get to it later today or tomorrow.
@messismore you are correct, I re-tested and it's still the case:
20-09-23 10:18:02 WARNING (MainThread) [supervisor.store.data] Can't read /data/addons/local/zigbee2mqtt-edge/config.json: expected string or buffer for dictionary value @ data['schema']['experimental']['frontend']. Got {'port': 'int?'}
@Koenkk is it possible to change the setup? Ideally would be something like:
experimental:
new_api: true
frontend_port: 8080
Based on the code in z2m if you have experimental.frontend you load the extension and if port is not specified it falls back to 8080.
I was able to get the frontend started by using:
"ingress": true,
"ingress_port": 8080,
and
"experimental": {
"new_api": true,
"frontend": true
},
"experimental": {
"transmit_power": "int?",
"output": "str?",
"new_api": "bool?",
"frontend": "bool?"
},
However it seems the setup is not ingress friendly. I'm still debugging to understand why. It might be that api calls are trying to get through on the wrong path.
Later edit: This seems to relate to specific code for calling the API. See: https://github.com/nurikk/z2m-frontend/issues/14
I will try with Fiddler or Charles to redirect that call and see if I can get it working.
This is now working in latest edge, but with the configuration workaround specified above.
This is now released with 1.15.0
Most helpful comment
This is now working in latest
edge, but with the configuration workaround specified above.