Can you share a bit more into Web API to MQTT

Hi iHost dev team,
hope you are busy with the development of new features rather than working on defects only :wink:

Can you share some high-level plans around MQTT integration with iHost.
If I’m right you have already built into the iHost OS MQTT broker while it’s closed from free access.
Are you going to open it or enable any sort of additional layer to access it? or are you envisioning the installation of a separate MQTT Broker on the iHost via add-ons… ?

Cheers!

If you need MQTT broker, you can install Mosquitto on iHost. by developing your own MQTT to WebAPI(HTTP) Addon , you can implement MQTT protocol device access to the eWeLink CUBE system.

For now, we will only provide HTTP-based WebAPI for developers to use. We also have plans to provide an open source addon of “MQTT to WebAPI” for your reference (supports the access of Tasmota MQTT devices), which will be completed and released in end of June.

1 Like

thx @Alexie
by providing open-source MQTT to WebAPI do you mean you will develop something from scratch or you talk about already something out there? and if so can you post a link to that?

The project hasn’t even started yet… We’ll probably spend some time doing a reference code in June when we’re free - it’s not that hard at all, just converting the MQTT instructions received into WebAPI instructions, but it takes time.

It does have the MQTT service within the system, but it is not open to the public because it is designed for data interaction with multiple applications within the eWeLink CUBE system, not for device access.

If you wish to access a device with the current MQTT protocol, you will need to install an additional Mqtt broker independently, such as Mosquitto , like this:

You can then connect your device to the MQTT broker you have installed. All you need to do is develop an Adoon, also connect to the MQTT broker, and translate MQTT topic messages to WebAPI HTTP messages to access the device.

1 Like

How do you access eclipse-mosquitto from outside of iHost?
in general, it requires changes in the mosquito config files (eg listener, anonymous access etc), but how to access mosquittto config files from iHost ?
any advice?

1 Like

Hi, we are developing a feature called “Volume management” for AddOn (Docker container), so that you can access configuration files in Docker containers. This feature is scheduled to be released on May 10th, but may be delayed as we are working on other higher priority features.

3 Likes

Could you give more details on this?

By an add-on, do you mean a docker container? You seem to have installed a mosquitto add-on. Did you get it from the Docker Hub? If I have installed the Node-Red add-on, can I use the mqtt nodes in Node-RED to talk to this broker?

I have other questions about developing my own add-ons, but this will do for a start.

You can now install a mosquitto MQTT broker addon directly through the Docker hub, but it still doesn’t work right now because the current addon installation interface doesn’t allow you to configure parameters and environment variables.

We expect the 1.6.0 update to support environment variables setting , 1.6.0 version will be released in 3-4 weeks.

2 Likes