Shelly plus uni

Anyone that has successfully used the Shelly plus Uni with the pulse counter and got that data in to SK? https://kb.shelly.cloud/__attachments/176816159/Plus-Uni-internal-schematics.png?inst-v=ebf6479b-b8d8-4c4a-93b6-13a430c63b58
46 Replies
Vladdy65
Vladdy652mo ago
No, but also want to do the same - so any advice would be hugely appreciated. Not just pulse count & frequency but also temperature (1-wire x3), ADC, digital inputs and control of digital outputs. Keen to hear what others have tried and what works partially or otherwise. My thoughts presently: 1) there is the signalk-shelly plugin, supports Shelly Uni but not the new Shelly Plus Uni - can request addition on github @Scott Bender as the Shelly Plus Uni is a great piece of ESP32 boating kit with wide power supply range (DC and AC), external antenna, and all the Shelly programmability to act standalone in case other systems are down (e.g. temp alarm). 2) there is the mqtt route, and have the Uni publish/subscribe to mosquito broker - but here I'm confused by the many SK mqtt plugins and short of time to test them all. Also I prefer to run containers (as I have for SK) so adding a plugin without knowing which folders to persist is looking for trouble and risks losing config and data. I have SK installed in a container that I manage with Portainer. Would prefer a standalone mosquito container if that is the required route. FYI, the Shelly Plus Uni works reliably up to about 1.2kHz pulse rate. I'm thinking RPM, but as my signal comes from a toothed flywheel sensor (VP D2-55), signal first needs conditioning (MAX9924) to stabilise it under different rpm conditions, then 1:8 frequency division (126 teeth -> 6.3kHz @3000rpm). Used a lambda on the Shelly to transform pulse frequency -> rpm and had it report this directly (experimentally to a Home Assistant Shelly integration, not SK). Have had it running reliably on bench for last 6 months, with only 1 reboot following a Shelly OTA update. Since heard from Scott, he is exploring alternatives to the current node-shelly library as it is no longer maintained so this route is closed in the short-term.
Scott Bender
Scott Bender2mo ago
node-red and mqtt may be the easiest route. When I get to re-writing the plugin, I’ll probably use mqtt…
Scott Bender
Scott Bender2mo ago
Looks like that may be the way to go. I can help with node-red flows to get integrate with SK. Pop over to #node-red for that.
Vladdy65
Vladdy652mo ago
I did a quick test with signalk-mqtt-gw plugin. Shelly seems to embed json in the mqtt messages. Content can vary, e.g. the "xfreq" name in the mqtt explorer attached I defined as a calculated lambda via the Shelly Uni web interface. I guess the signalk-mqtt-gw expects topic:value pairs so does nothing with the data, pushing null to signalk server which is then published back to mqtt again as currently set up. Why mqtt-explorer is in the mix in signalk is a good question that I'm ignoring. So, short-term, I will follow Scott's suggestion and use some combination of mqtt and node-red to get data into signalk - if I get the time....
No description
No description
Scott Bender
Scott Bender2mo ago
If you use the node red palette linked above, you don’t have to mess with mqtt. I did real quick test, super easy to setup flows with that.
Vladdy65
Vladdy652mo ago
@Scott Bender you a star, appreciated thanks.
Lille Ø
Lille Ø2mo ago
Hmm, maybe one could grab the Shelly communication code from that and adapt it. Node Red is not something I want to run
Scott Bender
Scott Bender2mo ago
You guys got me interested again... I am working on a new plugin right now... Can someone get me the results of curl http://192.168.1.177/rpc/Shelly.GetStatus for a UNI
Lille Ø
Lille Ø2mo ago
I have couple of those still in box waiting for installation. @Scott Bender if nobody else provides the data, ping me and I'll plug one in
Scott Bender
Scott Bender2mo ago
I have released the new plugin https://github.com/sbender9/signalk-shelly2 It should work with the UNI, although currently just the switches and inputs
GitHub
GitHub - sbender9/signalk-shelly2
Contribute to sbender9/signalk-shelly2 development by creating an account on GitHub.
Lille Ø
Lille Ø2mo ago
We still have couple of gen1 devices. I assume we'd control those still with the old plugin?
Scott Bender
Scott Bender2mo ago
Yes
Lille Ø
Lille Ø2mo ago
Is it API compatible? Same PUT paths, etc We have all nav lights automated via Shellies
Scott Bender
Scott Bender2mo ago
yes, and the paths are configurable pretty early for this plugin, so not sure I would rely on it just yet but would be awesome if you can test it out!
Lille Ø
Lille Ø2mo ago
I'll give it a shot, and then we'll see if the anchor light turns on tonight 😄
Scott Bender
Scott Bender2mo ago
you can disable/enable the switches in each plugin to switch between the plugins
Lille Ø
Lille Ø2mo ago
if this rids me of having to reboot all Shellies with each Signal K restart, I'll be very very happy There's quite a lot of those restarts now that I'm actively developing the Meshtastic integration
Scott Bender
Scott Bender2mo ago
It's working for me, I am able to restart the server I think I have the latest firmware on enverything I just released a new version that you'll want and let me know if anything is missing, I wrote this one a way that there is nothing device specific, but I am sure I am missing things. Definitely won't work with RGB/W , but I ordered a new one of those to test with the discovery is the same though, so not sure why it is working now will definitely be interested to know if it is fixed for you too
Vladdy65
Vladdy652mo ago
My Plus Uni is hooked up to a node-red-contrib-shelly flow so not responding to the curl get, but same from that integration pushes out the following: msg.payload : Object object ble: object empty cloud: object connected: false input0: object id: 0 state: true input1: object id: 1 state: true input2: object id: 2 counts: object freq: 0 xfreq: 0 input100: object id: 100 percent: 0 mqtt: object connected: false script1: object id: 1 running: true mem_used: 966 mem_peak: 3038 mem_free: 24220 cpu: 1 switch0: object id: 0 source: "timer" output: false switch1: object id: 1 source: "WS_in" output: false sys: object mac: "D48AFC79ED08" restart_required: false time: "22:19" unixtime: 1755983945 last_sync_ts: 1755982399 uptime: 80453 ram_size: 265576 ram_free: 113080 ram_min_free: 95716 fs_size: 393216 fs_free: 122880 cfg_rev: 119 kvs_rev: 0 schedule_rev: 0 webhook_rev: 2 btrelay_rev: 0 available_updates: object reset_reason: 3 utc_offset: 3600 temperature100: object id: 100 tC: 16.2 tF: 61.2 temperature101: object id: 101 tC: 23.8 tF: 74.8 wifi: object sta_ip: "192.168.1.66" status: "got ip" ssid: "obfuscated" bssid: "0c:8e:29:c5:a5:e3" rssi: -72 ws: object connected: false Not sure what use that is to you.
Scott Bender
Scott Bender2mo ago
garbled can you try the new plugin? turn debug on, you should get well formed json
Vladdy65
Vladdy652mo ago
Installed. Initially data started to flow into Data Browser. Plugin Config showed device model (SNSN-0043X), but had blank Name. Checked Uni. Default, "PlusUni" was there. Did a curl GetDeviceInfo: {"name":null,"id":"shellyplusuni-d48afc79ed08"... explicitly saved the Name and ID page. Now {"name":"PlusUni","id":"shellyplusuni-d48afc79ed08"... Restarted SK, picked up the Name correctly. I updated the Device Path, restarted SK, nothing. Log: ... Aug 23 23:27:10 2025-08-23T22:27:10.437Z signalk-shelly2 Connecting to device at 192.168.1.66 Aug 23 23:27:10 2025-08-23T22:27:10.459Z signalk-shelly2 Connected to device at 192.168.1.66 Aug 23 23:27:10 2025-08-23T22:27:10.497Z signalk-shelly2 Initial device information retrieved successfully from 192.168.1.66: shellyplusuni-d48afc79ed08 (SNSN-0043X, Gen 2) Aug 23 23:27:10 2025-08-23T22:27:10.498Z signalk-shelly2 { "name": "PlusUni", "id": "shellyplusuni-d48afc79ed08", "mac": "D48AFC79ED08", "slot": 1, "model": "SNSN-0043X", "gen": 2, "fw_id": "20250730-063243/1.7.0-gbe7545d", "ver": "1.7.0", "app": "PlusUni", "auth_en": true, "auth_domain": "shellyplusuni-d48afc79ed08" } Aug 23 23:27:10 signalk-shelly2:Failed to connect to device 192.168.1.66: [object Object] Aug 23 23:27:10 Failed to connect to device PlusUni Aug 23 23:27:10 { code: 401, message: '{"auth_type": "digest", "nonce": 1755988030, "nc": 1, "realm": "shellyplusuni-d48afc79ed08", "algorithm": "SHA-256"}' } ... Going to try uninstall and reinstall.
Scott Bender
Scott Bender2mo ago
I think password/security turned on I have not worked on that yet
Vladdy65
Vladdy652mo ago
Odd that some data did trickle through right on first config. Can I check some details with you. Do I presume correctly that your integration does polling and does not install a callback function script on the Gen 2 devices, the way the node-red-contrib-shelly add-on does? What is the polling interval? Additionally, can I assume that all data from a device will always go to the same path (electrical.switches.${devicePath}...) Ultimately, I want to push some of the Uni data onto NMEA network, hence want to plug the values into the correct paths in SK to start with (e.g. vessels.self.propulsion.0.temperature,vessels.self.electrical.alternators.0.temperature etc, for different sensors and inputs.
Scott Bender
Scott Bender2mo ago
I have not reased the polling yet no plans to install a callback
Vladdy65
Vladdy652mo ago
Thanks. Gives me some direction as to possible routes to follow to achieve desired outcome.
Scott Bender
Scott Bender2mo ago
all you are talking about, easy
Vladdy65
Vladdy652mo ago
Regrettably I do no have the experience you clearly have with all this.
Scott Bender
Scott Bender2mo ago
let's get the data into sk first
Vladdy65
Vladdy652mo ago
Will try assist, but am travelling to the boat to do some maintenance over the next few weeks so won't be in front of computer much.
Scott Bender
Scott Bender2mo ago
v1.1.0 is released and should show the pulse counter data from the UNI
Lille Ø
Lille Ø2mo ago
It discovered the Shellies right away, but a few of them don't get a name. This prevents me from saving the config.
No description
Scott Bender
Scott Bender2mo ago
ok, I can fix that later you can go to the device's page and set the name for now?
Lille Ø
Lille Ø2mo ago
They have names in the app. Maybe firmware version question, or lack of Sync device name?
Scott Bender
Scott Bender2mo ago
you have to do it on the devices web page
Scott Bender
Scott Bender2mo ago
No description
Lille Ø
Lille Ø2mo ago
That seems to have done the trick. Interestingly, couple of the devices already names set even though I've never used the web interface Could also confirm the API stayed the same, was able to turn our decklight on and off via a Meshtastic text message nice work @Scott Bender !
Scott Bender
Scott Bender2mo ago
@Lille Ø do you have an UNI
Lille Ø
Lille Ø2mo ago
I have one that's still in the box
Scott Bender
Scott Bender2mo ago
how 'bout a dimmable light?
Lille Ø
Lille Ø2mo ago
Nope, only thing dimmable are the two (gen1) RGBW shellies we have
Scott Bender
Scott Bender2mo ago
You don’t have to reboot your devices now when the server is restarted?
Lille Ø
Lille Ø2mo ago
Correct, they seem to get detected immediately. And at least last night our anchor light went on automatically
Scott Bender
Scott Bender2mo ago
@Lille Ø can you let me know which Shelly models you have tested with so I cam add them to the README?
Lille Ø
Lille Ø2mo ago
Only with Shelly Plus 1. That's the only gen2 device we have as long as I don't find the time to install the Uni
Scott Bender
Scott Bender2mo ago
ok. that's a Gen 2?

Did you find this page helpful?