Sensor Hub Set Up
The Node software is available from Github/HiveScientiaNode
You will need an SD Card and populate it with the files included in the following sdcardfiles.zip.
The node.ini file starts with the following section. You will need to complete the network and mqtt sections where <text> appears.
# Node.ini is the configuration file for the Hive Scientia Nodes. # It is in the style of a windows ini file. # It contains Network details and sensor arrangements. [general] client_id = MyHive ; Name to identify the hub. dataTopic = myhivedata ; Label to identify the sensor data messages sysTopic = myhivesys ; Label to identify system messages verbose = false ; Turn off/false unless you are testing when true. [network] wifi_ssid = <SSID> ; The SSID (name) of the Wi-Fi network wifi_password = <Password> ; The password of the Wi-Fi network [mqtt] mqtt_server = <xxx.xxx.xxx.xxx> ; The IP address or hostname of the MQTT Server mqtt_port = 1883 ; This should not need changing mqtt_username = <username> ; This is the username from MQTT Configuration mqtt_password = <password> ; This is the password from MQTT Configuration
To get the IP Address of the MQTT Server type ifconfig into an SSH terminal and look for a line starting with inet. Your IP Address will be the bit in bold.
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.99.99 netmask 255.255.255.0 broadcast 192.168.99.36 inet6 fe80::70fd:dc50:8e88:86e prefixlen 64 scopeid 0x20<link>
Copy the file to your SD Card and place it into the SD Card Slot of the Hub.
In this section we will talk about connecting the cables and sighting your node.
Once the hub has had power applied it will take a few moments to power up and begin transmitting data.
Open a SSH terminal on the Pi and type the following where <topic> is either dataTopic or sysTopic from above:
mosquitto_sub -h localhost -p 1883 -t <topic> -u <user_name> -P <password>
If all has gone well after a few moments (up to 30 seconds) you should see something like:
et:1654708819, te0:27.76, hu0:43.44, co0:57330.00, vo0:60000.00, hy0:14693.00, et0:19540.00, uv0:None; te1:28.63, hu1:36.65, co1:473.00, vo1:7.00, hy1:13840.00, et1:19187.00, uv1:None; te2:27.93, hu2:38.76, co2:493.00, vo2:13.00, hy2:13907.00, et2:19684.00, uv2:0.00;
and it should repeat every 30 seconds there after. Now we can move to the Client Set Up.