CayenneMQTT - SteveCossy/IOT GitHub Wiki
- backup csv files.
- on to a map if asked.
The essential files for this part of the project are in the CayenneMQTT folder. This is an original folder and once contained all required scripts. Some have been moved to the LoRa Read page.
This needs to start with four keys:
Three Cayenne specific settings come from the Cayenne Project Configure settings
|
(Right-Click image and open in a new tab to view.) |
- MkAuthSettings.py
Create a config file, using the TOML library.
Currently this code puts the code into a static file - this needs thinking and fixing - RdAuthSettings.py
Dumps the current configuration settings, to check you've created it properly
- This is covered in detail on the LoRa Read page.
- cayMQTT_to_csv.html
Uses generic [Paho-MQTT](https://pypi.org/project/paho-mqtt/) libraries to get information from Cayenne. The generic libraries are used because this is a very simple operation so I want to retain control over it, without introducing the far more multi-purpose Cayenne specific libraries. It is envisaged that at some stage a different MQTT broker might be used.- Reads MQTT data from Cayenne
- Writes csv file
- csv2json-CayMQTT.py
Converts csv file into a geoJason format. Creates Time variable, which should be done later.- Reads csv file
- Writes geoJason file such as RSSILatLong.geojson which can then be used to place pins on a map like this.
Both these sets of scripts, and others, use various text file (TOML or csv) to store data externally. These files are described here.
This code is a combination and client side and server side scripts.
- Reads geoJson file
- Provides web page
- Uses: style.css to be stylish
- scripts
- styles
- favicon.ico Icon that appears in the browser tab
- CayenneProjectConfigure.png Documentation used above and on another Wiki page.
- README.rst Readme file for this folder.
- Cicadacom LoRaRssi 1910.txt
- FixRandoms.sh
- GPS RF Tx Lat Lon JKL 1910.txt
- RSSILatLong.geojson
- RestartCSV.sh
- Serial_to_MQTT.py
- csv2json-CayMQTT-hm.py
- references.html - list of URLs used to build the above
- requirements.2019-11-25 - superset of libraries required to be imported using pip3
- cayMQTT_to_csv.py - Old file, to be deleted at some point, after checking