I have an existing Django project which is a front end to my home automation and astronomy dome. See attached screen shot.
As part of the astronomy setup, I have a 3rd party weather station which overwrites a json file with environmental data every 15 secs. This file updates a pandas dataframe keeping the last 48 hours of data. From this dataframe I have used plotly to make a graph and embedded it into the Django project. The graph also shows the level (red dotted line) at which the dome will automatically close (not relevant for temperature, but very relevant for rain!) The background colours represent ‘division lelvels’ of environmental data (again not particularly relevant for temp but quite relevant for clouds e.g. green=clear, amber=cloudy and red=overcast).
The next stage is to a) make the graph update in real time and b) put a drop down box on the webpage to provide the ability to change the data source (within the dataframe) e.g. select clouds, light, rain, wind etc.
It seems to me that django-plotly-dash would be ideal. My problem is that DPD downgrades Django, channels and daphne. My project runs in 5 Docker containers (web, celery, celery best, NGINX and REDIS). It uses bootstrap5, channels, websockets, daphne and celery. All dependencies are latest or near latest versions. I just can’t face downgrading and debugging code for such a complex project especially when it involves so many container restarts. Although I have been coding on and off for 40+ years I am very much an amateur and coding is purely a means to an end (i.e. a working website).
I have looked at DPD’s code to see if there is anything I can do to update it. It is obvious that a huge amount of work has gone into DPD, it is very impressive. It is equally obvious that it is well beyond my coding abilities to even attempt to offer an update.
So the question…………
- can / should I simply use channels and websockets (technology I am familiar with) to make the graph selectable and update in real time ?
- or does anyone know if DPD is likely (anytime soon) to be updated to work with later versions of daphne, channels and Django ?
- I have time to assist beta testing this but not enough skill to code it.