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

Error processing received information: this.statusPattern.exec is not a function body #5

Open
Jmi91 opened this issue Dec 3, 2020 · 8 comments
Assignees

Comments

@Jmi91
Copy link

Jmi91 commented Dec 3, 2020

Hi,
I'am trying to implement this plugin but I have a problem with urlGetCurrentPosition
I have this error on homebridge logfile:
[12/3/2020, 15:07:36] [Volets] Error processing received information: this.statusPattern.exec is not a function body: {"position":"20"}

I have this configuration:
"urlGetCurrentPosition": "http://192.168.0.1/api/status.php"

and here is the code of status.php file:

<?php
header('Content-type:application/json');
$jsonAnswer = array('position' => '20');
echo json_encode($jsonAnswer);
?>

What I'am missing ?
Thanks for your help.

Jmi

@Jmi91
Copy link
Author

Jmi91 commented Dec 3, 2020

Sorry but the problem was that I have installed the bad plugin.... :-(
It's working now with the correct plugin.
You can close This issue.

Jmi

@crashtestoz crashtestoz self-assigned this Dec 3, 2020
@crashtestoz
Copy link
Owner

All good.

@Jmi91
Copy link
Author

Jmi91 commented Dec 3, 2020

crashtestoz, I have another question.
All is working except that now I have always the "spinning wheel" in my window blind and it's saying "Opening".
Any idea ?
IMG_0009

@crashtestoz
Copy link
Owner

I think this is an issue with the update routine. HomeKit polls the device at an interval I believe and this is not working with the plug-in. I have not had time to troubleshoot and fix it.

@Jmi91
Copy link
Author

Jmi91 commented Dec 5, 2020

Ok thanks

@ZigDuDim
Copy link

ZigDuDim commented Jan 2, 2021

Hi,

@Jmi91 I suppose you have installed the plug-in from "dural" and not from @crashtestoz ?
Because I have the same problem, and I am still trying to figuring it out because I am far from being expert in Arduino ^^

@Jmi91
Copy link
Author

Jmi91 commented Jan 2, 2021

Hi,

@Jmi91 I suppose you have installed the plug-in from "dural" and not from @crashtestoz ?
Because I have the same problem, and I am still trying to figuring it out because I am far from being expert in Arduino ^^

Yes that was my problem. With the right plugin, all is OK.
Here is my config:

{
            "accessory": "HttpWindowBlinds",
            "name": "volets des velux",
            "urlSetTargetPosition": "http://192.168.0.2/voletsvelux/api/blinds?open=%VALUE%",
            "urlGetCurrentPosition": "http://192.168.0.2/voletsvelux/api/status"
},

and here is an example of php file status:

<?php
header('Content-type:application/json');
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 
$jsonAnswer = array('position' => '20');
echo json_encode($jsonAnswer);
?>

@ZigDuDim
Copy link

ZigDuDim commented Jan 3, 2021

@Jmi91 Merci de la réponse ;)

I have successfully add physical button. But the status of my rollers doesn't refresh when using those buttons, it refreshes only when using the Home App. Any ideas on how to force the status update ?

crashtestoz, I have another question.
All is working except that now I have always the "spinning wheel" in my window blind and it's saying "Opening".
Any idea ?
IMG_0009

I have the same problem, but only when I restart homebridge server. So in day to day use, it doesn't bother me much.

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

3 participants