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

SPR-01 dont work #232

Closed
rstattin opened this issue Feb 10, 2022 · 10 comments
Closed

SPR-01 dont work #232

rstattin opened this issue Feb 10, 2022 · 10 comments

Comments

@rstattin
Copy link

Hello! I can't get SPR-01 to be added in my system, of course it is added in PLEJD but does not add to HASSIO. Not yet supported?

@SweVictor
Copy link
Collaborator

SweVictor commented Apr 10, 2022

Can you post verbose logs on what happens during startup? Refer to the readme for details on how to extract those.

Basically, we'll need to update https://github.com/icanos/hassio-plejd/blob/master/plejd/PlejdApi.js with the new device.

As an addition: SPR-01 is already part of the list of devices, but if there is a new hardware version we might need to update to support that.

@pluppplupp
Copy link

pluppplupp commented Jul 17, 2022

I have the same issue, I've only got one SPR-01 at a new site. The logs from the registry says hardwareId:8... I have a complete log from restart,

2022-07-17 22:15:20 INF [plejd-api] Getting devices from site details response...
2022-07-17 22:15:20 INF [plejd-api] No Plejd gateway found on site
2022-07-17 22:15:20 VRB [device-registry] Added/updated output device: {"bleOutputAddress":11,"deviceId":"C1961550356E","dimmable":false,"name":"Kök element vänster ","output":0,"roomId":"96e307a2-60c9-43f7-9b0d-9691f91f7747","roomName":"Kök / Matplats","type":"switch","typeName":"-unknown-","version":"1.0.10","uniqueId":"C1961550356E_0"}. 1 output devices in total.
2022-07-17 22:15:20 VRB [device-registry] Added device to room 96e307a2-60c9-43f7-9b0d-9691f91f7747: ["C1961550356E_0"]
2022-07-17 22:15:20 DBG [plejd-api] includeRoomsAsLights is set to true, adding rooms too.
2022-07-17 22:15:20 VRB [device-registry] Added/updated output device: {"bleOutputAddress":10,"deviceId":null,"dimmable":false,"name":"Kök / Matplats","type":"light","typeName":"Room","uniqueId":"96e307a2-60c9-43f7-9b0d-9691f91f7747"}. 2 output devices in total.
2022-07-17 22:15:20 VRB [device-registry] Added device to room undefined: ["96e307a2-60c9-43f7-9b0d-9691f91f7747"]
    {
      "deviceId": "C1961550356E",
      "siteId": "1fa92cc4-ec02-4b37-9ebf-2261885f8f38",
      "installer": {
        "__type": "Pointer",
        "className": "_User",
        "objectId": "urDAH2xqq1"
      },
      "dirtyInstall": false,
      "dirtyUpdate": false,
      "dirtyClock": false,
      "dirtySettings": false,
      "hardwareId": "8",
      "faceplateId": "0",
      "firmware": {
        "data": {
          "__type": "File",
          "name": "7dfbb93bb1b06dbffd5c549d79b2fff8_application.bin",
          "url": "https://cloud.plejd.com/parse/files/zHtVqXt8k4yFyk2QGmgp48D9xZr2G94xWYnF4dak/7dfbb93bb1b06dbffd5c549d79b2fff8_application.bin"
        },
        "createdAt": "2021-11-25T07:39:30.132Z",
        "updatedAt": "2022-01-04T15:46:34.225Z",
        "metaData": {
          "__type": "File",
          "name": "e9c3e9011bbc64e4d1b3ef6b74d9abc0_application.dat",
          "url": "https://cloud.plejd.com/parse/files/zHtVqXt8k4yFyk2QGmgp48D9xZr2G94xWYnF4dak/e9c3e9011bbc64e4d1b3ef6b74d9abc0_application.dat"
        },
        "meshCommands": {
          "universal_time_event": {
            "revision": [
              1
            ]
          },
          "configure_scene_new": {
            "revision": [
              1
            ]
          },
          "spr_configure": {
            "revision": [
              1
            ]
          }
        },
        "version": "1.0.10",
        "notes": "SPR-01",
        "buildTime": 20211123095808,
        "firmwareApi": "8",
        "ACL": {},
        "objectId": "prjPFxVjwX",
        "__type": "Object",
        "className": "Firmware"
      },
      "createdAt": "2022-07-16T18:35:43.257Z",
      "updatedAt": "2022-07-17T18:41:03.430Z",
      "coordinates": {
        "__type": "GeoPoint",
        "latitude": 59,
        "longitude": 18
      },
      "predefinedLoad": {
        "loadType": "SPRRelayOther",
        "createdAt": "2021-11-08T09:56:38.159Z",
        "updatedAt": "2021-11-22T15:12:16.573Z",
        "descriptionKey": "SPRRelayOtherDescription",
        "titleKey": "SPRRelayOtherTitle",
        "defaultDimCurve": {
          "__type": "Pointer",
          "className": "DimCurve",
          "objectId": "62ET1POll5"
        },
        "predefinedLoadData": "{\n\t\"Order\": 2,\n\t\"Speed\": 2,\n\t\"Min\": 0,\n\t\"Max\": 100,\n\t\"Start\": 0,\n\t\"StartTime\": 0,\n\t\"OutputSpeed\": 0.1,\n\t\"Phase\": \"Invalid\",\n\t\"MinimumRelayOffTime\": 1,\n\t\"BootState\": \"Off\",\n\t\"OutputType\": \"RELAY\",\n\t\"UserDefined\": [],\n\t\"IndicatorLightLevels\": {\n\t\t\"Min\": 2000,\n\t\t\"Normal\": 15000\n\t},\n\t\"Settings\": [\n\t\t\"BootState\",\n\t\t\"SafetyTimer\",\n\t\t\"IndicatorLightLevel\"\n\t]\n}",
        "allowedDimCurves": {
          "__type": "Relation",
          "className": "DimCurve"
        },
        "ACL": {
          "*": {
            "read": true
          }
        },
        "objectId": "Ghx1RFRth9",
        "__type": "Object",
        "className": "PredefinedLoad"
      },
      "diagnostics": "0000000000000000000000000000",
      "ACL": {},
      "objectId": "ripycYLATR",
      "__type": "Object",
      "className": "PlejdDevice"
    }
  

@faanskit
Copy link
Contributor

Can you post verbose logs on what happens during startup? Refer to the readme for details on how to extract those.

Basically, we'll need to update https://github.com/icanos/hassio-plejd/blob/master/plejd/PlejdApi.js with the new device.

As an addition: SPR-01 is already part of the list of devices, but if there is a new hardware version we might need to update to support that.

PlejdApi.js needs a small update. Got my first SPR-01 now and it identifies as hardware id = 8.
Functionally it seems to work as expected, only that it's reported as unknown.

Some more code just below Line 303 needs added:

      case 8:
        return {
          name: 'SPR-01',
          type: 'switch',
          dimmable: false,
          broadcastClicks: false,
        };

In fact, I think just looking at HW-Id is not enough, One would have to look at predefinedLoad/loadType to determine light or switch.

E.g.:
Light:

      "predefinedLoad": {
        "loadType": "CTR01LightRelay",
      "predefinedLoad": {
        "loadType": "SPRRelayLight",

      "predefinedLoad": {
        "loadType": "RELLightRelay",

Switch:

      "predefinedLoad": {
        "loadType": "CTR01OtherRelay",
      "predefinedLoad": {
        "loadType": "RELOtherRelay",
      "predefinedLoad": {
        "loadType": "SPRRelayOther",

@SweVictor
Copy link
Collaborator

SweVictor commented Oct 16, 2022

Alright - went through the hardware register based on new info here #250 (comment)

Updated branch below. Does not seem to break anything for me, I don't have the new fancy devices though.
https://github.com/icanos/hassio-plejd/tree/feature/new-devices-2022-10

GWY-01 and DAL-01 are currently commented out. If anyone has a DAL-01 and has suggestions on how to implement, please open a separate issue and/or create a PR

Please test the new branch and report back!

@andreasropel
Copy link

Hi!

I would like to test the branch with new devices like 'SPR-01'. How do I select the specific branch in add-on store?

@timjackson
Copy link

I have a newer SPR-01 and can confirm the feature/new-devices-2022-10 branch is working great.

@timjackson
Copy link

Also: plejd/README.md needs updating to reflect SPR-01 support

SweVictor added a commit that referenced this issue Aug 15, 2023
@SweVictor
Copy link
Collaborator

@faanskit, @rstattin, @pluppplupp and others. I have prepared a 0.10.0 release. Please, if possible, try that new release before we push it widely. Should resolve this issue finally.

#280

@timjackson
Copy link

The develop branch works for me with SPR-01

@SweVictor
Copy link
Collaborator

Solved in the upcoming 0.10.0

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

6 participants