Page 1 of 1

Heat pump monitor plugin/hardware/device

Posted: Friday 06 January 2017 11:29
by MildaGenius
Hello,
I want write monitor for Acond heat pump (AHP), which allow read data over https (PCL in local network or with remote access).
The number of monitored values from AHP can be lot (5 temperatures, 5 switch states,

I can do it as script, which in selected interval contact AHP, read informations and send it as JSON back to Domoticz.
Problems of this solution are:
-lot of manual adding virtual devices (temperatures, switches)
-propagate idx of all devices to the script
-authorisation
-script dependency on OS
-upgrade if monitored values changed
-hard usage for other users

So my idea is:
-select AHP from device list, which will create all necessenary virtual devices (depends on version)
-field for add authorisation credits
-script behind AHP device will make https call to PCL and fill data to virtual devices (problem with async communication?)

My questions:
1. Is this idea real?
2. Some different approach?
3. Any doc/example from which I can learn?
4. Others advices?

Thanks for your directing me.

Milan

Re: Heat pump monitor plugin/hardware/device

Posted: Friday 13 January 2017 10:16
by MildaGenius
No suggestions so I made some research and check some examples.

1. best solution will be hardware plugin written in C++
+can be async
+included in compiled Domoticz
+easy use for users (plugin will define all necessenary devices)

-hard developing with required compilation
-if not part of official source code, required compilation for users

2.python script for hardware plugin + python script for collecting and send data
+developing without Domoticz recompiling
+easy use for users (plugin will define all necessenary devices)
+hardware plugin will export devices info for collecting scripts

-two separate scripts
-more technical user required (cron usage) for instalation

According this, I decided to try second case.

Re: Heat pump monitor plugin/hardware/device

Posted: Sunday 15 January 2017 22:52
by ubee
Hi,

Interesting. I'm about to do something similar for Unipi, an I/O extension module for Rasp Pi. There is a solution available based on virtual devices and a LUA script, but as you point out such a solution requires manual mapping between the IDXs for the virtual devices and the I/O ports on the expansion module.

The UniPi module and the ports on it can be monitored and controlled by a REST interface, so our solutions will have a lot in common. My idea is to try out a HW plug in written in Python.

Maybe we can share ideas and code? Please send me a personal message if you are interested. Of course we can use this thread as well to interact, but it might be more efficient to use a direct channel to begin with.