Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON API SysVar.createBool returns invalid json #113

Open
MaxxDau opened this issue Dec 6, 2021 · 4 comments
Open

JSON API SysVar.createBool returns invalid json #113

MaxxDau opened this issue Dec 6, 2021 · 4 comments

Comments

@MaxxDau
Copy link

MaxxDau commented Dec 6, 2021

{"version": "1.1","result": {'name':'Test 1','id':'1041','value':'true' },"error": null}

The ' should replaced with "
{"version": "1.1","result": {"name":"Test 1","id":"1041","value":"true" },"error": null}
selfhtml.org

@jp112sdl
Copy link

jp112sdl commented Dec 6, 2021

This also applies to createEnum and createFloat.

@Steinweber as a quick fix for your running system you can change it in

  • /www/api/methods/sysvar/createbool.tcl
  • /www/api/methods/sysvar/createenum.tcl
  • /www/api/methods/sysvar/createfloat.tcl

i.e. createbool.tcl

Write("{'name':'"#sv.Name()#"','id':'"#sv.ID()#"','value':'"#sv.Value()#"' }");

@MaxxDau
Copy link
Author

MaxxDau commented Dec 6, 2021

Thank you for the solution.
I am writing a complete API SDK for all Homematic / CCU interfaces, which I will then put on GitHub. Therefore, the solution approach is not optimal. I have already implemented a workaround for this function, which automatically deactivates when the bug is fixed.

Since it is actually only a minor issue and the JSON is not compliant with the standard, I hope for an adjustment in the firmware/software itself.

@jens-maus
Copy link

jens-maus commented Dec 6, 2021

@jp112sdl

This also applies to createEnum and createFloat.

@Steinweber as a quick fix for your running system you can change it in

Don't we have a fix for this already in RaspberryMatic? If not -> PullRequest please ;-)

@MaxxDau
Copy link
Author

MaxxDau commented Dec 6, 2021

I tested with a previous version of the current state. And there is no fix.
(I use RaspberryMatic for development and check the source of occu if I have a problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants