Credits to MSkjel for his original work on LocalPulse2Tibber! (https://github.com/MSkjel/LocalPulse2Tibber)
Edited his Readme.md file to match integration in domoticz.
A writeup of how to make a Tibber Pulse work locally while still sending data to Tibber. This setup is based and tested on Dutch version of the Pulse, which is directly connected to the electricity meter using the P1 connector. It might also work with other versions supplied by Tibber, but this is untested from my part.
- Debian installation with Domoticz (eg raspberry pi)
- Mosquitto MQTT broker (https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/)
- A Tibber Pulse (get it via Tibber store)
- Basic knowledge of linux
- Extract SSL/TLS Certificates using App
- Setup MQTT Broker As Bridge [Setup Mosquitto MQTT Broker as bridge](#Setup Mosquitto MQTT Broker as bridge)
- Connect Pulse to your local broker to display data in Domoticz and bridge data to TibberPulse Setup
- Reset your Pulse by holding down the reset button for around 5 seconds
- Disconnect the Pulse Power-Up from the Tibber app by going into Power-Ups > Pulse > Disconnect (If you have previously had it connected)
- Open the Tibber app and start setting up the Pulse. When you get to input your WiFi password, make sure to intensionally input the wrong password!
- Your app should now show a WiFi error.
- Force-Quit the Tibber app.
- Connect to the Pulse's network, the password is shown on the back of the pulse. It looks like this
QWGH-ED12
. The - has to be included - Navigate to 10.133.70.1
- The website should now include everything the Tibber app sent to the Pulse, including the wrong password.
- Copy everything inside the ca_cert field.
- Paste it into a new file called CA.ca
- Copy everything inside the certificate field.
- Paste it into a new file called Cert.crt
- Copy everything inside the private_key field.
- Paste it into a new file called Priv.key
- Copy and paste mqtt_url, mqtt_topic and mqtt_topic_sub into a file called mqtt_info or something like that
- Change the psk to the correct password for your WiFi network.
- Press send and then apply afterwards.
- After a while, the Pulse should show an empty page with just some numbers and characters at the top. Like 8f5g6e6h5f. If it shows MQTTErr or WiFiErr you have to redo everything.
- Check that the Pulse now shows on the main screen of the Tibber app(It wont have any data, just make sure the bubble is there. You might have to force-quit the app and restart it for it to show up).
Create directory pulse_certs in /etc/mosquitto and make a new file called bridge.conf in /etc/mosquitto/conf.d:
sudo mkdir /etc/mosquitto/pulse_certs
sudo touch /etc/mosquitto/conf.d/bridge.conf
Copy CA.ca, Cert.crt and Priv.key in /etc/mosquitto/pulse_certs/
Paste this into the bridge.conf file (sudo nano bridge.conf).
Make sure your mqtt_url is the same as mine, if not change connection blabla:8883
to whatever you have in the code below
connection bridge-to-tibber
bridge_cafile /etc/mosquitto/pulse_certs/CA.ca
bridge_certfile /etc/mosquitto/pulse_certs/Cert.crt
bridge_keyfile /etc/mosquitto/pulse_certs/Priv.key
address a1zhmn1192zl1a.iot.eu-west-1.amazonaws.com:8883
clientid tibber-pulse-[Remove this and fill in your Pulse-ID]
try_private false
notifications false
topic $aws/# out
topic tibber-pulse-[Remove this and fill in your Pulse-ID]/receive in
restart mosquitto service and check log for errors:
sudo systemctl restart mosquitto.service
sudo cat /var/log/mosquitto/mosquitto.log
Log should look like this:
1712258457: mosquitto version 2.0.11 starting
1712258457: Config loaded from /etc/mosquitto/mosquitto.conf.
1712258457: Opening ipv4 listen socket on port 1883.
1712258457: Opening ipv6 listen socket on port 1883.
1712258457: Connecting bridge (step 1) bridge-to-tibber (a1zhmn1192zl1a.iot.eu-west-1.amazonaws.com:8883)
1712258457: mosquitto version 2.0.11 running
1712258457: Connecting bridge (step 2) bridge-to-tibber (a1zhmn1192zl1a.iot.eu-west-1.amazonaws.com:8883)
- Reset the Pulse again, but DO NOT disconnect it in the Tibber app.
- Connect to the Pulse's network, the password is shown on the back of the pulse. It looks like this
QWGH-ED12
. The - has to be included - Navigate to 10.133.70.1
- Im assuming you already know how to connect the pulse to your local broker, but here are some pictures Without MQTT username and password With MQTT username and password
- The
mqtt_topic
on the Pulse has to be what is shown in mqtt_info file we created earlier - Press send, and apply.
- Check that the pulse is connected to the MQTT Broker
- Set the MQTT Topic your local Pulse decoder like https://github.com/toreamun/amshan-homeassistant or https://github.com/iotux/ElWiz to the MQTT Topic you specified over and in the dump from the app/serial.