The documentation:
does not specify how to decode the binary payload coming from TTN
So I get:
Before I start digging into custom-payload-conversion-get-started-with-abcl
Has anyone got the ABCL format?
tnx
The documentation:
does not specify how to decode the binary payload coming from TTN
So I get:
Before I start digging into custom-payload-conversion-get-started-with-abcl
Has anyone got the ABCL format?
tnx
Found anything? I am sending battery voltage as a 2 byte integer. By the debug information in ATT I suspect that it passes the LoRa payload, no matter what I do during decode?
10 8B is my value:
Nothing parsed from payload 10 8b. Errors:
JSON: âutf-8â codec canât decode byte 0x8b in position 1: invalid start byte
CBOR: âintâ object has no attribute âitemsâ
ABCL: Offset 4 is not a valid starting boundary
Input not a dict.
Maybe it indeed doesnât use the result of some TTN Console payload function if thatâs what youâre referring to (I remember some discussion on Slack, but it seems thatâs no longer to be found in its history). But in case it does: whatâs your decoder then? And did you try without such decoder?
Same applies when this is about a decoder at AllThingsTalk.
JSON: âutf-8â codec canât decode byte 0x8b in position 1: invalid start byte
Given the error Iâd assume itâs getting JSON (which it might not get without a payload function?) in which the raw byte values are included as text (while binary content often cannot be expressed as text, and needs something such as Base64 encoding to get proper text instead). But without seeing any code those are just wild guesses.
Sorry about the lack of details, I was hoping for experience from people who have made this integration work. In particular I am wondring if @DannyE has made any progress.
My first attempts involved simple decoders returning straight a 2-byte value (voltage). I realised this made no difference in my simple example and tried disabling the decoder. The error mentioned did not change as far as I noticed.
I then made a decoder looking something like this:
function Decoder(bytes, port) {
var decoded = {};
decoded.value = âasdfâ;
return decoded;
}
and changed the Asset Profile to String.
Still the debug information in ATT mentioned the payload of the actual lora transmission (two bytes) and nothing of the hard coded string.
I have done some experimentation with the âAsset Profileâ, based on pieces of information found here and there but I would appreciate feedback from someone with experience.
http://docs.allthingstalk.com/cloud/concepts/assets/profiles/
Will dig into more details next: http://docs.allthingstalk.com/dl/AllThingsTalk_Binary_Conversion_Language_1_0_0.pdf
Sorry, no help from me on AllThingsTalk
I eventually wrote my own HTTP Integration to my own (MySQL) backend
I would love to use some existing frontend for rapid prototyping. In my experience these âone size fits allâ-solutions quickly fall short when going beyond prototyping. I am going the same path as you on other projects, just in the cloud (Azure). I appreciate you sharing your database structure, it is a great starting point for developers doing much of the same thing.
For anyone struggling with this integration I have made some progress. I was trying to define the payload conversion using âABCLâ in my Assetâs Profile. Turns out there is a well hidden menu under Settings -> Payload formats. Looking back at it I canât understand how I overlooked this menu, but at the same time going back over the documentation I canât find this mentioned anywhere related to using ABCL.
I now get Parsed {âvoltageâ: {âvalueâ: 4534}} from payload 11 b6 using ABCL (custom)
Still, no values anywhere else so I am not at a point where I can use it for anything.
Took some screen shots of where I found the settings for conversion:
The last piece of the puzzle was that the conversion definition has an âassetâ property that has to match an asset defined on the current device in the Maker-dashboard. So, when â+ New Assetâ you have to name it identical to the value defined in the ABCL. In my example: âassetâ: âvoltageâ, means I have to add an asset named âvoltageâ on my device. Seems kind of obvious in retrospect, but what can you expect when all different dashboards and integrations keep throwing new names for (mostly) the same concepts?
I now receive a push notification on the ATT-app on my phone for each new message, exactly what I am looking for!