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
GPIOtoggle,x returns both json and plain text #2892
Comments
Yep. Edit: @giig1967g Is this taken care of in your PR? @ironataerial Can you test this test build |
mega-20200204 is the release I noticed this behavior on BTW this is not limited tot he GPIOtoglle as initially posted, as I just confirmed gpio,x,y pulse,x and longpulse,x -D |
@TD-er -D |
Thanks for testing/verifying. |
@TD-er |
The same (JSON and OK) remains in the mega-20200305 { Ok Thank you |
That's correct as it has not yet been fixed (or a fix merged) |
thanks for mentioning a not affected release, after downgrading to mega-20190805 I can do parsing in node red without complications. :-) |
OK, I've looked into the code and it seems some plugins do send the status themselves. Some of these, the switch plugins and GPIO extenders, are now about to undergo a big change (see PR: #2778 ), but there are still others that will have the same issue:
The design flaw is that we don't properly detect if the status has been sent, but just assume it has by looking at the return value when calling the PLUGIN_WRITE and always return "\nOK" Possible approaches to fix this:
|
this should be fixed in #2778, at least for P001, P009 and P019 |
It does not seem to have any affect on 20200328 tested just now, http:///control?cmd=gpio,4,1 results to : { Ok |
That pull request has (still) not yet been merged. |
It does not seem to have any affect on 20200410 tested just now, Assume it has not been merged yet ? |
That's correct. |
@TD-er |
@giig1967g Problem with the current state of that PR is that it will break existing Domoticz (and maybe others too) integration and I don't have a clue yet why. |
Hi, |
Well I am not really sure your implementation is bad. Just about your remark of diverging from the main branch. |
It does not seem to have any affect on 20200426 tested just now. |
It is also not been merged/fixed jet. |
It does not seem to have any affect on 20200720 tested just now. |
unfortunately no. TD-er had a lot of work fixing wifi issues. Hopefully in the next release. |
The next (building right now) also does not have a fix for this... |
Seems fixed on 20201022 |
http://IP/control?cmd=GPIOtoggle,4
returns :
Should be either JSON or OK but not both ?
The text was updated successfully, but these errors were encountered: