Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing data for mqtt or httpd json interface- use of polling? #52

Closed
andig opened this issue Jan 15, 2017 · 3 comments
Closed

Refreshing data for mqtt or httpd json interface- use of polling? #52

andig opened this issue Jan 15, 2017 · 3 comments
Labels

Comments

@andig
Copy link
Contributor

andig commented Jan 15, 2017

I want to log some ~30 values of my bai- either each minute or when it changes. I've currently solved this by

  • using a cron job
  • and listening to logfile changes especially for the Status01 notifications

My code is in https://github.com/andig/vaillant.

I'm wondering what other/ better options there are. Using mqtt or /data/ I can get all currently received values from ebusd. Using mqtt (but not httpd) I can force updates using /get suffix.

Would the polling feature be suitable for my purpose/ could you explain how it works? I'm wondering if I could setup polling once and only use mqtt or json client to look for the updates?

@john30
Copy link
Owner

john30 commented Jan 17, 2017

I can't verify your problem with the MQTT interface. Everything works just fine. Which version of mosquitto are you using? When I do a mosquitto_pub -n -t ebusd/$circuit/$name/get a couple of seconds later a mosquitto_sub -v -t "ebusd/#" receives the result.

For the regular polling of data: why don't you use the contrib/scripts/readall.sh in the cronjob for that?
And why looking into the log file at all if ebusd supports multiple regular ways to retrieve the values?

@andig
Copy link
Contributor Author

andig commented Jan 17, 2017

I can't verify your problem with the MQTT interface. Everything works just fine.

Confirmed. I had 2 ebus instances running, reason unknown (sorry- I thought I had closed this issue to clean it up).

For the regular polling of data: why don't you use the contrib/scripts/readall.sh in the cronjob for that?

Haha ;) Never looked there. readall seems to run through every message found and read it?

And why looking into the log file at all if ebusd supports multiple regular ways to retrieve the values?

I wanted to get a good and detailed look at the bai operation- subminute resolution and was looking for the bai to push messages instead me polling it.

Looking at the logfile I got that Status01 whenever the bai sent it (though not much else). I was afraid to have my polling overload the bus and impact bai/vrc operations if I requested too much data.

I'm still wondering what the polling (with priority levels) actually does?

@john30
Copy link
Owner

john30 commented Jan 18, 2017

yes, readall.sh reads all elements matching the parameters give, so e.g. with ./readall.sh -c bai temp it would read all temperature messages of the bai circuit.
the polling does what it says, it polls the messages marked as such in regular intervals (see --pollinterval argument to ebusd). you can also use the "read" command to adjust poll priorities during runtime of ebusd. a higher a poll priority value will lead to less often poll of that message, i.e. prio 1 messages are polled in every cycle, prio 2 messages are polled every second cycle and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants