Page 9 of 9

Re: Python Plugin: ebusd

Posted: Friday 10 May 2024 8:16
by fantom
Barberousse wrote: Thursday 09 May 2024 22:39 This should be general selector, I think you have text because you begun in read-only mode. In next version, I will change automatically the switch type when switching from read-only to read/write and from read/write to read-only.
I cheked it in code. This is GeneralSwitch, but domoticz show it as light switch.

Code: Select all

{ pTypeGeneralSwitch, "Light/Switch", "lightbulb" },

Re: Python Plugin: ebusd

Posted: Friday 10 May 2024 9:34
by fantom
I created PR with showing level name instead of index
https://github.com/domoticz/domoticz/pull/6077

and PR for more date/time icon
https://github.com/guillaumezin/DomoticzEbusd/pull/12

Re: Python Plugin: ebusd

Posted: Friday 10 May 2024 12:05
by Barberousse
And I created a question here because I think I encountered a bug with extended plugin framework: https://www.domoticz.com/forum/viewtopic.php?t=42330

Re: Python Plugin: ebusd

Posted: Saturday 11 May 2024 15:29
by Barberousse
fantom wrote: Friday 10 May 2024 9:34 I created PR with showing level name instead of index
https://github.com/domoticz/domoticz/pull/6077

and PR for more date/time icon
https://github.com/guillaumezin/DomoticzEbusd/pull/12
I integrated your changes in version 2.1.0

Re: Python Plugin: ebusd

Posted: Saturday 11 May 2024 16:04
by fantom
Something is wrong

Code: Select all

"m": "timedate",
need to be "min" ?

and also with 1/min is bug

Code: Select all

elif (sFieldType == "number") or (sFieldType == "custom") or (sFieldType == "rpm") or (sFieldType == "timedate"):
remove

Code: Select all

or (sFieldType == "rpm") 
https://github.com/guillaumezin/DomoticzEbusd/pull/13

Re: Python Plugin: ebusd

Posted: Saturday 11 May 2024 16:13
by fantom
And i found something new
"mbar" milibars ? megabars ?

Re: Python Plugin: ebusd

Posted: Saturday 11 May 2024 18:20
by Barberousse
fantom wrote: Saturday 11 May 2024 16:04 Something is wrong
Thank you for the PR, integrated in version 2.1.1

Re: Python Plugin: ebusd

Posted: Saturday 11 May 2024 18:37
by Barberousse
fantom wrote: Saturday 11 May 2024 16:13 "mbar" milibars ? megabars ?
Probably millibar, but I'm not sure, see below, the first is mbar (the only one I have), the second is bar :

Code: Select all

read WaterpressureVariantSum
65493

read WaterPressure
1.559;ok
And the pressure device type in Domoticz handles bar only...

Re: Python Plugin: ebusd

Posted: Sunday 12 May 2024 8:50
by fantom
I don't understand which device is writable.
Can show me one node from json and which parameter indicates this?

Re: Python Plugin: ebusd

Posted: Sunday 12 May 2024 10:20
by Barberousse
fantom wrote: Sunday 12 May 2024 8:50 I don't understand which device is writable.
Can show me one node from json and which parameter indicates this?
Messages ending with "-w" are writable:
messageebuswritable.png
messageebuswritable.png (5.2 KiB) Viewed 1836 times
Inside the message, the property "write" is "true":
messageebuswritable2.png
messageebuswritable2.png (17.01 KiB) Viewed 1835 times

Re: Python Plugin: ebusd

Posted: Sunday 12 May 2024 13:14
by fantom
So I understood correctly from the code.
In my json i have only two nodes with write = true and zero with "-w".
But in domoticz i have many of devices for write. For exammpel setpoints and selectors.
And all devices for write, i have like "read only".

Code: Select all

   "SetMode": {
    "name": "SetMode",
    "passive": true,
    "write": true,
    "lastup": 1715512253,
    "zz": 8,
    "id": [181, 16, 0],
    "fields": {
     "hcmode": {"value": "auto"},
     "flowtempdesired": {"value": 0.0},
     "hwctempdesired": {"value": 45.0},
     "hwcflowtempdesired": {"value": null},
     "disablehc": {"value": 1},
     "disablehwctapping": {"value": 0},
     "disablehwcload": {"value": 0},
     "remoteControlHcPump": {"value": 0},
     "releaseBackup": {"value": 0},
     "releaseCooling": {"value": 0}
    },
    "fielddefs": [
     { "name": "hcmode", "slave": false, "type": "UCH", "isbits": false, "length": 1, "values": { "0": "auto", "1": "off", "2": "water" }, "unit": "", "comment": "boiler mode"},
     { "name": "flowtempdesired", "slave": false, "type": "D1C", "isbits": false, "length": 1, "unit": "°C", "comment": "temperature"},
     { "name": "hwctempdesired", "slave": false, "type": "D1C", "isbits": false, "length": 1, "unit": "°C", "comment": "temperature"},
     { "name": "hwcflowtempdesired", "slave": false, "type": "UCH", "isbits": false, "length": 1, "unit": "°C", "comment": "temperature"},
     { "name": "", "slave": false, "type": "IGN", "isbits": false, "length": 1, "unit": "", "comment": ""},
     { "name": "disablehc", "slave": false, "type": "BI0", "isbits": true, "length": 1, "unit": "", "comment": ""},
     { "name": "disablehwctapping", "slave": false, "type": "BI1", "isbits": true, "length": 1, "unit": "", "comment": ""},
     { "name": "disablehwcload", "slave": false, "type": "BI2", "isbits": true, "length": 1, "unit": "", "comment": ""},
     { "name": "", "slave": false, "type": "IGN", "isbits": false, "length": 1, "unit": "", "comment": ""},
     { "name": "remoteControlHcPump", "slave": false, "type": "BI0", "isbits": true, "length": 1, "unit": "", "comment": ""},
     { "name": "releaseBackup", "slave": false, "type": "BI1", "isbits": true, "length": 1, "unit": "", "comment": ""},
     { "name": "releaseCooling", "slave": false, "type": "BI2", "isbits": true, "length": 1, "unit": "", "comment": ""}
    ]
   },

   "StatusCirPump": {
    "name": "StatusCirPump",
    "passive": true,
    "write": true,
    "lastup": 1715512240,
    "zz": 8,
    "id": [181, 18, 0],
    "fields": {
     "0": {"name": "", "value": "on"}
    },
    "fielddefs": [
     { "name": "", "slave": false, "type": "UCH", "isbits": false, "length": 1, "values": { "0": "off", "100": "on" }, "unit": "", "comment": ""}
    ]
   },

Re: Python Plugin: ebusd

Posted: Sunday 12 May 2024 14:14
by Barberousse
fantom wrote: Sunday 12 May 2024 13:14 So I understood correctly from the code.
In my json i have only two nodes with write = true and zero with "-w".
But in domoticz i have many of devices for write. For exammpel setpoints and selectors.
And all devices for write, i have like "read only".
Are you reading your json with write get parameter, for instance http://domotique:8889/data?def&write ? Otherwise (http://domotique:8889/data?def or http://domotique:8889/data) the messages ending with "-w" won't show up.

Be aware that starting version 2 of the plugin, I used the new extended plugin framework (because it allows unlimited number of devices, it's handy to manage auto discovery). But there is a bug, I created a PR here https://github.com/domoticz/domoticz/pull/6079 . For now, if the devices have been created with the plugin parameter read-only enabled, the plugin won't be able to change the device type to the read/write counterpart if you change the read-only parameter of the plugin, and vice-versa. In last versions of the plugin, you will have an error message asking you to delete such devices, it will be created on next launch of plugin (restarting Domoticz, or choosing "Modify" in plugin parameters).

For me StatusCirPump should be with write to false, I don't know why it is set to true.

Re: Python Plugin: ebusd

Posted: Monday 13 May 2024 16:46
by fantom
Something is wrong, but I don't see bug in code

Code: Select all

   "StatusCirPump": {
    "name": "StatusCirPump",
    "passive": true,
    "write": true,
    "lastup": 1715610974,
    "zz": 8,
    "id": [181, 18, 0],
    "fields": {
     "0": {"name": "", "value": "on"}
    },
    "fielddefs": [
     { "name": "", "slave": false, "type": "UCH", "isbits": false, "length": 1, "values": { "0": "off", "100": "on" }, "unit": "", "comment": ""}
    ]
   },

Re: Python Plugin: ebusd

Posted: Monday 13 May 2024 19:39
by Barberousse
fantom wrote: Monday 13 May 2024 16:46 Something is wrong, but I don't see bug in code
For me, the error is that "write" is "true" in StatusCirPump, but StatusCirPump-w doesn't exist, so the plugin decides that this is a read-only device. And in that case, I think that the plugin is right. Ebus declares it wrongly, I don't know why, but I see in hwcmode.inc in https://github.com/john30/ebusd-configuration that there is a "uw" attribute, maybe the error comes from here.

Re: Python Plugin: ebusd

Posted: Monday 03 June 2024 16:33
by fantom
Do You fix this bug?

ps. I see that one PR is merged to domoticz.

Re: Python Plugin: ebusd

Posted: Thursday 06 June 2024 19:40
by Barberousse
fantom wrote: Monday 03 June 2024 16:33 Do You fix this bug?
ebusselected.png
ebusselected.png (4.05 KiB) Viewed 1595 times
This is not a bug in the plugin, maybe in https://github.com/john30/ebusd-configuration...

Re: Python Plugin: ebusd

Posted: Thursday 06 June 2024 19:42
by Barberousse
And the empty value is expected, it is the "Off" value, but there is no off state on this device, that's why "Hide off level" is enabled.

Re: Python Plugin: ebusd

Posted: Thursday 06 June 2024 20:25
by fantom
Ok.
But 0 equal "selected" (in domoricz 0 = "empty")
And 40 should be empty.

Re: Python Plugin: ebusd

Posted: Saturday 08 June 2024 22:02
by Barberousse
fantom wrote: Thursday 06 June 2024 20:25 But 0 equal "selected" (in domoricz 0 = "empty")
And 40 should be empty.
Levels in domoticz are not the same as index in Json. But I agree on one point, the sorting is not correct. It's fixed in version 2.1.6. Affected devices should be deleted, then restart Domoticz or got in the plugin parameter and press "Modify" to redetect the devices.