XML-API icon indicating copy to clipboard operation
XML-API copied to clipboard

Add JSON format switch

Open feutl opened this issue 5 years ago • 1 comments

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

feutl avatar May 21 '19 18:05 feutl

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

pke avatar Sep 27 '19 18:09 pke

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.

jens-maus avatar Oct 18 '23 07:10 jens-maus