User Tools

Site Tools


tamiwiki:other:power

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tamiwiki:other:power [2023/07/10 20:46] – [mqtt] yairtamiwiki:other:power [2024/06/27 01:19] (current) yair
Line 1: Line 1:
 ====== Electrical current sensor  ====== ====== Electrical current sensor  ======
-<del>https://hass.telavivmakers.space/dashboard-energy/0</del>+**TLDR** [[https://hass.telavivmakers.space/history?entity_id=sensor.cc_power0%2Csensor.cc_power_total%2Csensor.cc_power1%2Csensor.cc_power2&start_date=2023-07-19T21%3A00%3A00.000Z&end_date=2023-07-20T23%3A00%3A00.000Z|hass>current_phases + total]] 
 + 
 +example\\ 
 +{{:tamiwiki:other:pasted:20230716-184815.png?600}}
  
 ==== TODO: ==== ==== TODO: ====
-  * finish mqtt integration  +  * <del>finish mqtt integration</del>  
-  * sum the three current sensors to one [[https://community.home-assistant.io/t/172779|link]] +  * <del> sum the three current sensors to one [[https://community.home-assistant.io/t/172779|link]] </del> 
-  * kill all our consumers and calculate the base (we share power with upstairs) +  * <del> kill all our consumers and calculate the base (we share power with upstairs) </del> 
-  * remove (or integrate to ) the default energy tab +  * <del> remove (or integrate to ) the default energy tab</del> 
-  * integrate ''$/hour'' to the page+  * <del>integrate ''$/hour'' to the page</del> 
 +  * tami energy price node-red bot 
 +  * monitor upstairs meter 
  
 ==== what we haz ==== ==== what we haz ====
 our current sensor is clamped onto our three main arteries our current sensor is clamped onto our three main arteries
 and is streamed using [[https://github.com/merbanan/rtl_433|rtl_433]] \\ and is streamed using [[https://github.com/merbanan/rtl_433|rtl_433]] \\
-running on the devdesk pc (on electric bench) to the [[https://hass.telavivmakers.space/dashboard-energy/0|energy tab]] of tami'[[https://hass.telavivmakers.space|HomeAssistant]] (a.k.a hass) .+running on the [[https://hass.telavivmakers.space|HomeAssistant]] "cloud" machine
  
  
Line 18: Line 24:
  
 push it to over mqtt, using  push it to over mqtt, using 
- 
-<WRAP center round important 60%>TODO: make this systemd service, currently running on tmux using byobu</WRAP> 
-<WRAP center round important 30%>if need remote access, send your tailscale</WRAP> 
  
 <code> <code>
-devdesk@10.81.2.121:~$ rtl_433 | tee >(mosquitto_pub -10.81.2.3 -u tami -P tamispace -t rtl_433 -l)  + sudo rtl_433 -F "mqtt://10.81.2.3:1883,user=tami,pass=tamispace" 
 +</code> 
 +using service 
 +<code> 
 +yair@telavivmakers:~$ sudo systemctl restart rtl433.service
 </code> </code>
- 
  
 ==== hass ==== ==== hass ====
-<WRAP center round important 60%>TODO: re-implement</WRAP> 
  
 and from there to the homeassistant  and from there to the homeassistant 
Line 37: Line 41:
  
 **tl;dr** **tl;dr**
-add the following to the ''config/configuration.yaml'' \\+add the following to the ''root@telavivmakers:/home/yunohost.app/homeassistant/configuration.yaml'' \\
 and reload the yaml (''Developer Tools/yaml'') and reload the yaml (''Developer Tools/yaml'')
 +test new yaml in (''Developer Tools/template'')
 <code yaml> <code yaml>
 mqtt: mqtt:
Line 62: Line 67:
       state_class: measurement       state_class: measurement
       value_template: "{{ value | round() }}"       value_template: "{{ value | round() }}"
 +</code>
  
 +to sum the three meters and convert to Kw. add
 +<code yaml>
 +sensor:
 +  - platform: template
 +    sensors:
 +      cc_power_total:
 +        friendly_name: "Energy (total)"
 +        unit_of_measurement: 'W'
 +        device_class: power
 +        value_template: "{{ states('sensor.cc_power0') |float + states('sensor.cc_power1')|float + states('sensor.cc_power2') | float }}"
 +    
 +  - platform: integration
 +    source: sensor.cc_power_total
 +    name: energy_spent
 +    unit_prefix: k
 +    round: 2
 </code> </code>
 +
 +reload yaml \\
 +then add ''energy_spent'' to ''config/energy'' as ''Grid consumption''
 +
 +===== aircon =====
 +[[tamiwiki:other:aircon|aircon]]
tamiwiki/other/power.1689011205.txt.gz · Last modified: 2023/07/10 20:46 by yair