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
Generic TCP: Additional Field "UserToken"? #76
Comments
Sounds good to me! |
ispindle.de and Port 9501 as defaults would be cool. |
We'd need the IP to remain configurable, though, for those who want to use a Raspi as a Relay, of course... |
K cool, I am also thinking about implementing a conditional config fetch, lets say every n-hours. This won't cost as much battery lifetime as on every upload cycle and still provide remote configuration. |
I absolutely love this idea! That would be brilliant!� |
+1 for the token and yes, please keep the URL editable. |
For backwards compatibility on older firmware we can allow the token to be sent in the name field, too. |
Let's not touch the name field. People want to use it, especially in connection with Ubidots. |
Ok. Is there any kind of state of the art method of authorization in TCP APIs? Don't get me wrong, it's just a for fun and hobby thing but IOT got the bad press about security issues already, so let's not add to this ;) |
Like I said before, there is no such thing as a TCP API unless it's being implemented on Application Level. |
If it comes to security, then the real step is to use SSL which again becomes really expensive in battery lifetime. Conclusion, if rock solid security is not achievable, why bother too much. |
Fully agreed. There's no sensitive data to be gathered, here, and the iSpindel can't be hijacked to become part of a bot net, since it only speaks and doesn't listen. Server side, I'll implement some counter measures against flooding and brute force. Definitely won't need SSL for fermentation data ;) |
Bumping on to do list |
Can someone @DottoreTozzi @ckrack please try and give feedback? Thanks! |
Hi I have tried firmware, but it end with config portal: a: -15706 -6834 332 absTilt: 70.52 T: 38.43 V: 3.57 owT: 37.81 Gravity: 23.68 calling DTHTTP {"name":"velsdk002","ID":"3109502","⸮G":"","angle":70.5174,"temperature":37.8125,"battery":3.566215,"gravity":23.68265}HTTP/1.1 200 OK 1f Final-sleep: 1s; RT:90439 FW 5.3.0 parsed json a: -15692 -6844 330 absTilt: 70.46 T: 38.28 V: 3.57 owT: 37.75 Gravity: 23.65 calling DTHTTP Exception (28): ctx: cont
ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1384, room 16 FW 5.3.0 Double Reset detected parsed json |
thanks for testing! I unfortunately dont have the backend available to test against, so I wonder how to proceed here. |
On it. Previous update landed in my spam folder, unfortunately. |
Entering the Token parameter on the iSpindel portal worked, the value doesn't seem to be transmitted in the JSON though, as of yet:
|
which provider did you select? Do you have the terminal output of the ispindel handy? |
GenericTCP. Just tried again, this is what the serial monitor says (Token corresponds to what I had entered, just some random string that I've pulled out of somewhere...). parsed json a: 302 15428 740 absTilt: 87.06 T: 32.04 V: 4.33 owT: 29.62 Gravity: 32.09 calling DTTCP |
Thanks @DottoreTozzi @jvels for testing - in response I've completelly rewritten the upload process to have it more granular and flexible. From my testing the token is now successfully added to the json string. |
Here @DottoreTozzi @jvels is the new compiled firmware. Thanks for testing! |
Token is transmitted OK now, however the iSpindle's name is now missing from the JSON... And while you're at it: And: Thanks again for your hard work on this, highly appreciated! |
Thanks for testing, I mixed it with the ID! Alright, the name is now transmitted as well:
Let me know if you need anything else! In this case I've created a new preset for "iSpindel.de" for user convenience, predetermines the host name, port and access api. I hope it works out of the box, can't verify. Feedback welcome! |
If you use your hosts file and re-route ispindel.de to 127.0.0.1, you can test it. How do we go about the preference of the name fields? |
@ckrack the iSpindel has no hosts file! Regarding the name field, whatever you use to display in the web service is up to you, you can map to the |
OK one final small quirk: @ckrack let's try to stay backward-compatible regarding the local server. Also, people will want to keep using the spindle name as a means to identify spindle and/or fermentation. |
@universam1 I can confirm it works :-) |
Thanks @jvels ! 👍 You @DottoreTozzi are actually correct, while working on it it came to my mind that the ID is an integer serial number I've been transmitting as a String which kind of was nonsense... So I've changed it now to its native data type. |
Thank you Sam! Well, I am kinda torn by this, on the one hand I'd really like to keep backwards compatibility, on the other hand I absolutely agree that keeping incoherencies from the past and work around them is not the way to go in the long run. I do not know how many people are actually using the local server at the moment, but I guess it's in the lowest 2-digit range. So, now will probably be the best time to set things right, rather than later. I will incorporate a fix and warn people that they will have to update the script and database in order to be able to use the new firmware and will make sure I get the fix out ASAP. Thanks again for your work, really nice job, and I guess we can close this issue now. |
Awesome @DottoreTozzi great work! So I'll wait for the merge until you got the change in, so I can mention that required update in one go. |
Actually, you might as well merge it right away... :) But I'll submit a pull request anyway. Quite a few changes I'd like to release now. |
Looks like in the latest version, iSpindel "Name" is no longer being transmitted. On another note: |
Well, it's in there https://github.com/universam1/iSpindel/blob/master/pio/src/iSpindel.cpp#L433 but lower case, might the be the issue? I can't test right now as my iSpindel are currently busy producing beer ... 😄 Do you have a link I can mention? |
I assembled a new iSpindel last night and directly flashed 5.4.0 on it (newly downloaded firmware.zip from the link above, version 28.08.2017). The link to my local server repository is: |
Could you give 5.5 a try and post the json output from console? I’ll try to reproduce ASAP. |
5.5 works. Sorry for the confusion... |
Cool thanks for testing |
As mentioned here:
http://hobbybrauer.de/forum/viewtopic.php?p=224288#p224288
For the public server we are developing, an extra input field in the GenericTCP config section, representing a User Token in analogy to Ubidots would be nice-to-have.
The contents should be submitted within the JSON as an additional parameter in order to ensure backwards compatibility.
The text was updated successfully, but these errors were encountered: