Hi
I dont know if I m in the right menu/ topc for this but:
I did followed the manual "Slimme stekkers Toon in samenwerking Domoticz made my mAiden
Very nice and its working
But how can I put this powerplugs also as a energy monitoring in Domoticz itself while its configured/ connected with Toon 2 (geroot)
Is there also a manual for that somewhere because I could not find it (yet)
The Neo Coolcam Powerplugs in Toon also in Domoticz
Moderators: marcelr, TheHogNL, Toonz
-
- Starting Member
- Posts: 25
- Joined: Thu Jan 10, 2019 2:28 pm
The Neo Coolcam Powerplugs in Toon also in Domoticz
Toon 2 Rooted User
Firmware version: 5.94.7
Raspberry Pi 3B+
Domoticz 2022.1
10 Neo Coolcam PowerPlus
Domotica Beginner (need little help in beginning)
Firmware version: 5.94.7
Raspberry Pi 3B+
Domoticz 2022.1
10 Neo Coolcam PowerPlus
Domotica Beginner (need little help in beginning)
Re: The Neo Coolcam Powerplugs in Toon also in Domoticz
Will tonight look how I have tuned, I get namely the consumption of the plugs also in Domoticz.
I think that I have run a crontab with a php script for this.
I think that I have run a crontab with a php script for this.
Member of the Toon Software Collective
-
- Starting Member
- Posts: 25
- Joined: Thu Jan 10, 2019 2:28 pm
Re: The Neo Coolcam Powerplugs in Toon also in Domoticz
Would be very gratefull with a manual
I m just a beginner..
But your other manual was great anyway
I m just a beginner..
But your other manual was great anyway
Toon 2 Rooted User
Firmware version: 5.94.7
Raspberry Pi 3B+
Domoticz 2022.1
10 Neo Coolcam PowerPlus
Domotica Beginner (need little help in beginning)
Firmware version: 5.94.7
Raspberry Pi 3B+
Domoticz 2022.1
10 Neo Coolcam PowerPlus
Domotica Beginner (need little help in beginning)
Re: The Neo Coolcam Powerplugs in Toon also in Domoticz
First thanks Irelandfan for making this script, I have only adjusted it so that the consumption of my plug can be read in Domoticz.
1. Enter the IP address of Toon
2. Search for the correct dev number, you can find them by http://toonip/hdrv_zwave?action=getDevices.json
3. Create a Dummy in Domoticz
4. Enter IDX number of you Dummy
5. Enter IP and port of Domoticz
6. Create a crontab on a linux machine.. I do not know if this can also be done on Toon, I use a raspberry Pi for it.
This crontab will be run every min.
Code: Select all
#!/usr/bin/php
<?php
error_reporting(E_ALL);
/* Written by Ierlandfan */
/* 1-11-2015 */
/* Version 1.1 */
/* Edit by mAiden */
/* 01-03-2019 */
/* Change ip_toon to the IP of your Toon */
/* start of current Energy usage import */
$file_string_electricity = file_get_contents('http://XXX.XXX.XXX.XXX/hdrv_zwave?action=getDevices.json');
$parsed_json = json_decode($file_string_electricity, true);
#var_dump($parsed_json);
/* Create new virtual sensor and write down the idx value */
/* Define idxvalue here */
$ElecUsage=$parsed_json['dev_XX']['CurrentElectricityFlow'];
$ElecUsage1 = str_replace('.00', '', number_format($ElecUsage, 2, '.', ','));
$idx = XXX;
/* If this script is not run locally on the Domoticz server change 127.0.0.1 according to your Domoticz IP */
/* Send currentUsage to Domoticz */
$electricityusage = curl_init("http://XX.XX.XX.XX.XX:XXXX/json.htm?type=command¶m=udevice&idx=$idx&svalue=$ElecUsage1");
curl_exec($electricityusage);
?>
2. Search for the correct dev number, you can find them by http://toonip/hdrv_zwave?action=getDevices.json
3. Create a Dummy in Domoticz
4. Enter IDX number of you Dummy
5. Enter IP and port of Domoticz
6. Create a crontab on a linux machine.. I do not know if this can also be done on Toon, I use a raspberry Pi for it.
Code: Select all
*/1 * * * * php /path/to/script/scriptname.php >/dev/null 2>&1
Member of the Toon Software Collective
-
- Starting Member
- Posts: 25
- Joined: Thu Jan 10, 2019 2:28 pm
Re: The Neo Coolcam Powerplugs in Toon also in Domoticz
Mr Aiden
So I put in the command of LX terminal follow command?
Or I make a Duummy with what Type ????
Sorry to ask but I m not so good in it yet
I have a Rasbian Raspberry Pi 3 B+6. Create a crontab on a linux machine.. I do not know if this can also be done on Toon, I use a raspberry Pi for it.
So I put in the command of LX terminal follow command?
And this should be also the toon ip right?*/1 * * * * php /path/to/script/scriptname.php >/dev/null 2>&1
After creat the Dummy I make a sensor and there I will put the IDX NR etc right or I have to do it different?$electricityusage = curl_init("http://XX.XX.XX.XX.XX:XXXX/json.htm?type=command¶m=udevice&idx=$idx&svalue=$ElecUsage1");
curl_exec($electricityusage);
Or I make a Duummy with what Type ????
Sorry to ask but I m not so good in it yet
Toon 2 Rooted User
Firmware version: 5.94.7
Raspberry Pi 3B+
Domoticz 2022.1
10 Neo Coolcam PowerPlus
Domotica Beginner (need little help in beginning)
Firmware version: 5.94.7
Raspberry Pi 3B+
Domoticz 2022.1
10 Neo Coolcam PowerPlus
Domotica Beginner (need little help in beginning)