Home Forum Support Local access: unit can fail to respond to local json queries

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6042
    Glenn
    Participant

    Background:

    I’ve put together an extension for the A3 units integration with the (excellent) weewx weather station software that is written using python2(6/7)
    This extension is available at https://github.com/glennmckechnie/weewx-uradmon (This isn’t an anouncement – that can come later on the relavant forum here.)

    Problem:

    When accessing the units local IP, at 60 second intervals, via the urllib2 routine included with python 2.7; the uradmon will often timeout (it’s given 3 seconds to respond).

    The occurence is random, the number of timeouts is also variable. It’s allowed to retry up to 3 times, with a delay between the 1st / 2nd, 2nd / 3rd attempts.

    Is there any explanation, background as to why this may be occurring?

    Most importantly, is there a fix or a tweak?

    I recall from my earlier forum browsing (and the search function still returns nothing so I can’t review prior discussions easily) that the unit will reboot if it detects a DDOS attack ?
    If it looses connection for ‘X’ time (I’ve had the beeps often when the main wireless connection plays up, the timeout problem is not linked to that.)
    Finally I suspect (reading between the lines) that the cloud upload (back to the the uradmon site) is given priority?

    I can tweak the timeout / retry values but I can’t afford to give it too long as it needs to fit into the weewx loop/archive cycle.
    I use 1 minute and it occurs with that. My unit is a wiFi one.
    It also occurs with another WiFi unit – not sure of the cycle time (archive_interval) of that unit.

    I’ve had my unit for over a year, capturing the data with this particular script for maybe 9 months. It’s happened since the start.

    Any insight would be appreciated. Fixes for the problem – even more so.

    #6081
    uRADMonitor
    Keymaster

    @glenn-mckechnie hi Glenn, thanks for the interesting post and sorry for my delayed reply,

    This limitation exists only on the A3 with Wifi and is due to the Wifi Module used, that is somewhat limited in terms of bandwidth. The server upload has priority, but polling can sometimes impact this as well, resulting in the watchdog being triggered.

    The best solution here is to change your script to use the uRADMonitor Server API . That is the recommended way to go, especially since there is an additional calibration layer implemented on the server side only. the VOC AQI and PM1 and PM10 readings are only available in the server output too.

    You can find all information on the API , including examples on http://www.uradmonitor.com/dashboard

    The local JSON was only offered as a bonus, to the internal webserver functionality that was needed to offer a way to configure the A3 units with Wifi for internet access.

    Let me know if there is anything else I can help you with.

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