Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switchable Power Outlets #93

Closed
Machriam opened this issue Jun 5, 2024 · 8 comments
Closed

Switchable Power Outlets #93

Machriam opened this issue Jun 5, 2024 · 8 comments

Comments

@Machriam
Copy link
Owner

Machriam commented Jun 5, 2024

Needed Components

RF Transmitter and Receiver like the following:

433 MHz switchable Outlets with remote control
Renkforce 433 MHz Switch

  • Jumper cables, Resistors, Breadboard

Wiring Diagram for reading out Codes of a given Power Outlet

circuit-20240610-1359

See Link

Production Usage

circuit-20240610-1403

  • 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

References

Code Table for Renkforce Switches

Send Modus Button On/Off Code
1 4 On 1397845
1 4 Off 1397844
1 3 On 1397077
1 3 Off 1397076
1 2 On 1394005
1 2 Off 1394004
1 1 On 1381717
1 1 Off 1381716
2 4 On 4543573
2 4 Off 4543572
2 3 On 4542805
2 3 Off 4542804
2 2 On 4539733
2 2 Off 4539732
2 1 On 4527445
2 1 Off 4527444
3 4 On 5330005
3 4 Off 5330004
3 3 On 5329237
3 3 Off 5329236
3 2 On 5326165
3 2 Off 5326164
3 1 On 5313877
3 1 Off 5313876
4 4 On 5526613
4 4 Off 5526612
4 3 On 5525845
4 3 Off 5525844
4 2 On 5522773
4 2 Off 5522772
4 1 On 5510485
4 1 Off 5510484
Copy link

Changes of Pull Request #94

Commit messages for #93

  • 09e54b4 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
  • 31fe28c removing unnecessary weather forecast controller from template
  • 640ee20 updated datamodel to include automatically the codes for renkforce outlets in the database.
  • 02ea168 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
  • 0922d16 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.
  • a16354e the gateway server supports now explictely rechecking of devices. This is usefull for example before an imaging run or when something has errored beforehand.
  • a61cc5a datamodel does now support associating device with the respective power outlets to switch
  • 3b1a2eb Minor fixes and added new functions to frontend typescript api file

Copy link

Changes of Pull Request #95

Commit messages for #93

  • 97e2416 added missing mkdir command

Copy link

Changes of Pull Request #96

Commit messages for #93

  • 713bc35 Fixed some path issues in the install script.
    the script should always return to PlantMonitorControl as default location and operate from that place

Copy link

Changes of Pull Request #97

Commit messages for #93

  • c2e0ee5 make must be called with admin priviledges

Copy link

Changes of Pull Request #98

Commit messages for #93

  • 7fc0c33 devices can now be associated to their respective outlets for power cycling
  • 17dae9a Outlets can now be switched on and off via the configuration page

Copy link

Changes of Pull Request #100

Commit messages for #93

  • 55c76a5 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.

Copy link

Changes of Pull Request #101

Commit messages for #93

  • 87d24e6 devices with ssl error were not shown correctly.

Copy link

Changes of Pull Request #102

Commit messages for #93

  • a05a591 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant