Heatedroofsystems
heated roofs automation
The first question that came to mind for this project was to be sure that there was a UL approved product that we could connect the control microcontroller to. There are a number of options. This one is the most flexible. Ii mounts to the panel of any junction box. It has a HOA switch (Hand control on, Off , or Automatic) that allows you override the automatic system and turn the heaters off and on from the relay if the internet or wifi go off.
Right now the electrician is providing some kind of 220v DPDT switch anyway. In the new scheme you would deliver the product with this relay/switch that mounts to the panel. In addition you would need to have them install a 24volt transformer (like is used to control doorbells or zone valves) and an outlet for the microcontroller usb cord.
At that point you are done with electricians and UL requirements since the line voltage wiring is complete and the switch is UL approved. The rest is control wiring and that is low voltage not requiring any special permits or anything. The internet connected microcontroller would mount there or be connected by doorbell wire to some other convenient place (near the router maybe).
You could start now including this relay and even a 24 volt transformer + timer to create a default standard for your installations. Then it is a simple matter to reconnect the 24 volt wires form the timer to the microcontroller.
Veris V321 : Enclosed Power Duty Relay, 20A DPDT N.O., Coil: 24VAC/DC, 120VAC, w/2 HOA Switch, Relay Power LED, UL
The Victory 321 DPST power duty enclosed relays combine an industrial-strength relay with installation flexibility...use the nipple mount to attach to any enclosure. One coil input controls the state of two power-rated contacts for simultaneous control of two devices, or both poles of a single-phase load. Each output is enabled with a Hand-Off-Auto switch for local control. The Victory series does not require a dedicated field enclosure, so it is ideal for retrofit projects. Field-selectable high and low voltage coil inputs provide on-site versatility.
design decisions
server architecture
There are 2 basic ways to design how the microcontroller talks to the world.
One way allows the microcontroller to be a server and requires that users open a port on their wifi router. This is much the same as Xbox and nintendo requires users to open ports on their wifi routers to play online. All routers are different.
The other way is to have the microcontroller be a client who talks to the internet every 20 seconds or so and gets its marching orders from the servers response. No wifi router settings are necessary.
The first option puts more of the power on the microcontroller device.
my questions to you
We haven't really decided if we are cat5 lan connected, wifi only or wifi AND lan. What do you think? Lan only is by far easier to configure.
I would like you to go to your router and open a port on one of your devices, lets say your laptop. Open port 6438 for the hell of it. Now a server from the outside world can talk to your laptop on port 6483. Was that too hard? Would you not want your customers to have to do it?