onfoot / homebridge-shelly-shutter

Homebridge plugin made specifically for Shelly 2.5 acting as a window shutter controller
GNU General Public License v3.0
12 stars 0 forks source link

Failed to change target position: SyntaxError: Unexpected token N in JSON at position 0 #7

Open omriavital opened 4 years ago

omriavital commented 4 years ago

Hi,

I have two shelly 2.5 units, both controlling roller shutters.

First unit (living room) controls a single roller shutter motor and plugin works perfectly.

Second unit (bedroom) actually controls two motors (two windows side by side, which I conntected to a single shelly 2.5 unit, using a connector called Relay R1-uni.

Calibration doesn't work in that setup. I'm using the "open/close working time" (set to ~40 sec) to fully close and fully open the shutters. I don't need a partially open state.

Trying to add the second Shelly to the config: { "accessory": "shelly-shutter", "name": "Living room shutter", "ip": "192.168.1.42", "calibration": { "touch-down-position": 30 } }, { "accessory": "shelly-shutter", "name": "Bedroom shutter", "ip": "192.168.1.44" }

A. Blinds won't indicate correct state in the home app B. When I tap to open/close - I get a "no response" error on the button in the home app, and this error in the logs: [Bedroom shutter] Failed to change target position: SyntaxError: Unexpected token N in JSON at position 0

I guess it means the plugin is dependant on a (successful) calibiration...? Is there a way, you believe, to still get this to work? (assuming, again, I don't care about partially opening, and can go time-based)

Thanks! Omri

onfoot commented 4 years ago

Hey! Yes, my plugin needs calibration, otherwise it receives a non-JSON response from Shelly and doesn't handle it well. I probably should do something about that at last. ;)

Will let you know in a few days.

Thanks for the feedback!

omriavital commented 4 years ago

You are amazing! thank you!!

onfoot commented 4 years ago

Sorry I didn't implement your request in the latest version - will take on that next as it requires some additional, bigger changes! And I have to decalibrate my working shutter. 😢

TNTLarsn commented 4 years ago

Please reopen this issue. Sometimes Calibration is not possible. That's why I switched to your repo instead of using "homebridge-shelly"

onfoot commented 4 years ago

I've not given up on this issue yet!

emi09 commented 4 years ago

Hi, I also wish so much that this function would be integrated. Can you give us an update on this?

conrados82 commented 4 years ago

Hello. Same problem here. How´s this going?

philippkersting commented 3 years ago

Hi everybody, same issue here. Is it possible to workaround and insert manually the calibration parameters?

Tyraenor commented 3 years ago

Hi all. I have the same issue. I cannot calibrate and so I cannot use the plugin. So I really hope you integrate this! Thank you so much!

harunsmrkovic commented 5 months ago

I had this issue and it was caused by my Shelly not being in the Shutter/roller mode.