xoseperez

xoseperez

Member Since 10 years ago

Sant Pol de Mar, Barcelona

Experience Points
373
follower
Lessons Completed
6
follow
Lessons Completed
90
stars
Best Reply Awards
73
repos

118 contributions in the last year

Pinned
⚡ Home automation firmware for ESP8266-based devices
⚡ Itead Studio SonoffSC custom firmware with MQTT and Domoticz support
⚡ ESP8266-based smart wall switch
⚡ MY9291 and MY9231 LED driver library for Arduino AVR and ESP8266
Activity
Nov
17
2 weeks ago
Activity icon
issue

xoseperez issue comment ElectronicCats/CayenneLPP

xoseperez
xoseperez

Polyline support

Hi, i created a fork of this project to support polylines (a set of GPS coordinates). This is loosely inspired by googles polylines: https://developers.google.com/maps/documentation/utilities/polylinealgorithm

Unfortunately, there is no definition from IPSO for polylines, so I just went ahead and defined/wrote it myself.

So, my question is: are you willing to support data types that are NOT defined by IPSO and if yes, which number shall i assign this to (maybe start at 240? (as it is TBC from IPSO), or 151? (GSM types), or 187? (OpenAIS types)).

Short summery about my implementation (will create a PR for review): my impl can encode a set of GPS coordinates (e.g. a Route) very efficiently through delta compression. So, i encode a single GPS coordinate with 6 bytes (3 byte for lat/long each) and then pack the deltas for next coordinate in a single byte (4 bit for lat/long each). Another aspoect is, that my payload will have a dynamic size, so the first byte after channel and type is indicating the length of the polyline.

Please, tell me what you think :)

xoseperez
xoseperez

I think it's OK to add new types. The library already has non-IPSO data. But I also think that at some point it will be good to have a way to add custom fields (don't know how) to include any non-standard fields to the buffer. Otherwise we will soon run out of codes for specific types.

Nov
14
3 weeks ago
push

xoseperez push AllWize/allwize-training

xoseperez
xoseperez

Change network IP to fit latest changes in VB 6.1.28

xoseperez
xoseperez

Added missing constant to configuration.sample.h

commit sha: ef1c2fca87df3bfcb9dd80e98ac8ef31a66b4162

push time in 3 weeks ago
Nov
12
3 weeks ago
Activity icon
issue

xoseperez issue xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Breaking changes

First of all i really like this node and i use it now more than a year for my washing machine etc. Only problem i have now is that v 1.0.0 simply breaks all my flows because it works completely different than v.0.1.2.

The problem is that there was not even a warning in the readme etc. and the node red palette does not have a simple way to revert back to 0.1.2. I think it would have been more conveniant to make an v2 of the Power Monitor Node or to have the old style node included as a legacy solution.

Nevertheless, i think you should change the Readme so the user are warned that this update might break something.

push

xoseperez push xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Update README with backwards compatibility information

commit sha: 66afe65226cddbadd818fd6aca530fbfec6b7e9f

push time in 3 weeks ago
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Breaking changes

First of all i really like this node and i use it now more than a year for my washing machine etc. Only problem i have now is that v 1.0.0 simply breaks all my flows because it works completely different than v.0.1.2.

The problem is that there was not even a warning in the readme etc. and the node red palette does not have a simple way to revert back to 0.1.2. I think it would have been more conveniant to make an v2 of the Power Monitor Node or to have the old style node included as a legacy solution.

Nevertheless, i think you should change the Readme so the user are warned that this update might break something.

xoseperez
xoseperez

I'm sorry for the incovenience. The update follows the semantic versioning approach where changes to the major (first number) indicates possible backwards compatibility issues. But you are right a notice to the README should be added to notify of the changes and possible fixes to existing flows. Adding this as an improvement. Thank you!

Oct
24
1 month ago
started
started time in 1 month ago
Oct
18
1 month ago
push

xoseperez push AllWize/allwize-training

xoseperez
xoseperez
xoseperez
xoseperez

Add battery reading to message

xoseperez
xoseperez

Merge branch 'master' of github.com:AllWize/allwize-training

commit sha: da1b7c41fc41c0cd8eb8647552f78ecf25244193

push time in 1 month ago
Oct
14
1 month ago
started
started time in 1 month ago
Oct
4
2 months ago
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Stop after X time

First of all great power monitor. I just starting to migrate my fibaro LUA scene's to HA with node red.

It's always hard to monitor these powers.

For my case the start works fine but the stopping is hard. My washing machine bumps to 0w with not on all programms the same amount so one time the monitors stops send the payload good and other times it won't stop and no payload is sending.

My suggestion for the stopping is a time setting added. So when you put in 5 min. it's waiting that 0W is there for 5 min. before putting the power monitor to stop

Running my Fibaro scene for 7 years with this waiting stop timer and never had problems.

xoseperez
xoseperez

I see you are feeding the power monitor node with the output of a server-state-changed node, which will probably only let a message change if the power value changes, right? If that's the case I understand why you need the timer.

TBH the node was first conceived to be fed with regular (even if repetitive) values (like 0W, 0W, 0W,... every minute).

Will add this as an enhancement. In the meantime I'd suggest you to try a different approach, like feeding the data directly from the power device if possible, or timing the messages every minute.

Thank you.

Oct
3
2 months ago
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Stop after X time

First of all great power monitor. I just starting to migrate my fibaro LUA scene's to HA with node red.

It's always hard to monitor these powers.

For my case the start works fine but the stopping is hard. My washing machine bumps to 0w with not on all programms the same amount so one time the monitors stops send the payload good and other times it won't stop and no payload is sending.

My suggestion for the stopping is a time setting added. So when you put in 5 min. it's waiting that 0W is there for 5 min. before putting the power monitor to stop

Running my Fibaro scene for 7 years with this waiting stop timer and never had problems.

xoseperez
xoseperez

I understand you are not feeding the node with power readings from the washing machine at regular intervals, then. Am I right? That's why you need a timer instead?

Oct
1
2 months ago
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Stop after X time

First of all great power monitor. I just starting to migrate my fibaro LUA scene's to HA with node red.

It's always hard to monitor these powers.

For my case the start works fine but the stopping is hard. My washing machine bumps to 0w with not on all programms the same amount so one time the monitors stops send the payload good and other times it won't stop and no payload is sending.

My suggestion for the stopping is a time setting added. So when you put in 5 min. it's waiting that 0W is there for 5 min. before putting the power monitor to stop

Running my Fibaro scene for 7 years with this waiting stop timer and never had problems.

xoseperez
xoseperez

Hi If you set the stop threshold to 0W and the "stop after" value to 5, assuming you are feeding the node values every minute, it will trigger the stop event after 5 minutes of 0W readings. If there is any non-0W reading during those 5 minutes the stop counter will be reset. You are explicitly asking the node to trigger the event only after 0W readings in a row.

Sep
24
2 months ago
Activity icon
fork

xoseperez forked geerlingguy/raspberry-pi-pcie-devices

⚡ Raspberry Pi PCI Express device compatibility database
xoseperez GNU General Public License v3.0 Updated
fork time in 2 months ago
Sep
21
2 months ago
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Nice idea - request

I like this idea a lot, thanks for developing it!

It would make it more flexible if you could input something like:

{"name":"Livingroom lights", "watt":350}

use the key as name and start/stop based on the name/value So you can use one input/output node for multiple devices.

Also, devices that never turn off will never get a stop event. Would be nice if there was way to output the energy every x second/minutes. - This could be solved by sending node.status to an additional output ? I can imagine this node being used for graphs/dashboards, realtime overview would be awesome.

xoseperez
xoseperez

Tracking multiple appliances with a single node might be tidier, still it will require solving some UX issues, like how do you update the node status?

Sep
20
2 months ago
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

`PreStart` should move to `PreStop` instead of `idle`

Otherwise, after PreStart there will never be a stop event.

xoseperez
xoseperez

Not sure about this. There should be no "stop" event if there is no "start" event. A "pre_start" is not a start event, it could be noise. It's a notie that we have detected something but cannot tell if it's actual activity.

Sep
19
2 months ago
Activity icon
issue

xoseperez issue xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Seperate threshold for Start and Stop

Hi, I want to build a monitoring system for the washing machine. However, due to the standby consumption, I need different values for start and stop. Would be great if this could be implemented.

Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Seperate threshold for Start and Stop

Hi, I want to build a monitoring system for the washing machine. However, due to the standby consumption, I need different values for start and stop. Would be great if this could be implemented.

push

xoseperez push xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Separate thresholds for starts & stop, single output, refactor code, some bug fixing

commit sha: 57e9974706d1c2f1b74161884c6850564041466b

push time in 2 months ago
push

xoseperez push xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Add output on running state with time and energy up to that point

xoseperez
xoseperez

Also add energy_delta on running state

xoseperez
xoseperez

fix output event name on running state

xoseperez
xoseperez

Also emit pre_start event.

This is because when using energy_delta, only using running state will miss the energy deltas for pre start state and cause calculation errors between the sum of deltas and the total.

xoseperez
xoseperez

Merge pull request #8 from jsBlackBelt/master

Add output on running state with time and energy up to that point

commit sha: 52340d8eae3d23eb86bd090ac2580cc0cae9a006

push time in 2 months ago
pull request

xoseperez pull request xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Add output on `running` state with time and energy up to that point

This will cause the node to also output on running state with the current time and energy (in kWh) values mid-run.

Activity icon
issue

xoseperez issue xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Output from node - Current kWh Usage

I think this node is great, the only one of its kind. Most little issues you can work around and its been great. However, itd really like to see the kWh count being pushed out another output so that you dont have to wait until the end of the "Usage" Window to see the data. The node is obviously capable of it as it does it and you can see it in the editor.

Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Output from node - Current kWh Usage

I think this node is great, the only one of its kind. Most little issues you can work around and its been great. However, itd really like to see the kWh count being pushed out another output so that you dont have to wait until the end of the "Usage" Window to see the data. The node is obviously capable of it as it does it and you can see it in the editor.

xoseperez
xoseperez
Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Nice idea - request

I like this idea a lot, thanks for developing it!

It would make it more flexible if you could input something like:

{"name":"Livingroom lights", "watt":350}

use the key as name and start/stop based on the name/value So you can use one input/output node for multiple devices.

Also, devices that never turn off will never get a stop event. Would be nice if there was way to output the energy every x second/minutes. - This could be solved by sending node.status to an additional output ? I can imagine this node being used for graphs/dashboards, realtime overview would be awesome.

xoseperez
xoseperez

I see these are actually two different issues:

  • being able to use just one node to monitor multiple devices
  • fixing the problem when the device stops reporting data while running

I'm merging soon a PR that reports energy on every input, still it won't work if the device stops sending data.

Activity icon
issue

xoseperez issue xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Whole house power meter analysis

This is an interesting project but rather basic.

Is it possible to feed it with the consumption of whole house power meter so it can determine what appliances are used?

Usually, large ones will make quite big changes so they can be easily distinguished. The user can provide a list of appliances and their usage so the node can find out the closest match.

There is a commercial project that can fingerprint devices based on their power usage patterns, but I do not think anything like that is available as open source

Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Whole house power meter analysis

This is an interesting project but rather basic.

Is it possible to feed it with the consumption of whole house power meter so it can determine what appliances are used?

Usually, large ones will make quite big changes so they can be easily distinguished. The user can provide a list of appliances and their usage so the node can find out the closest match.

There is a commercial project that can fingerprint devices based on their power usage patterns, but I do not think anything like that is available as open source

xoseperez
xoseperez

No, that's not the goal of this node. It is indeed basic, as you say, but focused on monitoring a single device.

I know some project that do as you say. They usually require frequent data feeding (like 1Hz) and they claim to be able to identify not only what appliance you are using but also it's status (like tellling you the fridge is not performing well, so it might require maintenance).

Activity icon
issue

xoseperez issue xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Why energy output divided by 360 and 10.000?

Hello, I am struggling with the node and thats why I took a look at the code: kwh(x) = x / 360 / 10000

I was expecting that msg.payload.energy contains the sum of all inputs between start and stop. For me it contains a very small number when I run it in my flows?

The above function looks like it was meant to divide by 3600 (hour?) and then 1000 to make W to kWh?

Activity icon
issue

xoseperez issue comment xoseperez/node-red-contrib-power-monitor

xoseperez
xoseperez

Why energy output divided by 360 and 10.000?

Hello, I am struggling with the node and thats why I took a look at the code: kwh(x) = x / 360 / 10000

I was expecting that msg.payload.energy contains the sum of all inputs between start and stop. For me it contains a very small number when I run it in my flows?

The above function looks like it was meant to divide by 3600 (hour?) and then 1000 to make W to kWh?

xoseperez
xoseperez

Actually it's not exactly as you copied:

function kwh(value) {
    return Math.round(value / 360) / 10000;
}

So the original idea was to have a resolution down to a tenth of Wh.

Previous