andig / pimatic-fritz

Pimatic plugin for Fritz!Box SmartHome and FritzDect!200 Node
GNU General Public License v2.0
8 stars 6 forks source link

Cannot access http://fritz.box/webservices/homeautoswitch.lua #34

Closed atomikx closed 6 years ago

atomikx commented 7 years ago

Hello,

I want to controll a FrizDECT 200 switch with pimatic. After i install the fritz plugin in my pimatic v0.9.37 i get the folowing error messages in the pimatic-daemon.log:

Despite the errror message i can switch the DECT 200, see the temperature an can switch WLAN on/off.

On my FritzBox 7390 i use FRITZ!OS:06.51. Login with an explicit FB-User ("pimatic") with all selectable rights. The Fritz-Box-Log says "Anmeldung des Benutzers pimatic an der FRITZ!Box Benutzeroberfläche von IP-Adresse xxx.xxx.xxx.xxx".

For pimatic i use a Raspberry Pi Model B+ with Raspbian GNU/Linux 8 (jessie) Arduino Compatible Nano V3 Node JS v4.4.5 Pimatic v0.0.37 Fritz Plugin v0.5.3

Best regards Atomikx

atomikx commented 7 years ago

to complement my informations, here are my configuration settings (config.json):

  "plugins": [
    ...
    {
      "url": "http://fritz.box",
      "user": "pimatic",
      "password": "xxxxxxxx",
      "plugin": "fritz",
      "active": true
    }
  ],
  "devices": [
    {
      "id": "home-switch",
      "name": "Fritz Steckdose",
      "class": "FritzOutlet",
      "ain": "087620365940"
    },
    {
      "id": "temp-1",
      "name": "Temperatur Sensor 1",
      "class": "FritzTemperatureSensor",
      "ain": "087620365940"
    },
    {
      "id": "guest-wlan",
      "name": "Gäste WLAN",
      "class": "FritzWlan"
    },
    ...
andig commented 7 years ago

Does the message appear only once after startup? Is there any functionality problem?

atomikx commented 7 years ago

These error messages appear once after startup. But now, after playing arround with the GuestWLAN switch i see more connection Errors on the pimatic site ("Oops... no connection"; sometimes "timeout"; sometimes: "socket error").

In the pimatic-daemon.log i found following Messages: 22:31:50.245 [pimatic-fritz] error: Cannot access http://fritz.box/webservices/homeautoswitch.lua?0=0&sid=bce3679a5fdacd07&switchcmd=gettemperature&ain=087610345930: undefined Unhandled rejection (<{"error":{"code":"ENOTFOUND","errno":"...>, no stack trace) 22:30:30.150 [pimatic-fritz] error: Cannot access http://fritz.box/webservices/homeautoswitch.lua?0=0&sid=bce3679a5fdacd07&switchcmd=getswitchstate&ain=087610345930: undefined Unhandled rejection (<{"error":{"code":"ENOTFOUND","errno":"...>, no stack trace)

andig commented 7 years ago

Different error? If Es please open new issue wihh steps to reproduce. The first one is just the initial login and should not be harmful.

atomikx commented 7 years ago

Okay, i made some more test. I think there are realy two problems.

1) Error messages at pimatic start: now i have put the plugin configuration to first position in der plugin section (config.json) -> there are no more error messages in the log file now

2) Switching on, off, on, ... the Guest WLAN-Switch show "disconnect" messages on the pimatic web-interface and log file (see above): This happens only in WLAN Mode (no, the raspi ist not connectet to the guest-wlan;-) - if the raspi conneted to LAN the switch works fine. I can open a separate issue in few days

atomikx commented 7 years ago

concerning to 1 i forgot to say that i must remove the guest-wlan device ("FritzWlan")in the config file. Then all error messages are away and the AINs can get from the Fritzbox.

andig commented 7 years ago

I can only imagine that switching guest wlan briefly interrupts normal wlan, too. I have really no idea though if that is the case.

andig commented 6 years ago

Closing due to inactivity