Now I have a working device let's walk through the PiDome setup for the sensors. The sensors currently on the node are

Humidity Sensor (Child ID 0)

Temperature Sensor (Child ID 1)

LDR (Child ID 2)

The child ID's will be used in PiDome along with the MySensors type for the device ( V_HUM, V_TEMP and V_LIGHT_LEVEL )

First I need to set up a skeleton for the device by selecting Custom devices.

On the Custom devices page there is an option to 'Create a new device'. Clicking on that gives a window that allows configuration of our new device, such as which driver it's using, what sensors it has etc. The first part of the configuration is below

I've selected the MySensors driver in the first selection box, you can choose your own device name and device description. The 'Generated id' is automatic.

The 'Group id' needs to be the same as the CHILD_ID_HUM in the Arduino code, which in my case is 0. Choose a group name that is appropriate. I'm not 100% sure of the significance of the Group name at this point.

Next we'll add a data field by dragging the 'Add data field' selector onto the group that's just been created. It'll create a blank data field and we'll need to click on the spanner to edit it.

Once the spanner is clicked there is a long list of options. At this point we're not interested in most of them.

The 'Control id' is V_HUM, the same as MySensors refers to it, the data type produced by the Arduino code is a float so select that here. The type of graph is your own choice, I haven't really explored the differences yet, neither have I hidden a device. 'Remember last value' will keep showing the last received value for the humidity sensor even if the sensor is removed from the network. The only thing I have changed in the features area is the 'Representation' to Humidity.

Now we'll do the same thing with the temperature using a 'Group id' of 1 and the V_TEMP variable, so drag the 'Add Group' below the humidity group and name it as suits.

Notice the representation of the Temperature. Adjust to your requirements.

Now we can set up the LDR using the 'Group id' of 2 and V_LIGHT_LEVEL, so again drag the 'Add group' over below the temperature group.

Now we have set up the skeleton for the sensor in its current configuration. We can come back later and add more sensors to the node which will be available to all the devices using this skeleton. First though the skeleton needs to be saved.

Now we can see the new skeleton added under the custom devices

Now let's add an actual device based on this device skeleton.

Click the 'Add new device' button.

Then fill in the appropriate info. Before you can proceed past this point you'll have to have defined the floors and rooms in your layout, at least the floor and room in which this sensor is going to reside. This is where we'll use the node id set in the Arduino code ( 30 ), this goes in the 'Address box'. Select the MySensors driver in the drop down at the top of the form and the node location as required.

After clicking the 'Add device' button you should see your new device in the list like below

We're ready now to add the output of the temperature, humidty and light level on a dashboard. First we need to pick the dashboard to edit. I have setup a user just for this dash.

Here we have the test dashboard with a couple of sensors already added.

Click the 'Add item' button and select as below, choosing the device we have just added and humidity as the control to match against.

Click the 'Add item' button and then fill in the next page as below

I've chosen 'Gauge' as the display type, graph is another option you may prefer. I've set the upper limit of the humidity gauge to 100. Click the 'Add' button and we'll proceed to adding the temperature sensor.

Click the 'Add' button and fill in the next page

I've used 60 as the maximum temperature for the gauge, choose as suits your needs. Click the 'Add' button when done, then click the 'Add item' button again and we'll add the light sensor.

Almost done, click the 'Add item' button and fill in the details as below.

Right, now we're done we can save the dashboard and then see the results of the hard work.

Just before we get to the display it's worth looking at the messages being received by the gateway. In particular we are looking for messages from node 30. Give the node a quick reset by pushing the button on the Arduino so it can present the sensors to the gateway and then click on Drivers and select the MySensors gateway and you should see some messages from your node. Blowing on the temperature sensor will cause the output to change, but as the screen does not auto update you'll have to click on the MySensors driver again to see the new messages.

Once your happy your sensor is communicating then log on as the user assigned to the dashboard and you should be presented with something like below.

Looking good? Feeling pleased? You should be! Go grab a coffee and in the next part we'll add four PWM (Pulse Width Modulation) drivers suitable for driving low voltage LED strips or fans etc. We'll be using some FETs (Field Effect Transistors) to handle the load. This setup will be capable of driving four single colour LED light strips or 1 RGB LED and 1 single colour LED strips.

This entry was posted on December 7th, 2015 at 12:51 am by Spiralux and is filed under Pidome, Nano.