Managed with the support of the Swedish Home automation forum on Facebook to create a IKEA Sparsnas to MQTT parser. Please feel free to contribute. .)
Also checkout this ESP8266 (/Wemos/NodeMCU) based RF to WiFi MQTT Gateway project for Ikea Sparnas electricity meter with wireless display:
The code is based on Sommarlovs version of Ludvig Strigeus deocder code for Ikea Sparnas:
At least in Sweden these are often on sale every so often with a large rebate via IKEA FAMILY and as such they can also be found relativly cheap from rebate scalpers on eBay (and its Tradera action-site in Sweden) following closely aften a sale.
“SPARSNÄS energy display assists you to monitor the total usage of electricity in your home. The energy display consists of a transmitter and a display. The transmitter, which you attach to your electricity meter, continuously registers the usage of electricity and transfers the data wireless to the display. Place the display where it becomes a natural part of daily life in your home”
Again, there is an open source RTL-SDR decoder and parser for it:
“SPARSNÄS uses a CC1101 chip configured for GFSK modulation at 868MHz. The two FSK symbol frequencies once downconverted to baseband are roughly 67kHz and 105kHz. (EDIT: It seems like with a different RTL-SDR the baseband frequencies are 12.5khz and 50khz. Maybe my first RTL-SDR was inaccurate). The packet length is 18 bytes, including the length byte, and a 16-bit CRC is appended to the end. The CC1101 sync word is 0xD201. The packet payload byte 5 to 17 are encrypted using a key derived from the sender device’s ID. The encryption key is a repeating XOR key”
“The packet data is encrypted using your sender’s ID. The sender ID is the last 6 digits of the serial number located under the battery.”
“A BIG thanks to the https://www.facebook.com/groups/SHgruppen on Facebook”
The community continues to deliver!
Here is a docker version for Sparsnäs Decode -> MQTT package!
https://github.com/fredrike/sparsnas_decoder/tree/dockerVersion
Hi,
I’ve tried using this guide: https://github.com/bphermansson/EspSparsnasGateway
But I can’t get it to work. From the log I get this:
Debug on
Vcc=3014
Stored data: 1
There are stored settings
Stored frequency: 867999900
Stored sender id: d2a94a
Over The Air programming enabled, port: EspSparsnasGateway
Attempting MQTT connection...Connected to Mqtt broker as EspSparsnasGateway
Ready
IP address: 192.168.1.81
EspSparsnasGateway @ IP:192.168.1.81 SSID: XXXXXX
Stored freq: 867999900
RFM69 init done
Radio initialized.
Listening on 1023999936hz. Done in setup.
I don’t understand why it says “Listening on 1023999936hz” when I have defined the frequency to 867999900 hz. I’ve tried sending the MQTT command to switch frequency, but still no luck. Anyone that can help out?
/F
No idea, please check with Patrik, ask the same question on his github.
I´m struggling to get this to work.
I´m running the docker version on rPi and I´ve tried different antennas (16cm and 8.6cm) and still I´m not able to find the frequencies for the sparsnäs.
I noticed my device can only handle up to 19.7 gain. Can this be the issue?
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001Using device 0: Lifeview LV5TDeluxe
Found Fitipower FC0013 tuner
I can’t seem to figure out how I’m getting updates from the sensor. I’ve got one message from the broker, and that’s it.
@tubalainen
Hi, its seems that the mqtt part have broken in a recent update. I have written an issue on github. Are you still maintaining the “tubalainen/sparsnas_decoder”?
Yes.The component is working just fine and there hasnt been any reasons for updates.
I have seen you issue on github, sorry for not responding.
Have you solved your issue?
Nope, I have reinstalled both the OS on the PI with the dongle and home assistant, but no luck.
I have instead used the home assistant addon and connected the dongle directly to the NUC running home assistant.
The IKEA Sparsnäs RTL-SDR resposity has been retired on github and will not be developed any further.
Please use alternative forks and methods to grab the Sparsnäs signal.