peterkappelt / JTradfri

General purpose Client for the IKEA Tradfri System
Apache License 2.0
17 stars 2 forks source link

New Ikea wall sockets #3

Open credulous67 opened 5 years ago

credulous67 commented 5 years ago

I have just migrated from tradfri-FHEM to using Jtradfri, and most all my bulbs are working as expected. I have just bought 2 of the new Ikea sockets to play with, I have set them up and they work fine from the IKEA app, however the readings in FHEM are not being updated for the sockets. I get the same result via nodered, that is I can turn sockets off and on, but readings are not updated in FHEM.

Here is the FHEM config I have for one of my sockets, I realise the autoUpdateInterval is no longer a valid attribute, I just haven't got round to removing yet. My config for sockets is copied directly from my working config for my bulbs.

define IKEAskt01 TradfriDevice 65557 attr IKEAskt01 alias Christmas_tree attr IKEAskt01 autoUpdateInterval 1 attr IKEAskt01 group Lamps attr IKEAskt01 room Lights,Livingroom define MQTT_IKEAskt01 MQTT_BRIDGE IKEAskt01 attr MQTT_IKEAskt01 IODev IOT_MQTT attr MQTT_IKEAskt01 publishReading_softwareVersion house/sockets/Livingroom/christmasTree/softwareVersion attr MQTT_IKEAskt01 publishState house/sockets/Livingroom/christmasTree attr MQTT_IKEAskt01 qos 2 attr MQTT_IKEAskt01 retain 1 attr MQTT_IKEAskt01 stateFormat transmission-state attr MQTT_IKEAskt01 subscribeSet qos:2 retain:0 house/sockets/Livingroom/christmasTree/state

credulous67 commented 5 years ago

The socket devices do not appear Tradfri Gateway devices list for some reason image

credulous67 commented 5 years ago

Looking at the code, it is clear you are only making use of lighting devices (3311), I can see it should be relatively straight forward to add 3312 which is device class for socket outlets. I am attempting to make these changes and recompile, however I have never compiled a java program in my life .. so it is a learning curve .. do you have any tips on how to set up eclipse IDE to do this?

mbong commented 5 years ago

Here, the socket appears in the device list after "get TradfriGW deviceList", but yes, the readings in FHEM are not being updated for the sockets. Switching the socket manually (by remote control), in FHEM nothing happens.