Search found 37 matches

by Johan1974
Tuesday 25 March 2025 13:44
Forum: Bugs and Problems
Topic: Smart Meter P1 2 values
Replies: 3
Views: 294

Re: Smart Meter P1 2 values

I have had a 3-phase connection for 1 year, before that a 1-phase. Until yesterday I only had 1 value. Negative or positive. The value was calculated. But since today there are two visible. I use a version from March 2024, I have just updated it now, to see if I got 1 value again, but no. I read the ...
by Johan1974
Tuesday 25 March 2025 11:22
Forum: Bugs and Problems
Topic: Smart Meter P1 2 values
Replies: 3
Views: 294

Smart Meter P1 2 values

Hello,

I have been getting two values ​​in the reading of my p1 smart meter since today. (3 phases) Both a return value (-100 Watt) and a consumer value (+200 Watt). Normally I got 1 calculated value. I have not done an update of domoticz.

I would like to see a calculated value again, positive or ...
by Johan1974
Sunday 20 October 2024 10:49
Forum: dzVents
Topic: Negative Value Smart meter P1
Replies: 4
Views: 1425

Negative Value Smart meter P1

Hello,
I want to switch a relay when more power is generated than 900 watts and it switches off again when 200 watts are supplied back.

It works with positive numbers, but not with negative ones (Smart meter)

return {
on = {
timer = {'every minute'}
},


execute = function(domoticz,state ...
by Johan1974
Thursday 23 February 2023 22:11
Forum: dzVents
Topic: Simple circuit, but it does not work
Replies: 4
Views: 363

Simple circuit, but it does not work

I'm trying to make a simple circuit in Dzvents, but it's going to be a pinball machine.

If IDX1 turns on or off, IDX2 must also turn on or off.
and
If IDX2 turns on or off, IDX1 must also turn on or off

When I make this in DZvents, IDX1 and IDX2 start flashing

Can someone help me?
by Johan1974
Wednesday 15 December 2021 19:19
Forum: dzVents
Topic: How read Sonos data every minute
Replies: 6
Views: 851

Re: How read Sonos data every minute

I changed everything, but I still get the text 'nil' in the dummy.

return {
on = {
timer = {
'every minute' -- just an example to trigger the request
},
httpResponses = {
'Sonostrigger' -- must match with the callback passed to the openURL command
}
},
logging = {
level = domoticz.LOG ...
by Johan1974
Tuesday 14 December 2021 20:40
Forum: dzVents
Topic: How read Sonos data every minute
Replies: 6
Views: 851

Re: How read Sonos data every minute

I made a Text dummy called 'SonosTest'
The text that becomes visible in the dummy is "nil" and not the value of the volume..

Code: Select all

 				domoticz.devices('SonosTest').updateText(volume)
				domoticz.log('Text: ' .. someValue , domoticz.LOG_INFO) 
by Johan1974
Monday 13 December 2021 19:53
Forum: dzVents
Topic: How read Sonos data every minute
Replies: 6
Views: 851

How read Sonos data every minute

Hello,

How can I read the status of my sonos every minute in a dzvents script, and make the values ​​visible in a switch.?
I read the data from the sonos with 'http://192.168.1.21:5005/state' and get the following data:
{"volume":15,"mute":false,"equalizer":{"bass":0,"treble":4,"loudness":true ...
by Johan1974
Tuesday 16 February 2021 19:14
Forum: dzVents
Topic: Volume control with dummy. [Solved]
Replies: 2
Views: 908

Re: Volume control with dummy. [Solved]

Yeah,

Thanks waaren, it works :)
by Johan1974
Tuesday 16 February 2021 19:12
Forum: Python
Topic: Python plugin: Presence detection from wireless router
Replies: 1117
Views: 231113

Re: Python plugin: Presence detection from wireless router

Hello,
I am trying to install Domoticz iDetect v2 on my Raspberry pi4, but when installing Paramiko
sudo pip3 install requests paramiko
I get the following error:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting paramiko
Could ...
by Johan1974
Thursday 11 February 2021 21:41
Forum: dzVents
Topic: Volume control with dummy. [Solved]
Replies: 2
Views: 908

Volume control with dummy. [Solved]

I am using the following script:
return {
on = {
devices = { 'Radio' },
timer = { 'every 5 minutes' },
},

execute = function(domoticz, device)

if device.state ~= 'Off' then
if device.state == 'Q-Music' then
os.execute ("killall mplayer")
os.execute ("mplayer -noconsolecontrols http ...
by Johan1974
Thursday 29 October 2020 11:41
Forum: dzVents
Topic: monitor the switch on time [Solved]
Replies: 11
Views: 1251

Re: monitor the switch on time [Solved]

Thank you very much.!
The script is already running here ..
by Johan1974
Wednesday 28 October 2020 14:20
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Re: Script to backup to a Synology NAS

I started all over again and didn't use a windows editor this time.
And yes! It works now! It's very easy to use an editor, but I understand I have to do everything with Putty and ssh..
Thank you very much.

I am still interested in the script @Egregius uses. A total backup is always better.
by Johan1974
Wednesday 28 October 2020 12:34
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Re: Script to backup to a Synology NAS


Why not use a script on your nas with rsync of the complete domoticz folder? Much easier.
If /tmp is on your SD card it'll ruin it.
If /tmp is in tmpfs you can hit memory limits.

Also, using rsync for the complete domoticz folder gives you the advantage of making versions possible and you'll have ...
by Johan1974
Wednesday 28 October 2020 11:53
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Re: Script to backup to a Synology NAS

Okay, so I use to run the script: sudo /home/pi/domoticz/scripts/domoticz_backup.sh
that is also what I read in the manual on the website.
but then nothing happens, only the following message:
sudo: unable to execute /home/pi/domoticz/scripts/domoticz_backup.sh: No such file or directory
When ...
by Johan1974
Wednesday 28 October 2020 10:58
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Re: Script to backup to a Synology NAS

That's right, and I can remember making this mistake more than once .. :(
I started over from the beginning, with a new domoticz_backup.sh file. I make script executable with sudo chmod +x /home/pi/domoticz/scripts/domoticz_backup.sh

Then I run the script with: sudo /home/pi/domoticz/scripts ...
by Johan1974
Wednesday 28 October 2020 10:08
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Re: Script to backup to a Synology NAS

Sorry, I'm not clear.

I have CMOD de file domoticz_backup to 777
When I use: ls -ls /home/pi/domoticz/scripts/domoticz_backup.sh the answer is 4 -rwxrwxrwx 1 pi pi 1609 Oct 28 09:50 /home/pi/domoticz/scripts/domoticz_backup.sh

When I use sudo sh /home/pi/domoticz/scripts/domoticz_backup.sh the ...
by Johan1974
Tuesday 27 October 2020 22:10
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Re: Script to backup to a Synology NAS

Yes,

Code: Select all

 844 -rwxr-xr-x 1 root root 863400 Jan 15  2017 /bin/bash 

Code: Select all

 4 -rwxr-xr-x 1 pi pi 1604 Oct 27 21:57 /home/pi/domoticz/scripts/domoticz_backup.sh 
by Johan1974
Tuesday 27 October 2020 20:56
Forum: Bash / PowerShell / Batch etc.
Topic: Script to backup to a Synology NAS
Replies: 21
Views: 13815

Script to backup to a Synology NAS

Hello I used the script

#!/bin/bash
#
# 20201028 Modified to replace CR/LF (windows) to LF (Linux)
#
# LOCAL/FTP/SCP/MAIL PARAMETERS
#
SERVER="192.168.1.11" # IP of Synology NAS, used for ftp
USERNAME="Domoticz" # FTP username of Network disk used for ftp
PASSWORD="12345" # FTP password of ...
by Johan1974
Tuesday 27 October 2020 18:24
Forum: dzVents
Topic: monitor the switch on time [Solved]
Replies: 11
Views: 1251

Re: monitor the switch on time [Solved]

When the 'Living room' switch is on for 2 x 40 seconds (On off on), the counter should be at 1 minute. The counter will reset to 0 if it has not reached 60 seconds.??
by Johan1974
Tuesday 27 October 2020 15:37
Forum: dzVents
Topic: monitor the switch on time [Solved]
Replies: 11
Views: 1251

Re: monitor the switch on time [Solved]

This works perfectly. One more little question, is it possible to count in seconds, and display in minutes.?