Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Touliloup
#67113
Andyd273 wrote:Just to make sure I understand, I would set up a local broker on my computer or Raspberry Pi, and send messages to that from AWS, which would forward the messages on to the ESP01?


Yes, and the broker will have to be accessible from outside your home network so that AWS can communicate with it.

Alexa will for example send a "ON" for address "/home/lamp/1/set" to your broker, which will redirect it to the device having subscribed to "/home/lamp/1/set".

But honestly, that's already some complex installation... You would be better off emulating a HUE bridge or another device (on your ESP) that is already supported by Alexa than implementing an AWS service yourself.
User avatar
By Andyd273
#67125
Touliloup wrote:
Andyd273 wrote:Just to make sure I understand, I would set up a local broker on my computer or Raspberry Pi, and send messages to that from AWS, which would forward the messages on to the ESP01?


Yes, and the broker will have to be accessible from outside your home network so that AWS can communicate with it.

Alexa will for example send a "ON" for address "/home/lamp/1/set" to your broker, which will redirect it to the device having subscribed to "/home/lamp/1/set".

But honestly, that's already some complex installation... You would be better off emulating a HUE bridge or another device (on your ESP) that is already supported by Alexa than implementing an AWS service yourself.


Well, being able to monitor it remotely would be nice, which is why I thought MQTT might be a good choice, but the big thing is being able to keep track of stuff like temperature and run time, so maybe something like blynk would work better...

Lots of research to be done.
User avatar
By Touliloup
#67127 Actually, what do you want to do with it? If it's do to some monitoring you'll need a place for the data to be stored.
You could for example install home-assistant on a raspberry and connect your sensor to it by mqtt.
Home-Assistant already integrate an mqtt broker and a database. Your temperature/up time will be stored and accessible through it's interface. If you make the interface accessible from outside your local network, you could access all you data from anywhere.

For example like so: https://home-assistant.io/blog/2015/10/ ... t-to-mqtt/
User avatar
By Andyd273
#67136
Touliloup wrote:Actually, what do you want to do with it? If it's do to some monitoring you'll need a place for the data to be stored.
You could for example install home-assistant on a raspberry and connect your sensor to it by mqtt.
Home-Assistant already integrate an mqtt broker and a database. Your temperature/up time will be stored and accessible through it's interface. If you make the interface accessible from outside your local network, you could access all you data from anywhere.

For example like so: https://home-assistant.io/blog/2015/10/ ... t-to-mqtt/


Its going to be used to control a pool pump and keep track of pool temperature. The water right at the top gets really hot with the solar blanket, but stays cool down lower. I'm sure that some of the heated bleeds down. But when the pump is turned on it mixes up all the hot and cold water. So I want to have it be able to check the temp, and if i't is above a threshold turn the pump on for 5-10 minutes, and then off again. The pump should also run at least 4 hours during the day, so I want to keep track of the run time, and if it's less than 4 hours turn the pump on until it hits that limit.

I would also like to be able to see the temperature over time, and that's the feature I would kinda like to be able to see remotely. Likewise I'd like to be able to just tell the pump to run for a certain amount of time whether it's hit the 4 hours or not, like when chemicals are being added and it needs to run 8-24 hours.

I'll definately look up home assistant, thanks!