atsuyaw / RPIoTlogger

Raspberry Pi PicoW to get sensor output and post API for InfluxDB
MIT License
0 stars 0 forks source link

Reconnection doesn't work #1

Open atsuyaw opened 1 month ago

atsuyaw commented 1 month ago

Even if connecting Wi-Fi fails, the current code leaves and tries following phases. Furthermore, the connection phase should be put as boot.py separately.

atsuyaw commented 5 days ago
%%{init: {'sequence': { 'mirrorActors': false}}}%%
sequenceDiagram

    participant DEV as Edge device<br>(RPi Pico W)
    participant ADC as machine.ADC()
    participant DS18X20 as DS18X20
    participant WIFI as WI-FI
    participant TSDB as TSDB<br>(InfluxDB)

    loop 
    DEV ->>+ WIFI: wlan.connect()
    WIFI -->>- DEV: IP
    end

    loop 
    DEV ->>+ ADC: <br>get_sensor_temp()
    ADC -->>- DEV: 

    DEV ->>+ ADC: <br>getRawV()
    ADC -->>- DEV: 

    DEV ->>+ DS18X20: getOneTemp()
    DS18X20 -->>- DEV: 

    DEV ->>+ TSDB: <br>urequests.post()
    TSDB -->>- DEV: status_code
    end