Integration for SpaNET (SpaLINK) request

I am writing to kindly request the creation of an integration for SpaNET (SpaLINK). SpaNET is a popular spa control system and many people would benefit from being able to integrate it with their Home Assistant setup.

I have come across a useful resource that could help with the development of this integration, which is the work done by BlaT2512 on Github at the following link: https://github.com/BlaT2512/spanet-api/blob/322214be7329b2a8517577d19744830dcd214210/spanet.md. This project provides an API for SpaNET, which could be a great starting point for creating an integration with Home Assistant.

I understand that creating integrations can be time-consuming and require a lot of effort, but I believe that having this integration would greatly benefit the Home Assistant community. I would be more than happy to help with testing and providing feedback during the development process.

Thank you for your time and consideration.

Second this! I would love to control Spa heating based on solar production which I already have integrated into HA.

2 Likes

Is that what this does? Has anyone tried it? GitHub - wayne-love/sn2ha: SpaNet to Home Assistant python bridge

Also I’m wondering if this may be a better way to go. Replace the really expensive Wifi controller and app, and control locally: GitHub - shanekuz/SPANETMCU: SPANET Controller for NodeMCU

I would also love to control my SpaLink Spa with home assistant to run it when the sun is shinning!

1 Like

Hai, I have been playing around with this a bit and given the smartlink can connect to Alexa I installed alexa media player and created a script to adjust the spa temperature for a test and it worked! I am 6 months in working with home assistant and have no background in this stuff (builder here) but pretty sure there would be a way to get temperature updates, turn on pumps, lights etc with the same method. A work around while an integration gets implemented I guess.

Here is the script I used;

alias: Test ALEXA
sequence:

  • service: media_player.play_media
    data:
    media_content_id: alexa open MySpaPool and then set the temperature to 37’C
    media_content_type: custom
    target:
    entity_id: media_player.julian_s_echo_dot
    mode: single

Sh&t knows how to format it correctly sorry!

I’ve been playing around with this but can’t seem to get it to work. I’m a total newb so it’s probably something straightforward. Followed the directions in the readme, but get an error in the studio code server terminal inside home assistant. ChatGPT thinks I’ve misspelled something, but I’ve triple-checked.

➜  /config /bin/python /config/custom_components/sn2ha-main/sn2ha.py
Traceback (most recent call last):
  File "/config/custom_components/sn2ha-main/sn2ha.py", line 43, in <module>
    spaName = config.get("sn2ha","spaName")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/configparser.py", line 797, in get
    d = self._unify_values(section, vars)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/configparser.py", line 1168, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'sn2ha'

Has someone found any functioning solution?
Maybe a solution via Homebridge?

I use media player on HA to automate temperature changes when I am getting excess solar. That’s my only current work around while waiting for any update on this.

I also follow this Discord as the guys trying to implement it are pretty active on it

Can we please have this built

The python bridge is no longer being worked on, I abandoned this after realising how bad the Wifly based Spanet controller was. Instead I build my own ESP32 replacement controller (https://github.com/wayne-love/sn_esp32).

The code for the replacement controller is ugly but it works. I’m working on refactoring it but priority is low as it just works at the moment.

I’ve taken your fantastic code (it saved me a bunch of time) and turned it into an ESPHome climate external component. Using the simple-thermostat card, this is what I end up with:

image

Right hacked up your code, and then made a wrapper class for the ESPHome. C++ is not my first language, but it seems to work thus far. Will upload to github in the next few days for people to comment on how bad my code is :slight_smile:

It’s worth noting for other readers - this is for an ESP connected to the spa - not for a factory SPA-Link device.

FYI, Spanet have added MQTT support for Home Assistant, incase you want to go that route.

Cheers

$400 for the official wifi module… I think doing something with an ESP32 and ESPHome would be ideal!
@bnutt did you put together an ESPHome version?

I did - my code is here. Put that in esphome > my_components > spanet. Provided with no warranty, your mileage may vary :slight_smile: Works a treat for me though, enabled me to dynamically set my spa operating mode to make the most of free power times of the day (and solar).

esphome code:

external_components:
  - source: my_components
    components: [ spanet ]

climate:
 - platform: spanet
   name: "spanet_spa"
   hardware_uart: UART2
   baud_rate: 38400
   update_interval: 30s

ha dashboard code, using simple-thermostat HACS adding, to make the climate entity behave how I wanted it to (shown in my previous post):

type: custom:simple-thermostat
entity: climate.spanet_spa
step_size: '0.5'
layout:
  step: row
  mode:
    names: true
    headings: false
hide:
  temperature: true
  state: true
control:
  hvac:
    'off': false
    heat: false
    cool: false
    dry: false
    fan_only: false
    heat_cool: false
  fan:
    'off':
      name: 'off'
      icon: mdi:fan-off
    low:
      name: low
      icon: mdi:fan-speed-1
    high:
      name: high
      icon: mdi:fan-speed-2
    auto:
      name: auto
      icon: mdi:fan-auto
decimals: '1'
sensors:
  - entity: sensor.spa_estimated_temperature
    icon: mdi:thermometer-auto
  - entity: climate.spanet_spa
    icon: mdi:heat-wave
    attribute: hvac_action
header: false
`

Just as a FYI, the SpaNET support guys in Australia seem pretty good. They sold me a V3 (ESP32-based with MQTT support) for half price (AU$200 vs AU$400) and I sold my V2 on Facebook Marketplace for AU$150 so it only cost me AU$50 to upgrade.

I was a bit concerned that the V2 has a pretty solid antenna but the V3 uses the antenna printed on the circuit board, but it seems to be working with MQTT pretty well so far.

Thanks @bnutt could you also share the details about what hardware you used?

I followed this guy’s hardware guide for the hardware but used an ESP32 and mine wouldn’t work with the resistors in-line like he had them - but works fine without any resistors. Basically just an ESP, voltage reg (couple of bucks from ali) and an RJ45 cable.