Compare commits
No commits in common. "5900a8384e8020c03417bde99973d4f44cad9203" and "7989a20817cfe3e4c990203d4e4110e482360ff1" have entirely different histories.
5900a8384e
...
7989a20817
@ -1,4 +1,4 @@
|
||||
/* ESP8266 environmental sensor project
|
||||
/* ESP 8266 environmental sensor FW
|
||||
*
|
||||
* This firmware provides features to use the NodeMCU ESP12 unit as an environmental sensor.
|
||||
* Currently supported is the DHT22 temperature and humidity sensor.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ESP8266 environmental sensor project
|
||||
/* ESP 8266 environmental sensor FW
|
||||
*
|
||||
* This header file provides the necessary credentials for the esp_sensor_firmware.ino file.
|
||||
* This header provides the necessary credentials for the esp_sensor_firmware.ino file.
|
||||
* Before compilation, add your credentials and remove the .example postfix from the filename.
|
||||
* ** WARNING ** DO NOT COMMIT YOUR mqtt_credentials.h FILE CONTAINING YOUR ACTUAL CREDENTIALS.
|
||||
*
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ESP8266 environmental sensor project
|
||||
#
|
||||
# This script provides an example on how to call the mosquitto_sub MQTT broker to deal with sensor topic MQTT requests.
|
||||
#
|
||||
# (C) 2019 Macrocell - Environmental sensing solutions
|
||||
# proudly presented by Macrocell - FPGA Innovators
|
||||
|
||||
mosquitto_sub -h localhost -v -t sensor
|
@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
/* ESP8266 environmental sensor project
|
||||
*
|
||||
* This script provides a very simplistic MQTT subscriber that subscribes to any topic of an MQTT broker running on localhost.
|
||||
* It can be used perfectly for debugging sensors with a local broker like mosquitto_sub.
|
||||
*
|
||||
* Developed on and tested with Python 3.5.
|
||||
*
|
||||
* (C) 2019 Macrocell - Environmental sensing solutions
|
||||
* proudly presented by Macrocell - FPGA Innovators
|
||||
*/ '''
|
||||
|
||||
import paho.mqtt.client as mqtt
|
||||
import datetime
|
||||
|
||||
def on_connect(client, userdata, flags, rc):
|
||||
print("Connected with result code " + str(rc))
|
||||
|
||||
client.subscribe("#")
|
||||
|
||||
def on_message(client, userdata, msg):
|
||||
print(str(datetime.datetime.now()) + " : " + msg.topic + " " + str(msg.payload))
|
||||
|
||||
client = mqtt.Client()
|
||||
client.on_connect = on_connect
|
||||
client.on_message = on_message
|
||||
|
||||
client.connect("localhost", 1883, 60)
|
||||
|
||||
client.loop_forever()
|
Loading…
Reference in New Issue
Block a user