Home Forum Software Uploading data

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5127
    Alexander
    Participant

    Hello,

    could someone point me to the description of how to upload data to uRadMon servers?
    I have DIY kit installed, connected to my Linux server.
    I got reading every minute and I am happy to share that with the community.

    However it is not clear of how to UPLOAD data – all manuals I managed to find here were about DOWNLOADING.
    in uradMon.cpp (350) I found

    sprintf_P(ethParams, PSTR(ID_TIME_SECONDS"/%lu/"ID_VERSION_HW"/%u/"ID_VERSION_SW"/%u/"
    							ID_GEIGER_CPM"/%lu/"ID_INVERTERVOLTAGE_VOLTS"/%u/"ID_INVERTERDUTY_PM"/%u/"
    							ID_TEMPERATURE_CELSIUS"/%.2f/"ID_PRESSURE_PASCALS"/%lu/"ID_HUMIDITY_RH"/%.2f/"ID_TUBE"/%u"),
    							time.getTotalSec(), (uint8_t)VER_HW, (uint8_t)VER_SW,
    							data.getGeigerCPM(),data.getInverterVoltage(), data.getInverterDuty(),
    							data.getTemperature(), data.getPressure(), data.getHumidity(), GEIGER_TUBE
    );

    Not very useful to be honest – I am not very good at C.

    Can I use some standard POST requests? That would be ideal.

    Thanks.

    #5143
    uRADMonitor
    Keymaster

    Absolutely,

    I was planning to write a guide on the EXP protocol and all the upload details, but with so many things on my head I didn’t get the chance. I am showing you how to do it here, and maybe if you have the time, you can contribute with a proper article on the blog.

    The EXP protocol is nothing but a sequence of : <SENSOR IDENTIFIER>/<VALUE> that allows you to concatenate readings from multiple sensors in one upload.

    Method: POST
    Headers:
    X-User-id:<number> , is your user ID as presented on the dashboard API tab.
    X-User-hash:<string>, is your user KEY, again on the dashboard.
    X-Device-id:<string>, this is an 8 digit hex number. On your first call, it must be 13000000 . The server will respond with a json containing {“setid”:”13000XXX”} where XXX are also hex digits. Save this to a file, and use it every time from now on, as it is your dynamically allocated ID.

    URL: https://data.uradmonitor.com/api/v1/upload/exp/01/<total seconds>/0B/<counts in CPM>/10/<tube id>

    Call this every minute or less (once per 10minutes, etc)

    The <total seconds> can be your linux system epoch unix time, in seconds!
    The <counts in CPM> is a number
    The <tube id> is defined here:
    https://github.com/radhoo/uradmonitor_kit1/blob/master/code/geiger/detectors.h

    Other EXP constants are here, should you want to add more sensors: https://github.com/radhoo/uradmonitor_kit1/blob/master/code/misc/expProtocol.h

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.