Posts: 120
Joined: Thu Mar 09, 2017 11:39 am
Location: Netherlands

What's the best way for setting up a server?

Mon Feb 19, 2018 12:00 pm

I have several d1 wemos wifi modules for my home automation and I want to use a raspberry to set up a server. What I want is the following:
I want a raspberry to host a server on my WLAN, all wifi peripherals must login as clients on this server. The clients must be able to communicate to eachother through this server.

For instance. When my alarmclock goes off, I want it to send one or two bytes to the server containing an ID and an instruction which relays these bytes to the wifi module of my thermostate (using the ID).

And I want to make a Qt or processing application for my TV (Ubuntu OS) as well as for my phone which acts as a client as well. Via this application I want to controll the LED lighting in my living room, the temperature the curtains etc etc.

What I would likec to know if my approach is a viable approach to begin with and what would the easiest way be to set up such a server? I was thinking of writing a C program but I heared there were better ways to achief it

Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: What's the best way for setting up a server?

Mon Feb 19, 2018 10:06 pm

I'd go for MQTT as a protocol, it works great for communication between these sorts of clients.
Mosquitto is an MQTT broker that will run on a Pi, whatever you are running on the Wemos modules will most likely have the ability to act as an MQTT client.

User avatar
Posts: 36540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: What's the best way for setting up a server?

Mon Feb 19, 2018 10:16 pm

Wemos D1 can do MQTT subscriptions and publishing with
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Advanced users”