[P092] issues on UVR61-3 with DL bus

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
pez3
New user
Posts: 1
Joined: 21 Oct 2020, 09:00

[P092] issues on UVR61-3 with DL bus

#1 Post by pez3 » 21 Oct 2020, 09:28

hello there,

currently i'm trying to get esp easy running with my UVR61-3 control unit with the help of P092 but i'm struggeling somehow.

i made a custom build of mega-20201016 to activate the plugin.
i did the HW connection as described in https://espeasy.readthedocs.io/en/lates ... R61-3.html.

the first try did not work at all. i measured the bus signal with an oscilloscope and noticed some distortion of the signal. then i noticed in the code that there is the PULLUP activated, which i think is not necessary here.

Code: Select all

        P092_ReceivedOK = false;
        addLog(LOG_LEVEL_INFO, F("P092_init: Set pin"));
        DLbus_Data->ISR_DLB_Pin = CONFIG_PIN1;
        pinMode(CONFIG_PIN1, INPUT_PULLUP);
 
why is the pullup activated here?


secondly i would ask if there is some documentation about the architecture of an esp easy plugin.

is PLUGIN_WEBFORM_SAVE called every time a click on the webforms "submit" button is done?
i'm trying to debug with log messages and set one message in this state but nothing is displayed in the log when i click the "submit" button.... therefore i was curios about the correct functionality...

thank you for your help!

greets peter

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: [P092] issues on UVR61-3 with DL bus

#2 Post by TD-er » 21 Oct 2020, 18:35

Just to give you some more insights in the plugin flow to help you debug.

PLUGIN_WEBFORM_SAVE is indeed called when you press the submit button on the web page for the task config.

N.B. this indirectly also calls PLUGIN_EXIT and PLUGIN_INIT (if task is enabled)

PLUGIN_INIT is called when task is enabled:
- at boot
- After changing task settings (in web interface)
- When enabling task (either via web interface or via command taskenable)

PLUGIN_READ is called every <interval> nr of seconds, or when taskrun command is called.
It is also possible to reschedule the scheduler to call PLUGIN_READ, which is done in some plugins from for example the PLUGIN_TEN_PER_SECOND call when the sensor has new data.

PLUGIN_WRITE is called to check if the task/plugin can handle a command.

PLUGIN_ONCE_PER_SECOND, PLUGIN_TEN_PER_SECOND and PLUGIN_FIFTY_PER_SECOND are periodical calls, which can be used for checking sensor status, whether a buffer contains new data, a flag is set (from an ISR call for example) etc.

I don't know why the pull up for PIN1 is enabled by default.
There is a flag so you can make the pull-up optional and don't need to implement it yourself in the plugin.
I guess if that flag is being used, all is fine.

In PLUGIN_DEVICE_ADD, just make sure to have this:

Code: Select all

Device[deviceCount].PullUpOption       = true;

Post Reply

Who is online

Users browsing this forum: No registered users and 129 guests