Behavior of different devices, what's underneath the hood

Easy to use, 100% Lua-based event scripting framework.
Post Reply
User avatar
McMelloW
Posts: 193
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Behavior of different devices, what's underneath the hood

Post by McMelloW » Thursday 08 February 2018 12:27

It was when creating a dzVent script, this question wass raised. That is the reason I posted it here. If it should go somewhere else, please do.

For obvious reasons there are different update for different devices, why should you else bother to create so many different updateXxx situations. Briefly: to update a device type Abc you use

Code: Select all

domoticz.devices(MyDevice).updateAbc(value)
In this case, I created a virtual device type Counter. Because the value is electricty, I used updateElectricity(power, energy). It did not work, so I used updateCounter(value) and it worked.

A RFXmeter, RFXmeter counter device shows on the top bar a value in kWh. And on the second line, either Today with 2 values, or just 1 value without any text. However, you can only update 1 value.
Where can I find more inside information about what is going on underneath the hood of this device? Can I change these values on the second line of this device. Is there a reference where the ins and outs of all devices are described and how to use them.

Any help is very welcome.
Greetings McMelloW

dannybloe
Posts: 1434
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: Behavior of different devices, what's underneath the hood

Post by dannybloe » Friday 09 February 2018 18:53

The reason why there are many different update commands is that there are many different device types with different arguments. You need to know your device type before you interact with it. The domoticz manual describes many of them and you can also find info in the wiki.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.

User avatar
McMelloW
Posts: 193
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Re: Behavior of different devices, what's underneath the hood

Post by McMelloW » Saturday 10 February 2018 14:23

dannybloe wrote:
Friday 09 February 2018 18:53
The reason why there are many different update commands is that there are many different device types with different arguments. You need to know your device type before you interact with it. The domoticz manual describes many of them and you can also find info in the wiki.
That's exactly what I understand of it. What puzzles me, is how the updates are presented by the devices in the browser. For example: An Electricty device, named 'Actual Power' is updated with the Actual Power value in W and the Total Energy value in kWh by the code line

Code: Select all

domoticz.devices(idxActPwr).updateElectricity(Power, Energy)
However, in the browser, the Power is showed at the topbar and I think todays Daily Energy is showed at second line of the device. Why do I don't see the Total Energy that is updated with Energy in the code line? I can see the correct value of Energy in the list at the tab Setup/Devices.

It is exactly the same of your example in this topic: Fetching and processing SolarEdge JSON data with 2.4
Greetings McMelloW

dannybloe
Posts: 1434
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: Behavior of different devices, what's underneath the hood

Post by dannybloe » Saturday 10 February 2018 14:25

I don't know why the total isn't there actually. I wondered that myself. I'm just using the API.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.

User avatar
McMelloW
Posts: 193
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Re: Behavior of different devices, what's underneath the hood

Post by McMelloW » Saturday 10 February 2018 15:05

dannybloe wrote:
Saturday 10 February 2018 14:25
I don't know why the total isn't there actually. I wondered that myself. I'm just using the API.
It is less then 3 month having a Raspberry Pi and using Domoticz, so I am a really starter. That is why I can not figure out or it is dzVents or the way the device is handling the data. ie What is the difference in tagging 'Computed' or 'From device' ?

Do you know where I can find more information on how this device is working. It is still difficult for me to find your way in the vast amount of information on very different places.
Greetings McMelloW

dannybloe
Posts: 1434
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: Behavior of different devices, what's underneath the hood

Post by dannybloe » Saturday 10 February 2018 15:12

Not really unless I start digging myself. Try the General forum perhaps.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.

User avatar
McMelloW
Posts: 193
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Re: Behavior of different devices, what's underneath the hood

Post by McMelloW » Saturday 10 February 2018 16:37

dannybloe wrote:
Saturday 10 February 2018 14:25
I don't know why the total isn't there actually. I wondered that myself. I'm just using the API.
It is exactly the same of your example in this topic: Fetching and processing SolarEdge JSON data with 2.4
Just recreated and tested this script again. The only things I changed is the KEY and the SITE_ID. In did created the virtual devices by clicking an the button an the Dummy hardware. In this case The total- energy is displayed at the device. No matter or you tag Computed or From device.
There is a Dutch saying about shooting and leak :?
Greetings McMelloW

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests