Python Plugin: ebusd

Python and python framework

Moderator: leecollings

fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post 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" },
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post 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
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post 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
Attachments
2.PNG
2.PNG (4.07 KiB) Viewed 1333 times
1.PNG
1.PNG (7.18 KiB) Viewed 1336 times
Last edited by fantom on Saturday 11 May 2024 16:23, edited 1 time in total.
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post by fantom »

And i found something new
"mbar" milibars ? megabars ?
Attachments
1.PNG
1.PNG (4.98 KiB) Viewed 1331 times
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post by Barberousse »

fantom wrote: Saturday 11 May 2024 16:04 Something is wrong
Thank you for the PR, integrated in version 2.1.1
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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...
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post by fantom »

I don't understand which device is writable.
Can show me one node from json and which parameter indicates this?
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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 1288 times
Inside the message, the property "write" is "true":
messageebuswritable2.png
messageebuswritable2.png (17.01 KiB) Viewed 1287 times
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post 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": ""}
    ]
   },
Attachments
3.PNG
3.PNG (31.39 KiB) Viewed 1276 times
2.PNG
2.PNG (3.15 KiB) Viewed 1277 times
1.PNG
1.PNG (8.4 KiB) Viewed 1279 times
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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.
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post 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": ""}
    ]
   },
Attachments
1.PNG
1.PNG (9.42 KiB) Viewed 1229 times
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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.
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post by fantom »

Do You fix this bug?

ps. I see that one PR is merged to domoticz.
Attachments
Capture.PNG
Capture.PNG (26.87 KiB) Viewed 1074 times
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post by Barberousse »

fantom wrote: Monday 03 June 2024 16:33 Do You fix this bug?
ebusselected.png
ebusselected.png (4.05 KiB) Viewed 1047 times
This is not a bug in the plugin, maybe in https://github.com/john30/ebusd-configuration...
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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.
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Python Plugin: ebusd

Post by fantom »

Ok.
But 0 equal "selected" (in domoricz 0 = "empty")
And 40 should be empty.
Barberousse
Posts: 139
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin: ebusd

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest