-->
Page 1 of 1

Anyone using Sonoff with something else than MQTT

PostPosted: Tue Oct 04, 2016 11:39 pm
by vcch
Hi !

Just bought a sonoff esp-powered swith. I saw here someone reflashing it to use MQTT but i was wondering if there was a simpler use, for example using PHP pages on a server.

V

Re: Anyone using Sonoff with something else than MQTT

PostPosted: Sun Oct 09, 2016 1:59 pm
by ChrisH
You can potentially put whatever you want on it.

Could you link to the person who reflashed it?

Now, I would argue that (at least from the PoV of the device) is really simple to use, yes it requires a little bit of infrastructure (server + Client), but there's some free services for that (ThingSpeak, Adafruit IO etc) that's pretty easy to getting started with. The devices handles MQTT very well, it's pretty light weight.

I would also say that PHP is anything but simple (and implementing it on a small device isn't advisable). You could setup a separate PHP server on a Raspberry PI and have that send commands to the Sonoff. But that adds to the work and infrastructure around it!

What you CAN do is to host a small webserver on it, serving simple HTML pages with some buttons/links and a REST like setup (i.e. http://Sonoff/lamp/on http://Sonoff/lamp/off).
This doesn't require an infrastructure, but requires a bit more code and handling on the device (Maybe there's some libraries that can help, more that just serve a HTML page!?!?).

Do you code? And if so, what language do you prefer?