Jarvis: Difference between revisions

From NURDspace
Line 35: Line 35:
       friendly_name: epc2 1
       friendly_name: epc2 1
</nowiki></pre>
</nowiki></pre>
=== APC (PDU) ===
Off snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 2
On snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 1
get snmpget -v1 -OvqU -c public 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1
output 1 == on 2 == off
get input amps (x10) snmpget -v1 -OvqU -c NURDsnmp 10.208.30.150 .1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1
==== Sensor (Amps) ====
<pre><nowiki>
- platform: command_line
  name: pdu1_input_amps
  command: "snmpget -v1 -OvqU -c public 10.208.30.150 .1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1"
  unit_of_measurement: "A"
  value_template: '{{ value | multiply(10) }}'
</pre></nowiki>
==== Switch ====
<pre><nowiki>
    pdu1_1:
      command_on: "snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 1"
      command_off: "snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 2"
      command_state: "snmpget -v1 -OvqU -c public 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1"
      value_template: '{{ value == "1" }}'
      friendly_name: pdu1 1
</pre></nowiki>

Revision as of 17:48, 10 May 2017

Jarvis
Jarvis.jpg
Participants Dennis
Skills Electronics, IoT
Status Production
Niche
Purpose Infra
Tool No
Location
Cost
Tool category

Jarvis Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} {{#if:No | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:No | [[Tool Cost::{{{Cost}}} | }}

Jarvis is the VM running Home Assistant and is able to automate tasks in the space

See http://10.208.11.32/

Changelog

  • Added the EPC PDU's to HASS
  • Added the space state
  • Added power usage


Current Automations

  • Stop music on mpd when the space is closed
  • Start music on mpd when the space opens.


Custom stuff

EPC (PDU)

http://wiki.gude.info/FAQ_EPC_CmdLine

 root@jarvis:/home/homeassistant/.homeassistant# cat switches.yaml 
 - platform: command_line
  switches:
    epc2_1:
      command_on: "/usr/bin/curl http://<IP>/SWOV.CGI?s1=1"
      command_off: "/usr/bin/curl http://<IP>/SWOV.CGI?s1=0"
      command_state: "/opt/epc/epccontrol2.pl --host=<IP> | grep 1"
      value_template: '{{ value == "1 is ON" }}'
      friendly_name: epc2 1

APC (PDU)

Off snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 2 
On snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 1
get snmpget -v1 -OvqU -c public 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1
output 1 == on 2 == off
get input amps (x10) snmpget -v1 -OvqU -c NURDsnmp 10.208.30.150 .1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1

Sensor (Amps)

<nowiki>
- platform: command_line
  name: pdu1_input_amps 
  command: "snmpget -v1 -OvqU -c public 10.208.30.150 .1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1"
  unit_of_measurement: "A"
  value_template: '{{ value | multiply(10) }}'

</nowiki>

Switch

<nowiki>
    pdu1_1:
      command_on: "snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 1"
      command_off: "snmpset -v1 -c private 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1 i 2"
      command_state: "snmpget -v1 -OvqU -c public 10.208.30.150 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.1"
      value_template: '{{ value == "1" }}'
      friendly_name: pdu1 1

</nowiki>