homematic-community / XML-API

HomeMatic CCU Addon implementing a xml request functionality
https://github.com/homematic-community/XML-API
GNU General Public License v3.0
122 stars 27 forks source link

Add JSON format switch #32

Closed feutl closed 1 year ago

feutl commented 5 years ago

Hi, I would like to see a JSON format option for the API, like some other apps are doing it by appending a &format=json or something like this.

I trying to get my data into influxdb using their telegraf service, but it does not support xml natively but JSON. I also searched the internet for options to convert or get data into the influxdb, but all of them need other (outdated) plugins, extra software working as a broker. The json-rpc provided by homematic itself is so bad documented that I am unable to get anything up and running.

Anyhow, xml-api is already great, but having json output as an option would just be awesome and would render lots of "workaround" solutions I found useless :)

thanks

pke commented 5 years ago

hmmm while this could certainly be done (with some heavy refactoring) it would then collide with the name of the plugin which is XML-API, wouldn't it? ;)

Maybe a fork API-Gateway could provide a more general API "gateway" that can return several hypermedia formats like text/xml, text/json, text/json+homematic

jens-maus commented 1 year ago

Sorry, but for JSON output there is a dedicated json-rpc API within the HomeMatic/CCU interface and the focus for XML-API is clearly outputting XML data and not JSON.