Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted (edited)

On the website if P1monitor is mentioned  (

Please login or register to see this link.

)

 

Quote

P1 monitor download 201809 – ZTATZ

9 sep. 2018 - API apiV3basic wordt in volgende versies verwijderd. ApiV4basic is de laatste versie zodat de JSON-output netter is en eenvoudiger te ...

 

So I don't think this wil work with de V3 API

 

Quote

local PI1 = Net.FHttp("192.168.0.13", 80) apiResult, apiStatus, apiErrorCode = PI1:GET("/json/apiV3basic.php?");

 

Edited by SmartHomeEddy
Posted

Is het lastig om dit script aan te passen naar de nieuwe api? Heb zelf helaas niet zoveel verstand van de lua codes.

Posted

I haven't got the Raspberry PI delivered yet. If the order is in, I wil give it a try. 

Posted

I installed P1monitor on a RPi, but i got also this error:

 

[DEBUG] 18:30:02: Error in calling apiV3basic.php ; apiStatus 404; apiErrorCode 0; apiResult

404 Not Found


nginx/1.14.2
Posted

I have got my Raspberry PI with P1 Monitor working, but there is no apiV3basic.php (or apiV4basic.php) on the Raspberry PI.

 

The only two PHP files available are: 

./p1mon/www/json/sql-import-status.php

./p1mon/www/json/session-check.php

 

Posted

I think it has to be this:

PI1:GET("/api/v1/status")

 

No errors, but also no output in the Lables

Posted

I did manage to get the actual usage from de P1 Monitor, into a Fibaro device, via the P1 Monitor API /api/v1/smartmeter. 

Posted
On 1/3/2020 at 12:17 PM, ReneNL said:

Yup, still working perfectly. 

Witch p1monitor version?

10 hours ago, SmartHomeEddy said:

I did manage to get the actual usage from de P1 Monitor, into a Fibaro device, via the P1 Monitor API /api/v1/smartmeter. 

With this path i have no errors, but no output to the labels in the Fibaro.

 

Can you post your whole code?

Posted

I don't do output to the labels. I only put the usage in a Fibaro device to show the total usage in Fibaro. I use my P1 Monitor for the historical data. 

 

I use de P1 Monitor API "/api/v1/smartmeter?limit=1&json=object" to show only one line with the json objects. I sum the usage of the z-wave devices and I only put the delta usage in the Fibaro device. 

 

Here is the code (with some debugging and  unfinished stuff inside, just fill in your device ID, IP address, port and maximum amount of nodes in your z-wave network). 

 

Quote

-- fibaro:debug("-------- Start of the debugging --------") -- Debugging only

 

local powerID = nnn -- ID of the device where you want to capture the 'delta' power
local IPaddress = "nnn.nnn.nnn.nnn" -- IP address of the P1 Monitor
local Port = "80" -- Port of the P1 Monitor (usualy port 80)
local maxNodeID = 350 -- maximum node ID in your z-wave network

 

-- No editing  below

 

-- Content Json table
-- CONSUMPTION_GAS_M3' => 5265.029,
-- CONSUMPTION_KWH_HIGH' => 7614.828,
-- CONSUMPTION_KWH_LOW' => 6865.501,
-- CONSUMPTION_W' => 826,
-- PRODUCTION_KWH_HIGH' => 0.0,
-- PRODUCTION_KWH_LOW' => 0.0,
-- PRODUCTION_W' => 0,
-- RECORD_IS_PROCESSED' => 0,
-- TARIFCODE' => 'P',
-- TIMESTAMP_UTC' => 1578498285,
-- TIMESTAMP_lOCAL' => '2020-01-08 16:44:45'

 

-- Get Json table from P1 Monitor
local PI1 = Net.FHttp(IPaddress, Port)
apiResult, apiStatus, apiErrorCode = PI1:GET("/api/v1/smartmeter?limit=1&json=object");
 
if (apiStatus ~= "200") then
    fibaro:debug("Error in calling /api/v1/smartmeter ; apiStatus "..apiStatus.."; apiErrorCode ".. apiErrorCode.."; apiResult ".. apiResult)
else
    apiResult = apiResult:gsub("%[", "") -- clean up the apiResult by removing [ and ]
    apiResult = apiResult:gsub("%]", "")
    jsonTable = json.decode(apiResult) -- JSON decode the cleaned-up json string from api to lua-table

 

-- Debugging only, show the content of the json table
--    fibaro:debug("The decoded table results are:") -- for exploring the json table
--    for k, v in pairs(jsonTable) do 
--        fibaro:debug ("KEY " ..k.." VALUE "..v) 
--    end

 

    act_usage = jsonTable.CONSUMPTION_W
    act_production = jsonTable.PRODUCTION_W
    netto_usage = act_usage - act_production
--    fibaro:debug("Netto usage in kWatt: " ..netto_usage) -- Debugging only
 
    local i=0
    local total_devices = 0
    local deviceValue = 0
    local delta_power = 0

    for i = 0, maxNodeID do
        if fibaro:get(i, 'power') ~= nil and i~=powerID then
           deviceValue = fibaro:get(i, 'power')
           total_devices = (total_devices + deviceValue)
        end
    end
--    fibaro:debug("Total usage of the Fibaro devices in Watt: "..total_devices) -- Debugging only

 

    delta_power = tonumber(netto_usage) - total_devices

--    fibaro:debug("Delta usage in Watt: "..delta_power) -- Debugging only
    api.put("/devices/"..powerID, {["properties"]={["power"]=delta_power}}) -- Put delta power into device

end

 

Posted

Still not working.

 

What do you mean with

Please login or register to see this code.

 

Posted (edited)

The idea is to put the power usage (delta power) monitored in P1 monitor (minus the usage of all your zwave devices) in a  existing zwave device, so you can monitor all power usage, not only from your zwave devices. To do so, you have to got some kind of spare device in your network, with no power use. I use a double switch, I use only for one light. 
 

The powerID is the ID of that device. 

Edited by SmartHomeEddy
Posted (edited)

Tnx Eddy

It works, but i still like to see the meter counters in Labels, so i will continue.

Edited by rvelthoen
Posted

The json table has the information:

 

-- Content Json table
-- CONSUMPTION_GAS_M3'
-- CONSUMPTION_KWH_HIGH' 
-- CONSUMPTION_KWH_LOW' 
-- CONSUMPTION_W' 
-- PRODUCTION_KWH_HIGH' 
-- PRODUCTION_KWH_LOW' 
-- PRODUCTION_W'
-- RECORD_IS_PROCESSED' 
-- TARIFCODE' 
-- TIMESTAMP_UTC' 
-- TIMESTAMP_lOCAL'

 

with e.g. 

 

cum_consumption_low = jsonTable.CONSUMPTION_KWH_LOW

fibaro:call(MyId, "setProperty", "ui.Label3.value", cum_consumption_low.." KWh")

 

it should work ... 

 

 

 

Posted (edited)

It is working now with big help from Eddy, see my version and don't forget to make the Labels.

 

Please login or register to see this code.

 

Edited by rvelthoen
Posted

Works great ???

 

I wonder, should we put a sleep in? The P1 Monitor gets his info every 10 seconds. This virtual device pols every 1 second. 

Posted

I can test in the Fibaro VD, put on the end of the code before the "end" statement :

 

Please login or register to see this code.

I think 5 seconds will do (?)

Posted

Thanks. I put it on 9 seconds. 

Posted

Still working.

I updated my code for users who are searching for a Raspberry Pi P1 Monitor with Fibaro.

 

 

  • 3 months later...
Posted

Hello,

 

I buy last month a Plugwise Smile P1 Monitor with firmware version 4.0.2.

 

I think that Plugwise has changed the code with this new version.

Because when I check all of yours LUA codes, you are looking the info to http://pluswiseIP/core/modules

but when I go there, I have this information: (No info of Electricity or Gas information)

I found this links with good information: /core/domain_objects and core/direct_objects

but is not exact the same name that in your codes.

Can someone help to have this working with the new Plugwise Smile P1 V4 version?

 

 

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<modules>
<module id="9e0efbff2a80416486a140ee96034ec7">
<vendor_name/>
<vendor_model/>
<hardware_version/>
<firmware_version/>
<created_date>2020-04-24T14:49:16.342+02:00</created_date>
<modified_date>2020-04-24T14:49:16.637+02:00</modified_date>
<deleted_date/>
<services>
<gas_cumulative_meter id="45efe0e328ab4d1897710d5e5e1ee2a8" log_type="gas">
<functionalities>
<cumulative_log id="d9f6305855ea420aaaaf0ed5a4091517"/>
</functionalities>
</gas_cumulative_meter>
<gas_interval_meter id="67c1122c34044ac9bbecdfacd1e55d5d" log_type="gas">
<functionalities>
<interval_log id="bff1a249a9914b0a977f9e06160ecea6"/>
</functionalities>
</gas_interval_meter>
</services>
<protocols>
<dsmr_gas id="17bb20d1676448b98bdb48e4d37e1c06">
<serial>7FLO2119008243</serial>
<dsmr_main id="8004d10edcfd4238a933f649b4893c17"/>
</dsmr_gas>
</protocols>
</module>
<module id="40bb3da655f54e319fb908561933fec9">
<vendor_name>Plugwise</vendor_name>
<vendor_model>Gateway</vendor_model>
<hardware_version>AME Smile 2.0 board</hardware_version>
<firmware_version/>
<created_date>2020-04-20T15:33:30.880+02:00</created_date>
<modified_date>2020-04-24T14:38:00.875+02:00</modified_date>
<deleted_date/>
<services>
<network_state id="68dc763df6b74e448bb4197995bb5ef7" log_type="wlan_state">
<functionalities>
<point_log id="c6d34d44255e4c16aae002d281a37556"/>
</functionalities>
</network_state>
<network_address id="9661457a1c0e4da1a24fbfc0d1f4b3ba" log_type="lan_ip_address">
<functionalities>
<point_log id="c46e9722e2e74dd4842d6e7d3ef5daac"/>
</functionalities>
</network_address>
<network_state id="9ebe535a750e40deb422c85351cd63de" log_type="lan_state">
<functionalities>
<point_log id="88970789759f40beb9fb432336c8fe88"/>
</functionalities>
</network_state>
<network_address id="dba757a7e9764c0b877e2cb54be43743" log_type="wlan_ip_address">
<functionalities>
<point_log id="278dc80dbed1400cbb78134e8e415c3a"/>
</functionalities>
</network_address>
</services>
<protocols>
<wireless_local_area_network id="29baa82f826a4b52a3ee9a65d36a4e46"/>
<local_area_network id="8fd6c0a17edc4041a495d6b2e97f839d"/>
</protocols>
</module>
<module id="80230474f6af436191dc262e28f3b7b8">
<vendor_name>SHANDONG FEILONG INSTRUMENT CO</vendor_name>
<vendor_model>253769484_A</vendor_model>
<hardware_version/>
<firmware_version/>
<created_date>2020-04-24T14:49:15.569+02:00</created_date>
<modified_date>2020-04-24T14:49:16.335+02:00</modified_date>
<deleted_date/>
<services>
<electricity_interval_meter id="20a9ad94be8f4f42bd8fe5df30efc9ce" log_type="electricity">
<functionalities>
<interval_log id="24f1f39274d74ec0a90d958bc06ea48c"/>
<interval_log id="7f41e99480b84196978f544925680753"/>
</functionalities>
</electricity_interval_meter>
<electricity_point_meter id="a366c0f6a30041609ce458067a1896d2" log_type="electricity">
<functionalities>
<point_log id="9efca28708534a04ba46cccc076fb0b4"/>
<point_log id="e96466bcb1f74cb7a5e388f0b65f8c93"/>
</functionalities>
</electricity_point_meter>
<electricity_cumulative_meter id="e3d6d7d2fcff48de9320843385c37401" log_type="electricity">
<functionalities>
<cumulative_log id="0431ff284dc74beba20dd8b6c9a03258"/>
<cumulative_log id="11eba3e6ad4a43059d9a0e40a79f5d5e"/>
</functionalities>
</electricity_cumulative_meter>
</services>
<protocols>
<dsmr_main id="8004d10edcfd4238a933f649b4893c17">
<serial>1SAG3100010301</serial>
<dsmr_mbuses/>
</dsmr_main>
</protocols>
</module>
</modules>
 

 

 

 

Core/direct_objects output:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<direct_objects>
<location id="062c0bf6ecc44f14948ed24a15ec3636">
<name>Home</name>
<description>A building with a smart meter.</description>
<type>building</type>
<created_date>2020-04-24T14:38:07.232+02:00</created_date>
<modified_date>2020-05-01T15:13:26.305+02:00</modified_date>
<deleted_date/>
<preset>home</preset>
<clients/>
<appliances/>
<logs>
<cumulative_log id="0431ff284dc74beba20dd8b6c9a03258">
<updated_date>2020-05-01T15:13:00+02:00</updated_date>
<type>electricity_consumed</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T15:13:00+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:00+02:00" end_date="2020-05-01T15:13:00+02:00">
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_peak">1879740.00</measurement>
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_offpeak">2769552.00</measurement>
</period>
<electricity_cumulative_meter id="e3d6d7d2fcff48de9320843385c37401"/>
</cumulative_log>
<cumulative_log id="11eba3e6ad4a43059d9a0e40a79f5d5e">
<updated_date>2020-05-01T15:13:00+02:00</updated_date>
<type>electricity_produced</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T15:13:00+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:00+02:00" end_date="2020-05-01T15:13:00+02:00">
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_peak">728707.00</measurement>
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_offpeak">188453.00</measurement>
</period>
<electricity_cumulative_meter id="e3d6d7d2fcff48de9320843385c37401"/>
</cumulative_log>
<interval_log id="24f1f39274d74ec0a90d958bc06ea48c">
<updated_date>2020-05-01T15:00:00+02:00</updated_date>
<type>electricity_consumed</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T14:00:00+02:00</last_consecutive_log_date>
<interval>PT1H</interval>
<period start_date="2020-05-01T15:00:00+02:00" end_date="2020-05-01T15:00:00+02:00" interval="PT1H">
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_peak">27.00</measurement>
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_offpeak">0.00</measurement>
</period>
<electricity_interval_meter id="20a9ad94be8f4f42bd8fe5df30efc9ce"/>
</interval_log>
<interval_log id="7f41e99480b84196978f544925680753">
<updated_date>2020-05-01T15:00:00+02:00</updated_date>
<type>electricity_produced</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T14:00:00+02:00</last_consecutive_log_date>
<interval>PT1H</interval>
<period start_date="2020-05-01T15:00:00+02:00" end_date="2020-05-01T15:00:00+02:00" interval="PT1H">
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_peak">184.00</measurement>
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_offpeak">0.00</measurement>
</period>
<electricity_interval_meter id="20a9ad94be8f4f42bd8fe5df30efc9ce"/>
</interval_log>
<point_log id="9efca28708534a04ba46cccc076fb0b4">
<updated_date>2020-05-01T15:13:26+02:00</updated_date>
<type>electricity_produced</type>
<unit>W</unit>
<last_consecutive_log_date>2020-05-01T15:08:03+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:26+02:00" end_date="2020-05-01T15:13:26+02:00">
<measurement log_date="2020-05-01T15:13:26+02:00" tariff="nl_offpeak">0.00</measurement>
<measurement log_date="2020-05-01T15:13:26+02:00" tariff="nl_peak">0.00</measurement>
</period>
<electricity_point_meter id="a366c0f6a30041609ce458067a1896d2"/>
</point_log>
<interval_log id="bff1a249a9914b0a977f9e06160ecea6">
<updated_date>2020-05-01T15:00:00+02:00</updated_date>
<type>gas_consumed</type>
<unit>m3</unit>
<last_consecutive_log_date>2020-05-01T14:00:00+02:00</last_consecutive_log_date>
<interval>PT1H</interval>
<period start_date="2020-05-01T15:00:00+02:00" end_date="2020-05-01T15:00:00+02:00" interval="PT1H">
<measurement log_date="2020-05-01T15:00:00+02:00">0.00</measurement>
</period>
<gas_interval_meter id="67c1122c34044ac9bbecdfacd1e55d5d"/>
</interval_log>
<cumulative_log id="d9f6305855ea420aaaaf0ed5a4091517">
<updated_date>2020-05-01T15:10:00+02:00</updated_date>
<type>gas_consumed</type>
<unit>m3</unit>
<last_consecutive_log_date>2020-05-01T15:10:00+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:10:00+02:00" end_date="2020-05-01T15:10:00+02:00">
<measurement log_date="2020-05-01T15:10:00+02:00">281.90</measurement>
</period>
<gas_cumulative_meter id="45efe0e328ab4d1897710d5e5e1ee2a8"/>
</cumulative_log>
<point_log id="e96466bcb1f74cb7a5e388f0b65f8c93">
<updated_date>2020-05-01T15:13:26+02:00</updated_date>
<type>electricity_consumed</type>
<unit>W</unit>
<last_consecutive_log_date>2020-05-01T15:13:26+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:26+02:00" end_date="2020-05-01T15:13:26+02:00">
<measurement log_date="2020-05-01T15:13:26+02:00" tariff="nl_offpeak">0.00</measurement>
<measurement log_date="2020-05-01T15:13:26+02:00" tariff="nl_peak">626.00</measurement>
</period>
<electricity_point_meter id="a366c0f6a30041609ce458067a1896d2"/>
</point_log>
</logs>
<actuator_functionalities/>
</location>
<appliance id="439d3cfc52cc4fb2ae202ae73c761f3f">
<name>Gateway</name>
<description>
Container for variables logged about the Gateway in general.
</description>
<type>gateway</type>
<created_date>2020-04-24T14:38:00.017+02:00</created_date>
<modified_date>2020-04-25T00:55:53.800+02:00</modified_date>
<deleted_date/>
<groups/>
<logs>
<point_log id="278dc80dbed1400cbb78134e8e415c3a">
<updated_date>2020-04-24T14:38:01+02:00</updated_date>
<type>wlan_ip_address</type>
<unit/>
<last_consecutive_log_date>2020-04-24T14:38:01+02:00</last_consecutive_log_date>
<period start_date="2020-04-24T14:38:01+02:00" end_date="2020-04-24T14:38:01+02:00">
<measurement log_date="2020-04-24T14:38:01+02:00">192.168.40.40</measurement>
</period>
<network_address id="dba757a7e9764c0b877e2cb54be43743"/>
</point_log>
<point_log id="88970789759f40beb9fb432336c8fe88">
<updated_date>2020-05-01T13:26:08.802+02:00</updated_date>
<type>lan_state</type>
<unit/>
<last_consecutive_log_date>2020-04-25T00:55:53.753+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T13:26:08.802+02:00" end_date="2020-05-01T13:26:08.802+02:00">
<measurement log_date="2020-05-01T13:26:08.802+02:00">up</measurement>
</period>
<network_state id="9ebe535a750e40deb422c85351cd63de"/>
</point_log>
<point_log id="c46e9722e2e74dd4842d6e7d3ef5daac">
<updated_date>2020-05-01T13:26:08.802+02:00</updated_date>
<type>lan_ip_address</type>
<unit/>
<last_consecutive_log_date>2020-04-25T00:55:53+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T13:26:08.802+02:00" end_date="2020-05-01T13:26:08.802+02:00">
<measurement log_date="2020-05-01T13:26:08.802+02:00">192.168.10.2</measurement>
</period>
<network_address id="9661457a1c0e4da1a24fbfc0d1f4b3ba"/>
</point_log>
<point_log id="c6d34d44255e4c16aae002d281a37556">
<updated_date>2020-05-01T13:26:08.173+02:00</updated_date>
<type>wlan_state</type>
<unit/>
<last_consecutive_log_date>2020-04-24T14:38:10.624+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T13:26:08.173+02:00" end_date="2020-05-01T13:26:08.173+02:00">
<measurement log_date="2020-05-01T13:26:08.173+02:00">down</measurement>
</period>
<network_state id="68dc763df6b74e448bb4197995bb5ef7"/>
</point_log>
</logs>
<actuator_functionalities/>
</appliance>
</direct_objects>

 

 

 

Domain_objects output:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<domain_objects>
<module id="9e0efbff2a80416486a140ee96034ec7">
<vendor_name/>
<vendor_model/>
<hardware_version/>
<firmware_version/>
<created_date>2020-04-24T14:49:16.342+02:00</created_date>
<modified_date>2020-04-24T14:49:16.637+02:00</modified_date>
<deleted_date/>
<services>
<gas_cumulative_meter id="45efe0e328ab4d1897710d5e5e1ee2a8" log_type="gas">
<functionalities>
<cumulative_log id="d9f6305855ea420aaaaf0ed5a4091517"/>
</functionalities>
</gas_cumulative_meter>
<gas_interval_meter id="67c1122c34044ac9bbecdfacd1e55d5d" log_type="gas">
<functionalities>
<interval_log id="bff1a249a9914b0a977f9e06160ecea6"/>
</functionalities>
</gas_interval_meter>
</services>
<protocols>
<dsmr_gas id="17bb20d1676448b98bdb48e4d37e1c06">
<serial>7FLO2119008243</serial>
<dsmr_main id="8004d10edcfd4238a933f649b4893c17"/>
</dsmr_gas>
</protocols>
</module>
<module id="40bb3da655f54e319fb908561933fec9">
<vendor_name>Plugwise</vendor_name>
<vendor_model>Gateway</vendor_model>
<hardware_version>AME Smile 2.0 board</hardware_version>
<firmware_version/>
<created_date>2020-04-20T15:33:30.880+02:00</created_date>
<modified_date>2020-04-24T14:38:00.875+02:00</modified_date>
<deleted_date/>
<services>
<network_state id="68dc763df6b74e448bb4197995bb5ef7" log_type="wlan_state">
<functionalities>
<point_log id="c6d34d44255e4c16aae002d281a37556"/>
</functionalities>
</network_state>
<network_address id="9661457a1c0e4da1a24fbfc0d1f4b3ba" log_type="lan_ip_address">
<functionalities>
<point_log id="c46e9722e2e74dd4842d6e7d3ef5daac"/>
</functionalities>
</network_address>
<network_state id="9ebe535a750e40deb422c85351cd63de" log_type="lan_state">
<functionalities>
<point_log id="88970789759f40beb9fb432336c8fe88"/>
</functionalities>
</network_state>
<network_address id="dba757a7e9764c0b877e2cb54be43743" log_type="wlan_ip_address">
<functionalities>
<point_log id="278dc80dbed1400cbb78134e8e415c3a"/>
</functionalities>
</network_address>
</services>
<protocols>
<wireless_local_area_network id="29baa82f826a4b52a3ee9a65d36a4e46"/>
<local_area_network id="8fd6c0a17edc4041a495d6b2e97f839d"/>
</protocols>
</module>
<template id="84e7963a1eee46e0ba810034938baa83" tag="zone_preset_based_on_time_and_presence_with_override">
<name>Zone preset schedule template</name>
<description>
Template for scheduling presets on a presence or time basis with the option to override the preset's setpoint/state.
</description>
<single_actor>true</single_actor>
<created_date>2020-05-01T13:26:07.692+02:00</created_date>
<modified_date>2020-05-01T13:26:07.733+02:00</modified_date>
<deleted_date/>
<objects>
<object name="zone" type="Location"/>
</objects>
<parameters>
<parameter name="presence" source="zone.presence" type="Boolean"/>
<parameter name="time" source="clock.weekTime" type="WeekTime"/>
</parameters>
<results>
<result name="state" type="OnOff" action="zone.iterateFunctionalities('RelayFunctionality')().switch(clock.addSeconds(null, 1), state)"/>
<result name="preset" type="Preset" action="zone.preset = preset"/>
<result name="setpoint" type="Number" action="zone.iterateFunctionalities('ThermostatFunctionality', 'thermostat')().setSetpoint(clock.addSeconds(null, 1), setpoint, setpoint)"/>
<result name="domestic_hot_water_state" type="OnOff" action="zone.iterateFunctionalities('ToggleFunctionality', 'domestic_hot_water_state')().switch(clock.addSeconds(null, 1), domestic_hot_water_state)"/>
</results>
</template>
<appliance id="439d3cfc52cc4fb2ae202ae73c761f3f">
<name>Gateway</name>
<description>
Container for variables logged about the Gateway in general.
</description>
<type>gateway</type>
<created_date>2020-04-24T14:38:00.017+02:00</created_date>
<modified_date>2020-04-25T00:55:53.800+02:00</modified_date>
<deleted_date/>
<groups/>
<logs>
<point_log id="278dc80dbed1400cbb78134e8e415c3a">
<updated_date>2020-04-24T14:38:01+02:00</updated_date>
<type>wlan_ip_address</type>
<unit/>
<last_consecutive_log_date>2020-04-24T14:38:01+02:00</last_consecutive_log_date>
<period start_date="2020-04-24T14:38:01+02:00" end_date="2020-04-24T14:38:01+02:00">
<measurement log_date="2020-04-24T14:38:01+02:00">192.168.40.40</measurement>
</period>
<network_address id="dba757a7e9764c0b877e2cb54be43743"/>
</point_log>
<point_log id="88970789759f40beb9fb432336c8fe88">
<updated_date>2020-05-01T13:26:08.802+02:00</updated_date>
<type>lan_state</type>
<unit/>
<last_consecutive_log_date>2020-04-25T00:55:53.753+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T13:26:08.802+02:00" end_date="2020-05-01T13:26:08.802+02:00">
<measurement log_date="2020-05-01T13:26:08.802+02:00">up</measurement>
</period>
<network_state id="9ebe535a750e40deb422c85351cd63de"/>
</point_log>
<point_log id="c46e9722e2e74dd4842d6e7d3ef5daac">
<updated_date>2020-05-01T13:26:08.802+02:00</updated_date>
<type>lan_ip_address</type>
<unit/>
<last_consecutive_log_date>2020-04-25T00:55:53+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T13:26:08.802+02:00" end_date="2020-05-01T13:26:08.802+02:00">
<measurement log_date="2020-05-01T13:26:08.802+02:00">192.168.10.2</measurement>
</period>
<network_address id="9661457a1c0e4da1a24fbfc0d1f4b3ba"/>
</point_log>
<point_log id="c6d34d44255e4c16aae002d281a37556">
<updated_date>2020-05-01T13:26:08.173+02:00</updated_date>
<type>wlan_state</type>
<unit/>
<last_consecutive_log_date>2020-04-24T14:38:10.624+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T13:26:08.173+02:00" end_date="2020-05-01T13:26:08.173+02:00">
<measurement log_date="2020-05-01T13:26:08.173+02:00">down</measurement>
</period>
<network_state id="68dc763df6b74e448bb4197995bb5ef7"/>
</point_log>
</logs>
<actuator_functionalities/>
</appliance>
<module id="80230474f6af436191dc262e28f3b7b8">
<vendor_name>SHANDONG FEILONG INSTRUMENT CO</vendor_name>
<vendor_model>253769484_A</vendor_model>
<hardware_version/>
<firmware_version/>
<created_date>2020-04-24T14:49:15.569+02:00</created_date>
<modified_date>2020-04-24T14:49:16.335+02:00</modified_date>
<deleted_date/>
<services>
<electricity_interval_meter id="20a9ad94be8f4f42bd8fe5df30efc9ce" log_type="electricity">
<functionalities>
<interval_log id="24f1f39274d74ec0a90d958bc06ea48c"/>
<interval_log id="7f41e99480b84196978f544925680753"/>
</functionalities>
</electricity_interval_meter>
<electricity_point_meter id="a366c0f6a30041609ce458067a1896d2" log_type="electricity">
<functionalities>
<point_log id="9efca28708534a04ba46cccc076fb0b4"/>
<point_log id="e96466bcb1f74cb7a5e388f0b65f8c93"/>
</functionalities>
</electricity_point_meter>
<electricity_cumulative_meter id="e3d6d7d2fcff48de9320843385c37401" log_type="electricity">
<functionalities>
<cumulative_log id="0431ff284dc74beba20dd8b6c9a03258"/>
<cumulative_log id="11eba3e6ad4a43059d9a0e40a79f5d5e"/>
</functionalities>
</electricity_cumulative_meter>
</services>
<protocols>
<dsmr_main id="8004d10edcfd4238a933f649b4893c17">
<serial>1SAG3100010301</serial>
<dsmr_mbuses/>
</dsmr_main>
</protocols>
</module>
<template id="afc2b42dfd6542e2a2f82636373a76e4" tag="default_client_presence_based_on_pointlog">
<name>Client, Pointlog presence template</name>
<description>
Template for setting default client presence based on point_logs
</description>
<single_actor>false</single_actor>
<created_date>2020-05-01T13:26:07.751+02:00</created_date>
<modified_date>2020-05-01T13:26:07.791+02:00</modified_date>
<deleted_date/>
<objects>
<object name="client" type="Client"/>
<object name="point_log" type="PointLogFunctionality"/>
</objects>
<parameters>
<parameter name="point_log_recently_used" source="point_log.wasRecentlyOn(null, 1800)" type="Boolean"/>
</parameters>
<results>
<result name="presence" type="Boolean" action="client.setPresence(presence, 'rule')"/>
</results>
</template>
<location id="062c0bf6ecc44f14948ed24a15ec3636">
<name>Home</name>
<description>A building with a smart meter.</description>
<type>building</type>
<created_date>2020-04-24T14:38:07.232+02:00</created_date>
<modified_date>2020-05-01T15:13:21.007+02:00</modified_date>
<deleted_date/>
<preset>home</preset>
<clients/>
<appliances/>
<logs>
<cumulative_log id="0431ff284dc74beba20dd8b6c9a03258">
<updated_date>2020-05-01T15:13:00+02:00</updated_date>
<type>electricity_consumed</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T15:13:00+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:00+02:00" end_date="2020-05-01T15:13:00+02:00">
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_peak">1879740.00</measurement>
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_offpeak">2769552.00</measurement>
</period>
<electricity_cumulative_meter id="e3d6d7d2fcff48de9320843385c37401"/>
</cumulative_log>
<cumulative_log id="11eba3e6ad4a43059d9a0e40a79f5d5e">
<updated_date>2020-05-01T15:13:00+02:00</updated_date>
<type>electricity_produced</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T15:13:00+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:00+02:00" end_date="2020-05-01T15:13:00+02:00">
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_peak">728707.00</measurement>
<measurement log_date="2020-05-01T15:13:00+02:00" tariff="nl_offpeak">188453.00</measurement>
</period>
<electricity_cumulative_meter id="e3d6d7d2fcff48de9320843385c37401"/>
</cumulative_log>
<interval_log id="24f1f39274d74ec0a90d958bc06ea48c">
<updated_date>2020-05-01T15:00:00+02:00</updated_date>
<type>electricity_consumed</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T14:00:00+02:00</last_consecutive_log_date>
<interval>PT1H</interval>
<period start_date="2020-05-01T15:00:00+02:00" end_date="2020-05-01T15:00:00+02:00" interval="PT1H">
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_peak">27.00</measurement>
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_offpeak">0.00</measurement>
</period>
<electricity_interval_meter id="20a9ad94be8f4f42bd8fe5df30efc9ce"/>
</interval_log>
<interval_log id="7f41e99480b84196978f544925680753">
<updated_date>2020-05-01T15:00:00+02:00</updated_date>
<type>electricity_produced</type>
<unit>Wh</unit>
<last_consecutive_log_date>2020-05-01T14:00:00+02:00</last_consecutive_log_date>
<interval>PT1H</interval>
<period start_date="2020-05-01T15:00:00+02:00" end_date="2020-05-01T15:00:00+02:00" interval="PT1H">
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_peak">184.00</measurement>
<measurement log_date="2020-05-01T15:00:00+02:00" tariff="nl_offpeak">0.00</measurement>
</period>
<electricity_interval_meter id="20a9ad94be8f4f42bd8fe5df30efc9ce"/>
</interval_log>
<point_log id="9efca28708534a04ba46cccc076fb0b4">
<updated_date>2020-05-01T15:13:20+02:00</updated_date>
<type>electricity_produced</type>
<unit>W</unit>
<last_consecutive_log_date>2020-05-01T15:08:03+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:20+02:00" end_date="2020-05-01T15:13:20+02:00">
<measurement log_date="2020-05-01T15:13:20+02:00" tariff="nl_offpeak">0.00</measurement>
<measurement log_date="2020-05-01T15:13:20+02:00" tariff="nl_peak">0.00</measurement>
</period>
<electricity_point_meter id="a366c0f6a30041609ce458067a1896d2"/>
</point_log>
<interval_log id="bff1a249a9914b0a977f9e06160ecea6">
<updated_date>2020-05-01T15:00:00+02:00</updated_date>
<type>gas_consumed</type>
<unit>m3</unit>
<last_consecutive_log_date>2020-05-01T14:00:00+02:00</last_consecutive_log_date>
<interval>PT1H</interval>
<period start_date="2020-05-01T15:00:00+02:00" end_date="2020-05-01T15:00:00+02:00" interval="PT1H">
<measurement log_date="2020-05-01T15:00:00+02:00">0.00</measurement>
</period>
<gas_interval_meter id="67c1122c34044ac9bbecdfacd1e55d5d"/>
</interval_log>
<cumulative_log id="d9f6305855ea420aaaaf0ed5a4091517">
<updated_date>2020-05-01T15:10:00+02:00</updated_date>
<type>gas_consumed</type>
<unit>m3</unit>
<last_consecutive_log_date>2020-05-01T15:10:00+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:10:00+02:00" end_date="2020-05-01T15:10:00+02:00">
<measurement log_date="2020-05-01T15:10:00+02:00">281.90</measurement>
</period>
<gas_cumulative_meter id="45efe0e328ab4d1897710d5e5e1ee2a8"/>
</cumulative_log>
<point_log id="e96466bcb1f74cb7a5e388f0b65f8c93">
<updated_date>2020-05-01T15:13:20+02:00</updated_date>
<type>electricity_consumed</type>
<unit>W</unit>
<last_consecutive_log_date>2020-05-01T15:13:20+02:00</last_consecutive_log_date>
<period start_date="2020-05-01T15:13:20+02:00" end_date="2020-05-01T15:13:20+02:00">
<measurement log_date="2020-05-01T15:13:20+02:00" tariff="nl_offpeak">0.00</measurement>
<measurement log_date="2020-05-01T15:13:20+02:00" tariff="nl_peak">694.00</measurement>
</period>
<electricity_point_meter id="a366c0f6a30041609ce458067a1896d2"/>
</point_log>
</logs>
<actuator_functionalities/>
</location>
<gateway id="86b8796bc7194e7590c6d20e9eab0f25">
<created_date>2020-04-20T15:33:29.500+02:00</created_date>
<modified_date>2020-05-01T14:38:35.747+02:00</modified_date>
<deleted_date/>
<name/>
<description/>
<enabled>true</enabled>
<firmware_locked>false</firmware_locked>
<prevent_default_update>false</prevent_default_update>
<last_reset_date>2020-04-20T15:33:29.500+02:00</last_reset_date>
<last_boot_date>2020-05-01T13:24:42.596+02:00</last_boot_date>
<vendor_name>Plugwise</vendor_name>
<vendor_model>smile</vendor_model>
<hardware_version>AME Smile 2.0 board</hardware_version>
<firmware_version>4.0.2</firmware_version>
<mac_address>C49300136281</mac_address>
<short_id>ztnlgfcq</short_id>
<send_data>true</send_data>
<anonymous>false</anonymous>
<lan_ip>192.168.10.2</lan_ip>
<wifi_ip/>
<hostname>smile136281</hostname>
<time>2020-05-01T15:13:21+02:00</time>
<timezone>Europe/Amsterdam</timezone>
<ssh_relay active_until="2020-05-09T02:39:43+02:00">enabled</ssh_relay>
<project id="123306def5eb4172ae74435aea21e753">
<name>-- Stock</name>
<description>Stock which was previously called fulfillment</description>
<is_default>false</is_default>
<visible_in_production>true</visible_in_production>
<deleted_date/>
<modified_date>2020-04-24T14:38:13.444+02:00</modified_date>
<created_date>2014-11-19T17:45:10+01:00</created_date>
</project>
<gateway_environment id="ebd503b533534d1d8dd62fcadefc42bb">
<savings_result_value/>
<longitude/>
<thermostat_model/>
<city/>
<country/>
<electricity_consumption_tariff_structure>single</electricity_consumption_tariff_structure>
<electricity_production_peak_tariff/>
<central_heating_model/>
<household_children>0</household_children>
<thermostat_brand/>
<electricity_production_off_peak_tariff/>
<central_heating_installation_date/>
<postal_code/>
<electricity_consumption_off_peak_tariff/>
<latitude/>
<gas_consumption_tariff>0.033</gas_consumption_tariff>
<modified_date>2020-04-26T10:36:26.901+02:00</modified_date>
<electricity_production_tariff_structure>single</electricity_production_tariff_structure>
<tariff_region>BE</tariff_region>
<housing_construction_period>unknown</housing_construction_period>
<electricity_production_single_tariff>0.01</electricity_production_single_tariff>
<electricity_consumption_peak_tariff/>
<electricity_consumption_single_tariff>0.156</electricity_consumption_single_tariff>
<central_heating_brand/>
<housing_type>apartment</housing_type>
<currency>EUR</currency>
<savings_result_unit/>
<household_adults>0</household_adults>
<central_heating_year_of_manufacture/>
<deleted_date/>
<modified_date>2020-04-26T10:36:26.901+02:00</modified_date>
<created_date>2020-05-01T13:10:02+02:00</created_date>
</gateway_environment>
<features>
<remote_control id="3256fd044dc14194950139d401fa1dc7">
<activation_date>2020-05-01T06:47:42+02:00</activation_date>
<expiration_date>2038-01-19T04:14:07+01:00</expiration_date>
<validity_period/>
<valid_to/>
<valid_from/>
<grace_period/>
<deleted_date/>
<modified_date>2020-05-01T06:47:54.069+02:00</modified_date>
<created_date>2020-05-01T06:47:42+02:00</created_date>
</remote_control>
</features>
</gateway>
<template id="db7bbe458bdd40e883a16debcc9d354d" tag="zone_setpoint_and_state_based_on_preset">
<name>Zone preset template</name>
<description>
Template for actuating thermostats and relays on a preset basis.
</description>
<single_actor>true</single_actor>
<created_date>2020-05-01T13:26:07.634+02:00</created_date>
<modified_date>2020-05-01T13:26:07.674+02:00</modified_date>
<deleted_date/>
<objects>
<object name="zone" type="Location"/>
</objects>
<parameters>
<parameter name="preset" source="zone.preset" type="Preset"/>
</parameters>
<results>
<result name="cooling_setpoint" type="Number" action="zone.iterateFunctionalities('ThermostatFunctionality', 'thermostat')().setSetpoint(null, null, cooling_setpoint)"/>
<result name="domestic_hot_water_state" type="OnOff" action="zone.iterateFunctionalities('ToggleFunctionality', 'domestic_hot_water_state')().state = domestic_hot_water_state"/>
<result name="heating_setpoint" type="Number" action="zone.iterateFunctionalities('ThermostatFunctionality', 'thermostat')().setSetpoint(null, heating_setpoint, null)"/>
<result name="state" type="OnOff" action="zone.iterateFunctionalities('RelayFunctionality')().state = state"/>
</results>
</template>
<template id="94b153752f5b452380fc4bf5f6a1ebd4" tag="relay_state_based_on_time_and_preset">
<name>Relay schedule template</name>
<description>
Template for scheduling relays on a time and preset basis.
</description>
<single_actor>false</single_actor>
<created_date>2020-05-01T13:26:07.508+02:00</created_date>
<modified_date>2020-05-01T13:26:07.549+02:00</modified_date>
<deleted_date/>
<objects>
<object name="direct_object" type="DirectObject"/>
<object name="zone" type="Location"/>
</objects>
<parameters>
<parameter name="preset" source="zone.preset" type="Preset"/>
<parameter name="time" source="clock.weekTime" type="WeekTime"/>
</parameters>
<results>
<result name="state" type="OnOff" action="direct_object.iterateFunctionalities('RelayFunctionality')().state = state"/>
</results>
</template>
<template id="27af8badad3d4db9abe326f9a002df30" tag="relay_state_based_on_time">
<name>Relay schedule template</name>
<description>Template for scheduling relays on a time basis.</description>
<single_actor>true</single_actor>
<created_date>2020-05-01T13:26:07.567+02:00</created_date>
<modified_date>2020-05-01T13:26:07.624+02:00</modified_date>
<deleted_date/>
<objects>
<object name="direct_object" type="DirectObject"/>
</objects>
<parameters>
<parameter name="time" source="clock.weekTime" type="WeekTime"/>
</parameters>
<results>
<result name="state" type="OnOff" action="direct_object.iterateFunctionalities('RelayFunctionality')().state = state"/>
</results>
</template>
</domain_objects>
 
 
Thanks
  • 1 year later...
Posted

Hi all,

 

I got this kind of working but it is too complicated.

I cut and paste the part of Eddy "where you project your data to an unused switch" into the ToonData VD found elsewhere on this forum and this works partially.

Due restarting Toon the connection is sometimes gone and the VD stops working.

My question is this:

I have Domiticz pushing data via Fibarolink and that works but the data in the variables is too long (see my screenshot) so, how do I get a nice clean number?

 

Please login or register to see this image.

/monthly_2021_11/1490306646_Schermafbeelding2021-11-03om11_59_23.png.8855bca912f4d09c710d2660c7b0ee35.png" />

 

And can I use this data to send it to my switch so that I get a constant livestream of energy use in my energy panel?

 

 

246976725_Schermafbeelding2021-11-03om11_59_07.png.8586ab88295e9d8620bb2fbab7da103c.png

 

 

Thanks

Eric

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...