Home Forum Software How to upload to uRadmonitor from (Arduino) ESP32?

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #28866
    DonZalmrol
    Participant

    So If I remove the 0x from my ID it becomes 13000212, then I need to convert 13000212 to hex which should be C65E14 (Hex number) or 00C65E14 (Hex signed 2’s complement) correct?

    Bit odd when I use Postman to test the x-headers with just the number 13000212 it works and data is posted.
    If I add 0x or convert it to either HEX number it fails with the exact same error response:

    {
        "error": "Invalid Device ID"
    }
    #28867
    DonZalmrol
    Participant

    wireshark

    Ok, I’m an idiot… looks like not x-headers are pushed at all…
    Strange as it should be pushed by my httpclient.

    Trying to look at my code.

    #28868
    DonZalmrol
    Participant

    Ha found the following culprit ‘:’

    Original:

    client.sendHeader(“X-User-id:“, USER_ID);
    client.sendHeader(“X-User-hash:“, USER_KEY);
    client.sendHeader(“X-Device-id:“, DEVICE_ID);

    Changed to:

    
    client.sendHeader("X-User-id", USER_ID);
    client.sendHeader("X-User-hash", USER_KEY);
    client.sendHeader("X-Device-id", DEVICE_ID);
    

    In Wireshark I now see my x-headers being posted.
    I still get an issue with the x-device-id, I reckon that still has to do with the number not being translated to HEX…

    #28869
    DonZalmrol
    Participant

    Got it!

    
    16:15:32.405 -> Connection to uradmonitoring platform succeeded!
    16:15:32.405 -> created EXP code = /api/v1/upload/exp/01/1621606532/02/25.10/03/0/04/32.00/0B/76/0C/406.39/0E/106/0F/123/10/6
    16:15:57.899 -> Response = {"success":"ok"}
    16:15:58.413 -> Connection to uradmonitoring platform Disconnected.
    

    In my setup I may not use the CRLF as looks like it messes up the connection towards the API.

    #28871
    Wolferl
    Moderator

    Hi,

    I made a recording with Wireshark of my unit #13000070. I hope it helps you finding out what happens.

    Cheers,
    Wolferl

    #28876
    DonZalmrol
    Participant

    Hi Wolferl, thanks for all the help!

    I managed to get it working on my ESP32, now unit 13000212 is uploading nicely to uradmonitoring 🙂
    See attached image for the result.

    One issue that I still need to resolve is that my timers are off with almost 5 seconds…
    In short, when almost reaching 60 seconds (e.g. 55 seconds) my uploads prematurely start instead of after 60 seconds (if function set to 61).
    So this means it uploads the data gathered over 55 sec. instead of 60 sec…

    If I comment my upload functions the timer works perfectly, its like these functions are called too soon.

    #28884
    Wolferl
    Moderator

    Hi,

    You’re welcome, great you got it to work!
    There is no atmospheric pressure reading on your new sensor, is that intended?

    Cheers,
    Wolferl

    #28885
    DonZalmrol
    Participant

    Yes, intentional.
    Currently awaiting the delivery of it and a LUX sensor 🙂

    PS: My timing issues are also resolved, it now keeps each count of both tubes in an moving average array for 60 seconds and uploads the calculated MA to uradmonitor.

    #28886
    Wolferl
    Moderator

    Hi,

    Great, thanks for the feedback!
    Would you mind posting the project’s code somewhere (github or whatever you prefer), so other people (including me) can replicate what you achieved?

    Cheers,
    Wolferl

    #28892
    DonZalmrol
    Participant

    Sure!

    You can find my code on my GitHub page: https://github.com/DonZalmrol/GM_SI-22G_Stationary_Logger
    Currently still testing it out and waiting for other parts, but all seems to be working stable for the moment.

    If you see things that can be improved let me know 🙂

    #28933
    uRADMonitor
    Keymaster

    Up for writing a short blog post on this ?

    #28939
    DonZalmrol
    Participant

    Sure, I’ve send you a pm with my details.

Viewing 12 posts - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.