Search found 302 matches

by FlyingDomotic
Monday 16 December 2024 18:43
Forum: LUA
Topic: Script examples (Lua)
Replies: 138
Views: 154699

Re: Script examples (Lua)

Here's the default script for LUA/Device (click on "+", right most on scripts tab): -- -- Domoticz passes information to scripts through a number of global tables -- -- device changed contains state and svalues for the device that changed. -- devicechanged['yourdevicename'] = state -- devicechanged ...
by FlyingDomotic
Sunday 15 December 2024 21:01
Forum: LUA
Topic: Script examples (Lua)
Replies: 138
Views: 154699

Re: Script examples (Lua)

devicechanged is not a variable but a table, that may contain more than one value.

The right way to extract name and value of changing devices is :
[code
for deviceName,deviceValue in pairs(devicechanged) do
<<Use here deviceName and deviceValue>>
end
[/code]
by FlyingDomotic
Sunday 24 November 2024 13:07
Forum: LUA
Topic: convert time/date
Replies: 2
Views: 159

Re: convert time/date

If you're using "classical" LUA, then time elapsed since device's last update in seconds could be computed with: function lastSeen(device) timestamp = otherdevices_lastupdate[device] or device y, m, d, H, M, S = timestamp:match("(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)") difference = os.difftime(os.time ...
by FlyingDomotic
Sunday 24 November 2024 13:00
Forum: Other questions and discussions
Topic: Help with setting up Domoticz MQTT with TLS
Replies: 6
Views: 575

Re: Help with setting up Domoticz MQTT with TLS

You may perhaps (I didn't tested it) use multiple listeners, with "per_instance_settings = true". On one port, you may have a "classical (non TLS)" connection, used by tools that doesn't support TLS, and on the other a port for TLS connections. This way, you can connect you "TLS only" button. If you ...
by FlyingDomotic
Friday 22 November 2024 1:37
Forum: dzVents
Topic: Access to LOG data using dzVents
Replies: 2
Views: 275

Re: Access to LOG data using dzVents

There's an undocumented API,responding at http://<domoticz_ip>:<domoticz_port>/json.htm?idx=<deviceIdx>&type=lightlog
This may change at every new version, use it at your own risk.
IMHO, keeping changes in a persistent dzVents data, as suggested, is probably the best solution.
by FlyingDomotic
Monday 04 November 2024 21:23
Forum: PHP and all others
Topic: MelCloud plugin
Replies: 5
Views: 598

Re: MelCloud plugin

Personally, no, but you have only to solder 4 wires to an ESP8266, and plug the connector in A/C.
by FlyingDomotic
Saturday 02 November 2024 16:29
Forum: Zigbee
Topic: Aqara motion sensor settings
Replies: 8
Views: 476

Re: Aqara motion sensor settings

EAN 6970504212527 is clearly a ZigBee device. It should be managed by a Zigbee coordinator. Unless you have a bridge between ZigBee and 433 MHz (I never saw one, but this can even perhaps exist), there's no way to get it from RFlink. Could you send us a print screen of this device line into "Setup ...
by FlyingDomotic
Saturday 02 November 2024 8:49
Forum: Zigbee
Topic: Aqara motion sensor settings
Replies: 8
Views: 476

Re: Aqara motion sensor settings

Are you using a DJT11LM Aqara vibration sensor?
If not, what's the exact reference of you sensor?
by FlyingDomotic
Saturday 02 November 2024 8:25
Forum: Zigbee
Topic: Aqara motion sensor settings
Replies: 8
Views: 476

Re: Aqara motion sensor settings

What kind (reference) of aqara sensor do you have?
by FlyingDomotic
Friday 01 November 2024 20:55
Forum: Zigbee
Topic: Aqara motion sensor settings
Replies: 8
Views: 476

Re: Aqara motion sensor settings

ZHA stands for ZigBee Home Automation. So protocol is ZigBee.

Rflink protocol is 433 (and sometimes 868) MHz. You may eventually add a NRFL01 to support MiLight protocol. But no ZigBee.
by FlyingDomotic
Thursday 31 October 2024 21:33
Forum: PHP and all others
Topic: MelCloud plugin
Replies: 5
Views: 598

Re: MelCloud plugin

Some people don't like to much using external servers (like MelCloud) and do prefer having a direct, local control on AC, working without Internet access. Some, including me, are connecting an ESP8266 into CN105 AC connector (https://github.com/SwiCago/HeatPump), and use Domoticz plugin (https://www ...
by FlyingDomotic
Thursday 31 October 2024 19:02
Forum: PHP and all others
Topic: MelCloud plugin
Replies: 5
Views: 598

Re: MelCloud plugin

Error code 500 means "Internal server error". Otherwise said, the remote server (here MelCloud) has a problem...
You may perhaps contact them to ensure they know there's a problem ;-)
by FlyingDomotic
Tuesday 29 October 2024 23:02
Forum: Bugs and Problems
Topic: Smahub MQTT issue
Replies: 17
Views: 706

Re: Smahub MQTT issue

What you can eventually do is a small Python code that read MQTT data of your hub, and publish to another topic last received data every 30 to 60 seconds. You can then read this topic, with less updates. Load of this small Python code will be small.
by FlyingDomotic
Tuesday 22 October 2024 20:28
Forum: Dashticz
Topic: Daily usage from accumulated data
Replies: 5
Views: 492

Re: Daily usage from accumulated data

Should I make the script so that I read the values (reading from Shelly device via MQTT) for power, which seems to update more often, and then read and update the usage at that time? I guess the meter will use the actual time of update to do its calculations.. I don't understand why you want to ...
by FlyingDomotic
Tuesday 22 October 2024 0:11
Forum: Bugs and Problems
Topic: Setup and applying plugins problem on Windows
Replies: 10
Views: 678

Re: Setup and applying plugins problem on Windows

or

Code: Select all

pip3 install requests
by FlyingDomotic
Tuesday 22 October 2024 0:08
Forum: Dashticz
Topic: Daily usage from accumulated data
Replies: 5
Views: 492

Re: Daily usage from accumulated data

Did you tried using a P1 smart meter (energy)? It does it by default.
by FlyingDomotic
Sunday 13 October 2024 18:57
Forum: Temperature and Weather
Topic: 2 Rain devices with different daily vaules
Replies: 4
Views: 510

Re: 2 Rain devices with different daily vaules

Was Domoticz alive at midnight?
Some daily routines are done at that time...
by FlyingDomotic
Sunday 13 October 2024 18:52
Forum: dzVents
Topic: Add two kWh meters
Replies: 11
Views: 1107

Re: Add two kWh meters

Is Totaal Zonnepanelen a kWh counter?
by FlyingDomotic
Saturday 12 October 2024 8:58
Forum: Other questions and discussions
Topic: After changing hardware and devices values end up all in the same day
Replies: 4
Views: 291

Re: After changing hardware and devices values end up all in the same day

The "issue" you had is something common, happening when a cumulative counter goes back to zero (is reset) externally. Is probably occurred when you installed your second SMA inverter. Using "shift click" method, you'll only loose the 4 October production. If you have a way to known/estimate it, it's ...
by FlyingDomotic
Thursday 10 October 2024 0:53
Forum: Python
Topic: Python Plugin: MqttMapper
Replies: 270
Views: 21514

Re: Python Plugin: MqttMapper

I have a bit more with computers (since 1976, when PC didn't exist yet), leaning Linux at 50+ was not a big deal ...

In addition if you connect a screen to your RPi, you won't see a big difference with Windows...