Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the esp to act as active repeater to connect additional P1 device #65

Open
pumpagubben opened this issue Feb 9, 2023 · 2 comments

Comments

@pumpagubben
Copy link

A small addition to the code will make the p1reader to repeat the signal to the TX pin. This enables additional devices to connect and use the p1 port and no need to buy a separate active r12 splitter.

The following is successfully implemented with a Tibber Pulse and a NodeMCU as p1reader/repeater:

  1. Set TX pin to inverted p1reader.yaml:
# Set TX pin to inverted to repeat signal correctly
uart:
  id: uart_bus
  tx_pin:
    number: GPIO1
    inverted: yes
  rx_pin: RX
  baud_rate: 115200
  1. In the p1reader.h add a line to write the received signal back to the uart_bus, add Serial.write(buffer); after the newline is put back:
            // put newline back as it is required for CRC calculation
            buffer[len] = '\n';
            buffer[len + 1] = '\0';
			
            // Write back the message to TX pin as a repeater: 
            Serial.write(buffer);

            // if we've reached the CRC checksum, calculate last CRC and compare
            if (buffer[0] == '!') {
  1. Wiring for next device:
    Connect a new r12 port or cable and connect +5V, GND, Data_GND accordingly and Data_OUT is connected to ESP TX pin.
    Leave the Data_Request unconnected (at least Tibber Pulse will not process if this is pulled high).
@psvanstrom
Copy link
Owner

This is great, would you mind making a PR of these changes? 👍

@robinostlund
Copy link

robinostlund commented Apr 5, 2023

@pumpagubben are you able to make a pr for this? This is exactly what i am searching for as i also have a tibber pulse 😊 and does tibber work without external power? 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants