Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT sensor data #23

Open
happytm opened this issue Dec 21, 2019 · 5 comments
Open

MQTT sensor data #23

happytm opened this issue Dec 21, 2019 · 5 comments

Comments

@happytm
Copy link

happytm commented Dec 21, 2019

I would like to use sensor data via MQTT instead of serial. Is it possible? I am working on low power IOT home automation network. The code I wrote send 5 sensor values and their respective sensor types from multiple devices on network via MQTT messages. These devices can also receive MQTT commands by publishing with topic command///. My repo is linked below:

https://github.com/happytm/BatteryNode

Right now I am using ESP Dash android app to monitor and control my network but your software could be better because it can make automation logic possible with rules.

Thank you.

@danionescu0
Copy link
Owner

danionescu0 commented Dec 23, 2019 via email

@happytm
Copy link
Author

happytm commented Dec 23, 2019

Sorry I was not clear enough. I wanted to use your front end to display data on web.Data will be collected by my battery nodes and published as MQTT messages. I wanted to see if you can implement my ProbeReceiver.ino sketch in your code and display all sensor data it collects from all battery node devices on network . Each BatteryNode devices send data to one gateway and gateway has MQTT broker built in which publishes data in following format for example data received from a BatteryNode with Device ID = 36:

Serial debug messages on Gateway device where it receive data from all Battery node devices:
Command sent to device no. 36 = 'command/36/06/16/26/36/46/

################ Person 1 arrived ######################
Received Topic 'Sensordata/Person1/Home
Received Topic 'Sensordata/Signal/-48
Received Topic 'Sensordata/Person1/in/Livingroom
Received Topic 'SensorData/36/6/2.90
Received Topic 'SensorData/36/16/20
Received Topic 'SensorData/36/26/50
Received Topic 'SensorData/36/36/596
Received Topic 'SensorData/36/46/37
Received Topic 'DeviceStatus/36/DeviceMode/0
Received Topic 'DeviceStatus/36/DeviceIP/36
Received Topic 'DeviceStatus/36/WiFiChannel/7
Received Topic 'DeviceStatus/36/SleepTime/1
Received Topic 'DeviceStatus/36/UpTime/127

6,16,26,36,46 in above messages are predefined sensor types to identify what kind of sensors they are for example 6 = voltage, 16 = temperature , 26 = humidity, 36 = pressure, 46 = light intensity etc.

Signal Strength of remote sensor: -23
Received Topic 'Sensordata/Signal/-23

Serial debug messages from BatteryNode device no. 36:

Sensor Type values sent to controller: 24:06:10:1A:24:2E
Device status values sent to controller: 24:00:24:07:01:8B
Sensors values sent to controller: 24:93:38:25:19:59
Message received from Controller: 24:06:10:1A:24:2E (This message is received from gateway).

I hope this clears the confusion.

Thanks.

@danionescu0
Copy link
Owner

danionescu0 commented Dec 24, 2019 via email

@happytm
Copy link
Author

happytm commented Dec 24, 2019

In this way you would be using my project as a "data store" and
visualisation tool. Am i getting it right?

Yes that's how I wanted to use it.

An alternative to this is checking out MQTT cloud platforms like:
http://www.cloudino.io/

The reason I chose to implement MQTT broker on gateway device itself was to have truly local standalone sensor network without using third party cloud. I can still connect, display data and control all devices on my network by using android app like MQTT dash without using cloud MQTT broker.

I need your help to implement your web front end.

Thank you.

@danionescu0
Copy link
Owner

danionescu0 commented Dec 29, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants