Local available API to router settings etc

Hello,
I’m looking for a way that I can have a device (computer) connected to the LAN side of the router and via some kind of API configure as well as monitor certain properties

  • 4G status and signal strength
  • Remote VPN connection from Talk2M status active/inactive
  • Configuring ip, netmask, DHCP on WAN port
  • Configuring SSID, IP, netmask, DHCP on WIFI
  • Enable/disable remote connections from Talk2M but keep data transmission options open

Like using UCI (like available in OpenWrt), REST interface or so. Possibility having an MQTT broker running in the router providing such status details?

Hello @walter.krambring,

There is no direct API as you are thinking but there are a few different ways. You can interact with the device with the BASIC IDE. You can also interact with the device via the M2web API.

The configuration files can also be FTP’s on and off of the device to check and update the configuration.

I recommend taking a look at the ewon programming side for some details.
See the getsys and setsys commands in the basic IDE.

Hello Deryck, thanks for your response!

I see, this makes it unfortunately a bit more tricky to make a device-to-router integration. Using the M2web API sounds like data has to go out via internet and then return back which is not so good (from cost perspective) if you are on a 4G connection on the WAN side. Using BASIC IDE, maybe if such things as I listed can be done. Can you really turn off/on remote connection possibility from Talk2M via BASIC IDE and still allow data to be sent out from the LAN side to another server on internet? Can you get all such statuses as I mentioned? How shall a process on another computer connected to the LAN be able to tell the BASIC IDE that ip, netmas, SSID etc shall be changed?

Do you know if BASIC IDE can support MQTT Client publishing? Or some other message sending. If so, I believe a script could be written with timers looping & checking certain stuff. Problem is still how the BASIC IDE shall be able to listen to and receive messages sent from other processes via LAN

Honestly, all this, as you say, might be possible but currently I know too little about the BASIC IDE to be sure

Such things as mentioned are key criteria for us when we will select vendor for routers

With kind regards, Walter

Hi Walter,

Here is an older guide that might give you some more ideas how to get data from the ewon.
RG-003-0-EN-(Web Reference Guide).pdf (249.4 KB)

There are a few files you have access to that should give you all this info. There are a few methods available to access them. accessing them via FTP would allow you to access the entire files at once. For configuration files you can also FTP the file back on to the device to update settings.

I recommend you review the MQTT section of the basic programming reference guide. This could along with the getsys and setsys could allow you to publish and update settings.

Hello Deryck, thanks for indepth explanations!

As you say, maybe is doable using various methods, a bit complex at least, worries me how stable such a thing will last future updates though

Final question, is this the same all over the EWON range, like Cosy, Flexy, there is no API for any of those?

Best regards, Walter

These files should be available on both the cosy and flexy, and have been for some time. I do not expect there to be any breaking changes to them.

OK thanks for your help,

Best regards, Walter