Piston not working anymore, "null" that I do not understand


#1

1) Give a description of the problem
I have a couple of power consumption pistons. I just noticed that they are not working anymore. I’m not sure if Hubitat update broke it or webcore app update which I did this morning.

2) What is the expected behaviour?
Piston works. It sends "number to virtual device’s variable which I use in my sharptools dashboards to report power consumption (actually cost)

3) What is happening/not happening?
Variable does not work anymore.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full

For some reason there seems to be “null” before the 23.060… and virtual device does not accept that as a variable. There has not been “null” before and I do not understand where does that come from.


#3

I’m a bit confused as to what is happening there. The piston view seems to be showing a bog standard virtual command to set a variable, but missing the variable name. The device name in the ‘with’ is normally little more than a placeholder in that context.

On the other hand, the logs are showing the set variable being interpreted as a device command and not a virtual command.

It would appear webCoRE is as confused as I am.


#4

:smiley:

So…let me clarify.
I have a virtual device(s) in Hubitat. It has these attributes available.
image

One of those attributes is called “variable”.

Piston sends cost (kwh * cent/kwh) to virtual device’s variable attribute. Then I can use that device and that variable in my sharptools dashboard to show how much money this particual device has been using from the start of the year. It just basically counts cost and reports it to virtual device.

This has been working over month now but suddenly something happened which I do not understand.
Virtual device is also wondering what to do:

If I edit piston it shows red triangle: (don’t worry …different virtual device but same problem there too)

Probably something has changed after the webcore update and now I do not understand how should I change my pistons. Most likely something needs to be changed but I’m guessing there should not be any of these piston variables because I’m not updating piston variables…I’m sending numbers to device’s “variable”. Not sure if you guys understand what I mean…


#5

Is this a connector variable? It might be this issue I came across after a recent WC update.


#6

I had a similar problem as well with the most recent WC update. I had to eliminate the variable out of the “placeholder” spot and just have the Set Variable command by itself.


#7

Connector variable - You create it in HE as type of virtual device. WC can update it, and you can display its value in an HE dashboard.
I’ve used the @@Pad_Artist_title method too, to update an HE create variable. I’m not sure of the pros & conns of the two methods.


#8

If a device has a setVariable command, in the latest webCoRE, you need to use that.

See


#9

Answer most likely is here but I freakin don’t get it.

I can’t get device variable updated. What did I do wrong?


#10

Do you have logs from the device in regards to the call?

HE console -> Logs ?

It looks like the device is expecting a string, but I’m not 100% sure of that as I don’t know what the device is


#11

Log says:

So there is no signature of method…no idea what that means. I’m able to change virtual device to whatever device type is needed (if there is such a virtual device that works at the moment?). I chosed OMNI earlier because it had variable that I was able to update information from piston.

Here’s piston side:


#12

Do you see in the list of commands for the device, a

device setVariable()

That is what you want to select.

If you don’t see it do say what HE version, webCoRE version, and IDE (dashboard, staging, or local) you are using


#13

Nope. There is no setVariable under device…there is just device open. Set variable is under location and setVariable under custom.

I do not know what staging means. I have been using dashboard.webcore.co address. Where do I see IDE version?


#14

Got it. It should be like this:


#15

Couple of things

  • Normally setVariable is a built in command for working with variables within you piston see:
    variables

  • some devices have a device command setVariable(), and depending on the device it could have 1 or two parameters).

If you want to work with a webCoRE variable, you want the location setVariable command for this.

  • looking at your piston this looks like what you want.

If you want to work with a device variable, you need the device command.

So how to resolve:

  • ensure you webCoRE is up to date,
    • HPM repair if it is a user install, you look correct for you user install webCoRE version) or
    • update your HE firmware if using the built-in version. (today current HE version is .149)

You can use dashboard.webcore.co or staging.webcore.co as your IDE.