When no Receiver is used - for example in production - then Pin 38 should be shorted to Pin 40. This ensures, that a ReceiveTest-Script can still verify, that the transmission hardware is present and update the capabilities of the device accordingly. See here
The Gateway Server must know the capabilities of each device to coordinate how to restart the devices
09e54b414b1825ec1ffef0c3471af70ce4fc7697 Added scripts to Switch power outlets on and off via 433 MHz Transmitter and a test script, which checks on another Pin, whether something is sent.
The ReceiveTest.cpp script has the function to check whether a given raspberry pi has the capability to send data. Only if this script shows a result after starting SwitchOutlet, a given device may be used to switch outlets
31fe28c058a87d608c69c2426b6645b315167663 removing unnecessary weather forecast controller from template
640ee20ed9f09f726c4c15b383995d7e1d29a807 updated datamodel to include automatically the codes for renkforce outlets in the database.
02ea16842acd4d5ab587228b3ee21dfeb33ff57b added api on device to switch power outlets and check whether the device has the capability to switch power outlets.
Beware of differences between WiringPi Pin configuration and the default one on raspberry pi. The WiringPi configuration is necessary for the scripts to switch the power outlet
0922d165c569a6653f19fc39b92227610a694995 The health api is now a bit more fine granular. Only when a check request is issued, the device actually checks its devices. Else only the last stored json will be returned.
a16354e074146af4e261df62f3a8f992277c0133 the gateway server supports now explictely rechecking of devices. This is usefull for example before an imaging run or when something has errored beforehand.
a61cc5a684353deca0c9cd361010bd51d61300e1 datamodel does now support associating device with the respective power outlets to switch
3b1a2eb104f3812c91e1c898afb00aae83e5ed8e Minor fixes and added new functions to frontend typescript api file
713bc35318ed07a6ce522d42aba0ff934b0ff4be Fixed some path issues in the install script.
the script should always return to PlantMonitorControl as default location and operate from that place
55c76a5fe74ff707f94aaf1edf017762ffbd4fed Fixed some timing issues. Never multiple signals should be send at the same time, as then switching of power outlets might not work anymore.
Javascript foreach loop does not await, even when declared as async and an await statement inside.
a05a59190be5e7f6a17359143bd4127966759e77 added more error handling.
When the first call to power the outlet fails, successive calls to other devices should still work and should not issue an alert
Needed Components
RF Transmitter and Receiver like the following:
433 MHz switchable Outlets with remote control Renkforce 433 MHz Switch
Wiring Diagram for reading out Codes of a given Power Outlet
See Link
Production Usage
References
Code Table for Renkforce Switches