Page 1 of 2

Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 10:42 am
by autolog
I have also acquired a Salus Smart Plug SP600 which works well with Zigbee2mqtt + MQTT/SHIMS plugins.

The plug publishes a message every second of the format:
Code: Select all
zigbee2mqtt:info  2020-02-22 16:31:55: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":63,"power":0,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:31:56: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":55,"power":0.2,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:31:57: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":55,"power":0,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:31:58: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":70,"power":0,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:31:59: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":94,"power":0,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:00: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":94,"power":0,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:01: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":97,"power":0.7,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:02: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":97,"power":13.2,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:03: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":78,"power":17.2,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:04: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":76,"power":16.8,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:05: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":84,"power":17,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:06: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":86,"power":16.4,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:07: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":78,"power":16.6,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:08: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":81,"power":16.7,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:09: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":84,"power":16.5,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:10: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":78,"power":16.6,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:11: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":78,"power":16.5,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:12: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":78,"power":17.2,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:13: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":81,"power":17,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:14: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":70,"power":16.8,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:15: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":76,"power":17,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:17: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":65,"power":17.1,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:18: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":99,"power":16.9,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:19: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":99,"power":17.2,"state":"ON"}'
zigbee2mqtt:info  2020-02-22 16:32:20: MQTT publish: topic 'zigbee2mqtt/Salus_plug_1', payload '{"energy":0,"linkquality":99,"power":17.3,"state":"ON"}'
When nothing is attached to the plug, it shows power values of 0 through 0.3 that I have spotted so far.

If at all possible, it would be useful to see the Power and Usage displayed in the Indigo device. Maybe add another option like the one done for battery?

To avoid the sqlLogger getting swamped, I have had to suppress logging of the linkquality, energy and power states.

Again another nice-to-have feature would be for the Shim device to only update the states on a meaningful change. Possibly this could be done via a user specified script? So for this Salus plug, any power reading < 0.5 would be assumed to be zero. If the state hasn't changed then the device wouldn't be updated.

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 11:56 am
by FlyingDiver
autolog wrote:
If at all possible, it would be useful to see the Power and Usage displayed in the Indigo device. Maybe add another option like the one done for battery?


Well, battery level is an attribute available in the Indigo UI for any device. If you wanted to see the energy usage in the UI, it would have to be an Energy Meter device. Which there is an example for in the SDK so that's not real hard. Please create an Issue requesting that device type on GitHub. Please give details of the two payload fields - "energy" and "power". What are the units, can they be reset, etc. A pointer to the device specs would probably cover it.

autolog wrote:
Again another nice-to-have feature would be for the Shim device to only update the states on a meaningful change. Possibly this could be done via a user specified script? So for this Salus plug, any power reading < 0.5 would be assumed to be zero. If the state hasn't changed then the device wouldn't be updated.


You can use the adjustment feature of the ValueShim device to change the displayed state value, but that won't change the raw state. So if you're using the multi-states dict feature, that won't work. But if you're not, it should.

That said, I'm really not big on adding features that loose data. I'm honestly not sure what benefit that feature would have. What do you gain by throwing out the data?

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 11:59 am
by FlyingDiver
Oops. My bad. I thought the Energy readings were for a specific device type. They're not, they're attributes for any device. I'll see what I can do there.

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 12:10 pm
by autolog
FlyingDiver wrote:
... That said, I'm really not big on adding features that loose data. I'm honestly not sure what benefit that feature would have. What do you gain by throwing out the data?


Well I don't need the State to change if it is less than say 0.4 as that is just noise and not something plugged in and using power; so equivalent to zero. It means I wouldn't have to suppress the logging for that state which would be useful.

Also it would be nice if the there was an option for the Shims plugin to write a log entry to say e.g. 'Sent "Salus_Plug_1" on' when the Indigo device on button is pressed and likewise for OFF. Rather like Indigo does for Z-Wave devices. :)

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 12:13 pm
by FlyingDiver
autolog wrote:
Well I don't need the State to change if it is less than say 0.4 as that is just noise and not something plugged in and using power; so equivalent to zero. It means I wouldn't have to suppress the logging for that state which would be useful.


OK, I'll take that one under advisement.

autolog wrote:
Also it would be nice if the there was an option for the Shims plugin to write a log entry to say e.g. 'Sent "Salus_Plug_1" on' when the Indigo device on button is pressed and likewise for OFF. Rather like Indigo does for Z-Wave devices. :)


Without turning on debug logging, you mean? You know where the enhancement requests are created....

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 12:27 pm
by autolog
FlyingDiver wrote:
... You know where the enhancement requests are created....

Done :)

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 1:42 pm
by FlyingDiver
Pre-release: https://github.com/FlyingDiver/Indigo-S ... /tag/0.2.3

Added generic device (no state value).

Added capability to show energy usage in Indigo UI.
Energy UI (and now battery UI) are available for JSON payloads only.

Added info level logging of sent actions.

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 5:05 pm
by autolog
That was fast unlike my reply (an evening dinner with friends got in the way)! :D

Just tried it out and it all looks good as far as the SP600 goes. :)

Is the generic device (no state value) what I should use for the Rocker Switch?

Re: Salus Smart Plug SP600

PostPosted: Sat Feb 22, 2020 5:43 pm
by FlyingDiver
autolog wrote:
Is the generic device (no state value) what I should use for the Rocker Switch?


I would think so. There's nothing you really want to show in the Indigo UI for that device.

Re: Salus Smart Plug SP600

PostPosted: Mon Mar 02, 2020 2:43 pm
by CliveS
autolog wrote:
That was fast unlike my reply (an evening dinner with friends got in the way)! :D

Just tried it out and it all looks good as far as the SP600 goes. :)

Is the generic device (no state value) what I should use for the Rocker Switch?

Jon, just received on of these and got it to give custom states but can't turn on/off.
Can you publish your triggers and devices setup please

Re: Salus Smart Plug SP600

PostPosted: Mon Mar 02, 2020 5:07 pm
by autolog
Hi Clive,

MQTT Broker:
Subscribed to: 0:zigbee2mqtt/Salus_plug_1


For the MQTT Switch Device i.e. SP600:

Device Info:
MQTT Broker: <Your Broker Name>

Message Type: ##salus_plug_1##

Topic Field: 1

Unique ID value: salus_plug_1

.
.
.

Action Topic Template = zigbee2mqtt/{{uniqueID}}/set

On Action Payload = {"state": "ON"}

Off Action Payload = {"state": "OFF"}

Device Supports Status Request: True

Status request Topic Template: zigbee2mqtt/{{uniqueID}}/get

Status Request Payload Template: { "state": ""}

.
.
.

Trigger Info:
Type = MQTT Connector Event
Event: Topic Component Match
Edit Device Settings... :
Select Broker: <Your Broker Name>
Match Type: Match
Match: zigbee2mqtt
Match: Salus_plug_1

Queue Messages: true

Message Type: ##salus_plug_1##


Hopefully that is enough info. :)

Re: Salus Smart Plug SP600

PostPosted: Mon Mar 02, 2020 5:53 pm
by CliveS
Thank you Jon, now working 100%, very chatty little plug!

Re: Salus Smart Plug SP600

PostPosted: Tue Mar 03, 2020 9:27 am
by CliveS
Jon, I expect this is due to zigbee2mqtt device handler not able to reset the plug

Code: Select all
3 Mar 2020 at 14:54:33
   MQTT Shims Error                SP600: actionControlUniversal: Unsupported action requested: EnergyReset

Are you seeing this or is it the way I have it setup?
Also I see their is an upgrade but not sure it can be upgraded without the Salus Hub?

Re: Salus Smart Plug SP600

PostPosted: Tue Mar 03, 2020 9:41 am
by autolog
CliveS wrote:
Jon, I expect this is due to zigbee2mqtt device handler not able to reset the plug

Code: Select all
3 Mar 2020 at 14:54:33
   MQTT Shims Error                SP600: actionControlUniversal: Unsupported action requested: EnergyReset

Are you seeing this or is it the way I have it setup?
Also I see their is an upgrade but not sure it can be upgraded without the Salus Hub?


I think it is because that function isn't available in the MQTT Shim plugin. It effectively tells Indigo to zero the Total Usage. It isn't a zigbee2mqtt problem AFAICS. I expect it will be added in due course once it is reported to Joe.

Where did you see the info about the upgrade?

Re: Salus Smart Plug SP600

PostPosted: Tue Mar 03, 2020 9:49 am
by CliveS
Custom States - update_available=true, but how to update without a Salus Hub I have no idea, the Philips Hue Hub v2 does not see it.

Screenshot 2020-03-03 at 15.44.15.png
Screenshot 2020-03-03 at 15.44.15.png (36.56 KiB) Viewed 2704 times