Replies: 4 comments
-
What a really interesting idea, @cvc90! It doesn't have a built in method, as such... The main method that spits out the details is The Here's where it's called currently in the code:
which end up combined as: |
Beta Was this translation helpful? Give feedback.
-
Hi @amnuts, After investigating your answer for several days and analyzing how you were importing this ‘.json’ data, I have found a possible solution to import this data to ‘Home Assistant’ or any program that is compatible with ‘.json’ from opcache-gui without having to modify anything. Here is a summary: To be able to visualize the data in ‘.json’ format it would be as simple as making a request with the following ‘header’ headers: Here is an example of making a request using curl to return the ‘.json’ file curl ‘https://url/opcache-gui.php’ -H ‘accept: application/json, text/plain, /’ If what we want is to import this data to ‘Home Assistant’ there are several methods for importing ‘.json’ data but I think the most efficient to not saturate requests and from the same request to collect the data would be using the ‘HA MultiScrape custom component’. Here is an example of how it would be to collect data from some of the variables
A sample of data from ‘Home Assistant’, from one of my servers to which I have already implemented this integration. What do you think about this integration? There are other methods but I think it is the easiest / cleanest to implement. What do you think? |
Beta Was this translation helpful? Give feedback.
-
I only have speaker-based assistants, no screens, so this is not something I've ever loomed into (though as a coincidence, I did book the HA details a couple months back to look into to controlling some lighting via an arduino... not that I have, yet!), so I can't really speak as to whether it's the best way forwards or not. However, with a quick scan on the forums, it does look like a bunch of people on there are getting json data in a similar way with multiscrape. So if it works for you, and from the screenshot I'm going to say, yes, it does 😄, then I think your solution is great! but I think that if it works for you then you're on to a winner! :-) |
Beta Was this translation helpful? Give feedback.
-
Even if you only have "speaker-based assistants", by adding each tribute as a sensor in "HA", you can use it from the "speaker-based assistants" to tell you the status of each sensor. You can even create your own automations to send you messages through the "HA" application, messaging systems like Telegram or even voice messages for your "speaker-based assistants" such as for status checks or even if it detects that some value does not match what is established. I have to say that this integration can be very useful... After several days and including them in several "Home Assistants", they work perfectly without any problem. |
Beta Was this translation helpful? Give feedback.
-
Hi @amnuts,
I want to import OpCache data into Home Assistant via multiscrape, is there any method to view the data in .json format?
Beta Was this translation helpful? Give feedback.
All reactions