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

Not working with AVR 270 #9

Open
inject3d opened this issue Aug 23, 2022 · 2 comments
Open

Not working with AVR 270 #9

inject3d opened this issue Aug 23, 2022 · 2 comments

Comments

@inject3d
Copy link

inject3d commented Aug 23, 2022

I Just tried to use it on local pi zero2 with a lighttpd webserver with php 7.4.
But I only get a 500 when I open the example or simpler versions.

The webserver and php works for me. So the question is, did I miss anything else?
$hk = new \HKAPI\API('192.168.178.7', 10025, new \HKAPI\Devices\AVR());

I don't get any response after this call. Only the 500. Also if I put an echo() afterwards. The server just gives the 500 back. If I put the echo before the call the echo will be shown.

@KarimGeiger
Copy link
Owner

A 500 error is a generic PHP error. You may want to increase the PHP log level or take a look at the error log to see the exact error message. Without a message, this could be anything, from a missing PHP extension, missing autoloader/dependencies or a version compatibility problem.

@inject3d
Copy link
Author

inject3d commented Aug 24, 2022

Thanks for your reply. You are right, my mistake. I just tried it on my local machine and it works. I did not know composer so that is definitely one reason that it did not work.

Strange thing is that the lightppd server has issues with serving these php files. I would not expect that extensions might be a reason for it. Do you know of something specific which is required? Then I would try to install it.

As I am using lightppd for pihole I am not in the mood to switch to nginx for compatibility reasons.

You did not create a docker image out of curiosity? Idea could be the following:

  • URL Parameterize the api calls index.php?command=powerOn -> Afterwards nobody needs to create additional files
  • Create a docker image
    • Set minimal base image with webserver and php support
    • Clone the project to folder
    • Set ENV variable for IP, Internal PORT, TYPE

FYI, if you want to add it to the list, AVR 270/2700 seams to be compatible. For the heart-alive call I get this back:
string(157) "heart-alive����>"

Additional .ini files parsed: /etc/php/7.4/fpm/conf.d/10-opcache.ini, /etc/php/7.4/fpm/conf.d/10-pdo.ini, /etc/php/7.4/fpm/conf.d/15-xml.ini, /etc/php/7.4/fpm/conf.d/20-apcu.ini, /etc/php/7.4/fpm/conf.d/20-calendar.ini, /etc/php/7.4/fpm/conf.d/20-ctype.ini, /etc/php/7.4/fpm/conf.d/20-curl.ini, /etc/php/7.4/fpm/conf.d/20-dom.ini, /etc/php/7.4/fpm/conf.d/20-exif.ini, /etc/php/7.4/fpm/conf.d/20-ffi.ini, /etc/php/7.4/fpm/conf.d/20-fileinfo.ini, /etc/php/7.4/fpm/conf.d/20-ftp.ini, /etc/php/7.4/fpm/conf.d/20-gd.ini, /etc/php/7.4/fpm/conf.d/20-gettext.ini, /etc/php/7.4/fpm/conf.d/20-iconv.ini, /etc/php/7.4/fpm/conf.d/20-intl.ini, /etc/php/7.4/fpm/conf.d/20-json.ini, /etc/php/7.4/fpm/conf.d/20-mbstring.ini, /etc/php/7.4/fpm/conf.d/20-pdo_sqlite.ini, /etc/php/7.4/fpm/conf.d/20-phar.ini, /etc/php/7.4/fpm/conf.d/20-posix.ini, /etc/php/7.4/fpm/conf.d/20-readline.ini, /etc/php/7.4/fpm/conf.d/20-shmop.ini, /etc/php/7.4/fpm/conf.d/20-simplexml.ini, /etc/php/7.4/fpm/conf.d/20-sockets.ini, /etc/php/7.4/fpm/conf.d/20-sqlite3.ini, /etc/php/7.4/fpm/conf.d/20-sysvmsg.ini, /etc/php/7.4/fpm/conf.d/20-sysvsem.ini, /etc/php/7.4/fpm/conf.d/20-sysvshm.ini, /etc/php/7.4/fpm/conf.d/20-tokenizer.ini, /etc/php/7.4/fpm/conf.d/20-xmlreader.ini, /etc/php/7.4/fpm/conf.d/20-xmlwriter.ini, /etc/php/7.4/fpm/conf.d/20-xsl.ini, /etc/php/7.4/fpm/conf.d/20-zip.ini, /etc/php/7.4/fpm/conf.d/97-dietpi.ini

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

No branches or pull requests

2 participants